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
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
00049 #define DEFAULT_PAD FXWindow::defaultPadding()
00050
00051
00061 class FXAPI FXFrame : public FXWindow {
00062 FXDECLARE(FXFrame)
00063 protected:
00064 FXColor baseColor;
00065 FXColor hiliteColor;
00066 FXColor shadowColor;
00067 FXColor borderColor;
00068 FXint padtop;
00069 FXint padbottom;
00070 FXint padleft;
00071 FXint padright;
00072 FXint border;
00073 protected:
00074 FXFrame();
00075 void drawBorderRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00076 void drawRaisedRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00077 void drawSunkenRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00078 void drawRidgeRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00079 void drawGrooveRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00080 void drawDoubleRaisedRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00081 void drawDoubleSunkenRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00082 void drawFrame(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00083 private:
00084 FXFrame(const FXFrame&);
00085 FXFrame &operator=(const FXFrame&);
00086 public:
00087 long onPaint(FXObject*,FXSelector,void*);
00088 public:
00089
00091 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);
00092
00094 virtual FXint getDefaultWidth();
00095
00097 virtual FXint getDefaultHeight();
00098
00100 void setFrameStyle(FXuint style);
00101
00103 FXuint getFrameStyle() const;
00104
00106 FXint getBorderWidth() const { return border; }
00107
00109 void setPadTop(FXint pt);
00110
00112 FXint getPadTop() const { return padtop; }
00113
00115 void setPadBottom(FXint pb);
00116
00118 FXint getPadBottom() const { return padbottom; }
00119
00121 void setPadLeft(FXint pl);
00122
00124 FXint getPadLeft() const { return padleft; }
00125
00127 void setPadRight(FXint pr);
00128
00130 FXint getPadRight() const { return padright; }
00131
00133 void setHiliteColor(FXColor clr);
00134
00136 FXColor getHiliteColor() const { return hiliteColor; }
00137
00139 void setShadowColor(FXColor clr);
00140
00142 FXColor getShadowColor() const { return shadowColor; }
00143
00145 void setBorderColor(FXColor clr);
00146
00148 FXColor getBorderColor() const { return borderColor; }
00149
00151 void setBaseColor(FXColor clr);
00152
00154 FXColor getBaseColor() const { return baseColor; }
00155
00157 virtual void save(FXStream& store) const;
00158
00160 virtual void load(FXStream& store);
00161 };
00162
00163 }
00164
00165 #endif