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 FXGROUPBOX_H
00025 #define FXGROUPBOX_H
00026
00027 #ifndef FXPACKER_H
00028 #include "FXPacker.h"
00029 #endif
00030
00031 namespace FX {
00032
00033
00034
00035 enum {
00036 GROUPBOX_TITLE_LEFT = 0,
00037 GROUPBOX_TITLE_CENTER = 0x00020000,
00038 GROUPBOX_TITLE_RIGHT = 0x00040000,
00039 GROUPBOX_NORMAL = GROUPBOX_TITLE_LEFT
00040 };
00041
00042
00043
00050 class FXAPI FXGroupBox : public FXPacker {
00051 FXDECLARE(FXGroupBox)
00052 protected:
00053 FXString label;
00054 FXFont *font;
00055 FXColor textColor;
00056 protected:
00057 FXGroupBox();
00058 private:
00059 FXGroupBox(const FXGroupBox&);
00060 FXGroupBox &operator=(const FXGroupBox&);
00061 public:
00062 long onPaint(FXObject*,FXSelector,void*);
00063 long onCmdSetValue(FXObject*,FXSelector,void*);
00064 long onCmdSetStringValue(FXObject*,FXSelector,void*);
00065 long onCmdGetStringValue(FXObject*,FXSelector,void*);
00066 public:
00067
00069 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);
00070
00072 virtual void create();
00073
00075 virtual void detach();
00076
00078 virtual void layout();
00079
00081 virtual void enable();
00082
00084 virtual void disable();
00085
00087 virtual FXint getDefaultWidth();
00088
00090 virtual FXint getDefaultHeight();
00091
00093 void setText(const FXString& text);
00094
00096 FXString getText() const { return label; }
00097
00099 void setGroupBoxStyle(FXuint style);
00100
00102 FXuint getGroupBoxStyle() const;
00103
00105 void setFont(FXFont* fnt);
00106
00108 FXFont* getFont() const { return font; }
00109
00111 void setTextColor(FXColor clr);
00112
00114 FXColor getTextColor() const { return textColor; }
00115
00117 virtual void save(FXStream& store) const;
00118
00120 virtual void load(FXStream& store);
00121 };
00122
00123 }
00124
00125 #endif