stattext.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/os2/stattext.h
  3. // Purpose: wxStaticText class
  4. // Author: David Webster
  5. // Modified by:
  6. // Created: 10/17/99
  7. // Copyright: (c) David Webster
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_STATTEXT_H_
  11. #define _WX_STATTEXT_H_
  12. #include "wx/control.h"
  13. class WXDLLIMPEXP_CORE wxStaticText : public wxStaticTextBase
  14. {
  15. public:
  16. inline wxStaticText() { }
  17. inline wxStaticText( wxWindow* pParent
  18. ,wxWindowID vId
  19. ,const wxString& rsLabel
  20. ,const wxPoint& rPos = wxDefaultPosition
  21. ,const wxSize& rSize = wxDefaultSize
  22. ,long lStyle = 0L
  23. ,const wxString& rsName = wxStaticTextNameStr
  24. )
  25. {
  26. Create(pParent, vId, rsLabel, rPos, rSize, lStyle, rsName);
  27. }
  28. bool Create( wxWindow* pParent
  29. ,wxWindowID vId
  30. ,const wxString& rsLabel
  31. ,const wxPoint& rPos = wxDefaultPosition
  32. ,const wxSize& rSize = wxDefaultSize
  33. ,long lStyle = 0L
  34. ,const wxString& rsName = wxStaticTextNameStr
  35. );
  36. //
  37. // Accessors
  38. //
  39. virtual void SetLabel(const wxString& rsLabel);
  40. virtual bool SetFont(const wxFont &rFont);
  41. //
  42. // Overridden base class virtuals
  43. //
  44. virtual bool AcceptsFocus() const { return FALSE; }
  45. //
  46. // Callbacks
  47. //
  48. virtual MRESULT OS2WindowProc( WXUINT uMsg
  49. ,WXWPARAM wParam
  50. ,WXLPARAM lParam
  51. );
  52. protected:
  53. virtual void DoSetSize( int nX
  54. ,int nY
  55. ,int nWidth
  56. ,int nHeight
  57. ,int nSizeFlags = wxSIZE_AUTO
  58. );
  59. virtual wxSize DoGetBestSize(void) const;
  60. virtual void DoSetLabel(const wxString& str);
  61. virtual wxString DoGetLabel() const;
  62. private:
  63. DECLARE_DYNAMIC_CLASS(wxStaticText)
  64. }; // end of CLASS wxStaticText
  65. #endif
  66. // _WX_STATTEXT_H_