00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
#ifndef FXFRAME_H
00025
#define FXFRAME_H
00026
00027
#ifndef FXWINDOW_H
00028
#include "FXWindow.h"
00029
#endif
00030
00031
namespace FX {
00032
00033
00034
00035
enum {
00036
JUSTIFY_NORMAL = 0,
00037
JUSTIFY_CENTER_X = 0,
00038
JUSTIFY_LEFT = 0x00008000,
00039
JUSTIFY_RIGHT = 0x00010000,
00040
JUSTIFY_HZ_APART =
JUSTIFY_LEFT|
JUSTIFY_RIGHT,
00041
JUSTIFY_CENTER_Y = 0,
00042
JUSTIFY_TOP = 0x00020000,
00043
JUSTIFY_BOTTOM = 0x00040000,
00044
JUSTIFY_VT_APART =
JUSTIFY_TOP|
JUSTIFY_BOTTOM
00045 };
00046
00047
00048
00049
enum { DEFAULT_PAD = 2 };
00050
00051
00052
00053
class FXAPI FXFrame :
public FXWindow {
00054 FXDECLARE(FXFrame)
00055 protected:
00056 FXColor baseColor;
00057 FXColor hiliteColor;
00058 FXColor shadowColor;
00059 FXColor borderColor;
00060 FXint padtop;
00061 FXint padbottom;
00062 FXint padleft;
00063 FXint padright;
00064 FXint border;
00065 protected:
00066 FXFrame();
00067
void drawBorderRectangle(
FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00068
void drawRaisedRectangle(
FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00069
void drawSunkenRectangle(
FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00070
void drawRidgeRectangle(
FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00071
void drawGrooveRectangle(
FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00072
void drawDoubleRaisedRectangle(
FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00073
void drawDoubleSunkenRectangle(
FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00074
void drawFrame(
FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00075 private:
00076 FXFrame(const FXFrame&);
00077 FXFrame &operator=(const FXFrame&);
00078 public:
00079
long onPaint(
FXObject*,FXSelector,
void*);
00080 public:
00081
00082
00083 FXFrame(
FXComposite* p,FXuint opts=FRAME_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_PAD,FXint pr=DEFAULT_PAD,FXint pt=DEFAULT_PAD,FXint pb=DEFAULT_PAD);
00084
00085
00086 virtual FXint getDefaultWidth();
00087
00088
00089 virtual FXint getDefaultHeight();
00090
00091
00092
void setFrameStyle(FXuint style);
00093
00094
00095 FXuint getFrameStyle() const;
00096
00097
00098 FXint getBorderWidth()
const {
return border; }
00099
00100
00101
void setPadTop(FXint pt);
00102
00103
00104 FXint getPadTop()
const {
return padtop; }
00105
00106
00107
void setPadBottom(FXint pb);
00108
00109
00110 FXint getPadBottom()
const {
return padbottom; }
00111
00112
00113
void setPadLeft(FXint pl);
00114
00115
00116 FXint getPadLeft()
const {
return padleft; }
00117
00118
00119
void setPadRight(FXint pr);
00120
00121
00122 FXint getPadRight()
const {
return padright; }
00123
00124
00125
void setHiliteColor(FXColor clr);
00126
00127
00128 FXColor getHiliteColor()
const {
return hiliteColor; }
00129
00130
00131
void setShadowColor(FXColor clr);
00132
00133
00134 FXColor getShadowColor()
const {
return shadowColor; }
00135
00136
00137
void setBorderColor(FXColor clr);
00138
00139
00140 FXColor getBorderColor()
const {
return borderColor; }
00141
00142
00143
void setBaseColor(FXColor clr);
00144
00145
00146 FXColor getBaseColor()
const {
return baseColor; }
00147
00148
00149
virtual void save(FXStream& store)
const;
00150
00151
00152
virtual void load(FXStream& store);
00153
00154
00155
virtual ~FXFrame();
00156 };
00157
00158 }
00159
00160
#endif