00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef FXSWITCHER_H
00022 #define FXSWITCHER_H
00023
00024 #ifndef FXPACKER_H
00025 #include "FXPacker.h"
00026 #endif
00027
00028 namespace FX {
00029
00031 enum {
00032 SWITCHER_HCOLLAPSE = 0x00020000,
00033 SWITCHER_VCOLLAPSE = 0x00040000
00034 };
00035
00036
00052 class FXAPI FXSwitcher : public FXPacker {
00053 FXDECLARE(FXSwitcher)
00054 protected:
00055 FXint current;
00056 protected:
00057 FXSwitcher();
00058 private:
00059 FXSwitcher(const FXSwitcher&);
00060 FXSwitcher& operator=(const FXSwitcher&);
00061 public:
00062 long onPaint(FXObject*,FXSelector,void*);
00063 long onCmdSetValue(FXObject*,FXSelector,void*);
00064 long onCmdSetIntValue(FXObject*,FXSelector,void*);
00065 long onCmdGetIntValue(FXObject*,FXSelector,void*);
00066 long onCmdOpen(FXObject*,FXSelector,void*);
00067 long onUpdOpen(FXObject*,FXSelector,void*);
00068 public:
00069 enum {
00070 ID_OPEN_FIRST=FXPacker::ID_LAST,
00071 ID_OPEN_SECOND,
00072 ID_OPEN_THIRD,
00073 ID_OPEN_FOURTH,
00074 ID_OPEN_FIFTH,
00075 ID_OPEN_SIXTH,
00076 ID_OPEN_SEVENTH,
00077 ID_OPEN_EIGHTH,
00078 ID_OPEN_NINETH,
00079 ID_OPEN_TENTH,
00080 ID_OPEN_LAST=ID_OPEN_FIRST+100,
00081 ID_LAST
00082 };
00083 public:
00084
00086 FXSwitcher(FXComposite *p,FXuint opts=0,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);
00087
00089 virtual FXint getDefaultWidth();
00090
00092 virtual FXint getDefaultHeight();
00093
00095 virtual void layout();
00096
00098 void setCurrent(FXint index,FXbool notify=false);
00099
00101 FXint getCurrent() const { return current; }
00102
00104 void setSwitcherStyle(FXuint style);
00105
00107 FXuint getSwitcherStyle() const;
00108
00110 virtual void save(FXStream& store) const;
00111
00113 virtual void load(FXStream& store);
00114 };
00115
00116 }
00117
00118 #endif