]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/statline.h
removed extra wxCalendarCtrl:: which is ignored by MSVC for some reason but breaks...
[wxWidgets.git] / include / wx / os2 / statline.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: msw/statline.h
3 // Purpose: MSW version of wxStaticLine class
4 // Author: Vadim Zeitlin
5 // Created: 28.06.99
6 // Version: $Id$
7 // Copyright: (c) 1998 Vadim Zeitlin
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_OS2_STATLINE_H_
12 #define _WX_OS2_STATLINE_H_
13
14 // ----------------------------------------------------------------------------
15 // wxStaticLine
16 // ----------------------------------------------------------------------------
17
18 class WXDLLIMPEXP_CORE wxStaticLine : public wxStaticLineBase
19 {
20
21 public:
22 // constructors and pseudo-constructors
23 wxStaticLine() { }
24 wxStaticLine( wxWindow* pParent
25 ,wxWindowID vId = wxID_ANY
26 ,const wxPoint& rPos = wxDefaultPosition
27 ,const wxSize& rSize = wxDefaultSize
28 ,long lStyle = wxLI_HORIZONTAL
29 ,const wxString& rsName = wxStaticLineNameStr
30 )
31 {
32 Create(pParent, vId, rPos, rSize, lStyle, rsName);
33 }
34
35 bool Create( wxWindow* pParent
36 ,wxWindowID vId = wxID_ANY
37 ,const wxPoint& rPos = wxDefaultPosition
38 ,const wxSize& rSize = wxDefaultSize
39 ,long lStyle = wxLI_HORIZONTAL
40 ,const wxString& rsName = wxStaticLineNameStr
41 );
42
43 inline bool IsVertical(void) const { return((GetWindowStyleFlag() & wxLI_VERTICAL) != 0); }
44 inline static int GetDefaultSize(void) { return 2; }
45
46 //
47 // Overriden base class virtuals
48 //
49 inline virtual bool AcceptsFocus(void) const {return FALSE;}
50
51 protected:
52 inline wxSize AdjustSize(const wxSize& rSize) const
53 {
54 wxSize vSizeReal( rSize.x
55 ,rSize.y
56 );
57
58 if (IsVertical())
59 {
60 if (rSize.x == -1 )
61 vSizeReal.x = GetDefaultSize();
62 }
63 else
64 {
65 if (rSize.y == -1)
66 vSizeReal.y = GetDefaultSize();
67 }
68 return vSizeReal;
69 }
70
71 inline wxSize DoGetBestSize(void) const { return (AdjustSize(wxDefaultSize)); }
72
73 //
74 // Usually overridden base class virtuals
75 //
76 virtual WXDWORD OS2GetStyle( long lStyle
77 ,WXDWORD* pdwExstyle
78 ) const;
79
80 private:
81 DECLARE_DYNAMIC_CLASS(wxStaticLine)
82 }; // end of CLASS wxStaticLine
83
84 #endif // _WX_OS2_STATLINE_H_
85
86