00001 00026 #ifndef INC_MGUI_FORMBTXT_H 00027 #define INC_MGUI_FORMBTXT_H 00028 00029 #ifndef INC_MGUI_EDIT_H 00030 #include <mgui/edit.h> 00031 #endif 00032 00033 00034 namespace MGUI { 00035 00036 //=================================================================================================================== 00038 class FORM_BUTTONTEXT : public MGUI::FORM_COMPOSITE { 00039 public: 00040 00042 FORM_BUTTONTEXT ( 00043 ); 00044 00046 void ClearText ( 00047 ) { 00048 m_Text.ClearValue(false); 00049 } 00050 00052 void Create ( 00053 MGUI::LAYOUT_PANE_BASE& ParentPane, 00054 const MISTRING& label, 00055 int width = 0, 00056 MGUI::LAYOUT_SIZEALIGN sizealign = MGUI::LAYOUT_SIZEALIGN_Expand 00057 ); 00058 00060 CTRL_PUSHBUTTON& GetButton ( 00061 ) { return (m_Button); } 00062 00065 CTRL_EDIT_STRING& GetTextCtrl ( 00066 ) { return (m_Text); } 00067 00069 void SetDelegateOnPressed ( 00070 DELEGATE_VOID_NOPARMS delegate 00071 ) { m_Button.SetDelegateOnPressed(delegate); } 00072 00074 void SetText ( 00075 const MISTRING& string 00076 ); 00077 00079 void SetToolTipString ( 00080 const MISTRING& string 00081 ); 00082 00083 private: 00084 #ifndef GENERATING_DOXYGEN_OUTPUT 00085 CTRL_EDIT_STRING m_Text; 00086 CTRL_PUSHBUTTON m_Button; 00087 00088 void CreateText (int width, LAYOUT_SIZEALIGN sizealign); 00089 00090 FORM_BUTTONTEXT (const FORM_BUTTONTEXT&); 00091 FORM_BUTTONTEXT& operator= (const FORM_BUTTONTEXT&); 00092 #endif // GENERATING_DOXYGEN_OUTPUT 00093 }; 00094 00095 00096 //=================================================================================================================== 00097 00098 } // End namespace MGUI 00099 00100 #endif // INC_MGUI_FORMBTXT_H
1.6.1