FXLCDLabel.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef FXLCDLABEL_H
00023 #define FXLCDLABEL_H
00024
00025
00026
00027
00028
00029 #ifdef _MSC_VER
00030 #include <windows_config.h>
00031 #else
00032 #include <config.h>
00033 #endif
00034
00035
00036
00037 #ifndef FXHORIZONTALFRAME_H
00038 #include <FXHorizontalFrame.h>
00039 using namespace FX;
00040 #endif
00041 namespace FXEX {
00042
00044 enum {
00045 LCDLABEL_NORMAL = FRAME_SUNKEN|FRAME_THICK,
00046 LCDLABEL_LEADING_ZEROS = 0x01000000
00047 };
00048
00054 class
00055 FXLCDLabel : public FXHorizontalFrame {
00056 FXDECLARE(FXLCDLabel)
00057
00058 protected:
00059 FXLCDLabel() {}
00060
00061 FXString label;
00062 FXint nfigures;
00063
00064
00065 virtual void drawString(const FXString& lbl);
00066
00067 public:
00068 enum {
00069 ID_SEVENSEGMENT=FXHorizontalFrame::ID_LAST,
00070 ID_LAST
00071 };
00072
00073 public:
00074 long onPaint(FXObject*, FXSelector, void*);
00075 long onCmdSetValue(FXObject*,FXSelector,void* ptr);
00076 long onCmdSetIntValue(FXObject*,FXSelector,void* ptr);
00077 long onCmdSetRealValue(FXObject*,FXSelector,void* ptr);
00078 long onCmdSetStringValue(FXObject*,FXSelector,void* ptr);
00079 long onCmdGetIntValue(FXObject*,FXSelector,void* ptr);
00080 long onCmdGetRealValue(FXObject*,FXSelector,void* ptr);
00081 long onCmdGetStringValue(FXObject*,FXSelector,void* ptr);
00082 long onRedirectEvent(FXObject*,FXSelector,void* ptr);
00083 long onQueryTip(FXObject*,FXSelector,void* ptr);
00084 long onQueryHelp(FXObject*,FXSelector,void* ptr);
00085
00086 public:
00088 FXLCDLabel(FXComposite* p,FXuint nfig=1,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=LCDLABEL_NORMAL,FXint pl=DEFAULT_PAD,FXint pr=DEFAULT_PAD,FXint pt=DEFAULT_PAD,FXint pb=DEFAULT_PAD,FXint hs=DEFAULT_PAD);
00089
00091 virtual void create();
00092
00094 virtual void detach();
00095
00097 virtual void destroy();
00098
00100 void setText(FXString lbl);
00101 FXString getText() const {
00102 return label;
00103 }
00104
00106 void setFgColor(FXColor clr);
00107 FXColor getFgColor() const;
00108
00110 void setBgColor(FXColor clr);
00111 FXColor getBgColor() const;
00112
00114 void setHorizontal(const FXint len);
00115 FXint getHorizontal() const;
00116
00118 void setVertical(const FXint len);
00119 FXint getVertical() const;
00120
00122 void setThickness(const FXint width);
00123 FXint getThickness() const;
00124
00126 void setGroove(const FXint width);
00127 FXint getGroove() const;
00128
00130 virtual FXint getDefaultWidth();
00131
00133 virtual FXint getDefaultHeight();
00134
00136 virtual void save(FXStream &store) const;
00137
00139 virtual void load(FXStream &store);
00140
00142 virtual ~FXLCDLabel();
00143 };
00144
00145 }
00146 #endif // FXLCDLabel