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