00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef FXGROUPBOX_H
00022 #define FXGROUPBOX_H
00023
00024 #ifndef FXPACKER_H
00025 #include "FXPacker.h"
00026 #endif
00027
00028 namespace FX {
00029
00030
00031
00032 enum {
00033 GROUPBOX_TITLE_LEFT = 0,
00034 GROUPBOX_TITLE_CENTER = 0x00020000,
00035 GROUPBOX_TITLE_RIGHT = 0x00040000,
00036 GROUPBOX_NORMAL = GROUPBOX_TITLE_LEFT
00037 };
00038
00039
00040
00047 class FXAPI FXGroupBox : public FXPacker {
00048 FXDECLARE(FXGroupBox)
00049 protected:
00050 FXString label;
00051 FXFont *font;
00052 FXColor textColor;
00053 protected:
00054 FXGroupBox();
00055 private:
00056 FXGroupBox(const FXGroupBox&);
00057 FXGroupBox &operator=(const FXGroupBox&);
00058 public:
00059 long onPaint(FXObject*,FXSelector,void*);
00060 long onCmdSetValue(FXObject*,FXSelector,void*);
00061 long onCmdSetStringValue(FXObject*,FXSelector,void*);
00062 long onCmdGetStringValue(FXObject*,FXSelector,void*);
00063 public:
00064
00066 FXGroupBox(FXComposite* p,const FXString& text,FXuint opts=GROUPBOX_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_SPACING,FXint pr=DEFAULT_SPACING,FXint pt=DEFAULT_SPACING,FXint pb=DEFAULT_SPACING,FXint hs=DEFAULT_SPACING,FXint vs=DEFAULT_SPACING);
00067
00069 virtual void create();
00070
00072 virtual void detach();
00073
00075 virtual void layout();
00076
00078 virtual void enable();
00079
00081 virtual void disable();
00082
00084 virtual FXint getDefaultWidth();
00085
00087 virtual FXint getDefaultHeight();
00088
00090 void setText(const FXString& text);
00091
00093 FXString getText() const { return label; }
00094
00096 void setGroupBoxStyle(FXuint style);
00097
00099 FXuint getGroupBoxStyle() const;
00100
00102 void setFont(FXFont* fnt);
00103
00105 FXFont* getFont() const { return font; }
00106
00108 void setTextColor(FXColor clr);
00109
00111 FXColor getTextColor() const { return textColor; }
00112
00114 virtual void save(FXStream& store) const;
00115
00117 virtual void load(FXStream& store);
00118 };
00119
00120 }
00121
00122 #endif