]>
Commit | Line | Data |
---|---|---|
0e320a79 | 1 | ///////////////////////////////////////////////////////////////////////////// |
80fdcdb9 | 2 | // Name: wx/os2/statline.h |
0e320a79 DW |
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 | |
65571936 | 8 | // Licence: wxWindows licence |
0e320a79 DW |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
e6ebb514 DW |
11 | #ifndef _WX_OS2_STATLINE_H_ |
12 | #define _WX_OS2_STATLINE_H_ | |
0e320a79 | 13 | |
0e320a79 DW |
14 | // ---------------------------------------------------------------------------- |
15 | // wxStaticLine | |
16 | // ---------------------------------------------------------------------------- | |
17 | ||
53a2db12 | 18 | class WXDLLIMPEXP_CORE wxStaticLine : public wxStaticLineBase |
0e320a79 | 19 | { |
0e320a79 DW |
20 | |
21 | public: | |
22 | // constructors and pseudo-constructors | |
23 | wxStaticLine() { } | |
3c299c3a | 24 | wxStaticLine( wxWindow* pParent |
1de1196a | 25 | ,wxWindowID vId = wxID_ANY |
3c299c3a DW |
26 | ,const wxPoint& rPos = wxDefaultPosition |
27 | ,const wxSize& rSize = wxDefaultSize | |
28 | ,long lStyle = wxLI_HORIZONTAL | |
73b30256 | 29 | ,const wxString& rsName = wxStaticLineNameStr |
3c299c3a DW |
30 | ) |
31 | { | |
32 | Create(pParent, vId, rPos, rSize, lStyle, rsName); | |
33 | } | |
34 | ||
35 | bool Create( wxWindow* pParent | |
1de1196a | 36 | ,wxWindowID vId = wxID_ANY |
3c299c3a DW |
37 | ,const wxPoint& rPos = wxDefaultPosition |
38 | ,const wxSize& rSize = wxDefaultSize | |
39 | ,long lStyle = wxLI_HORIZONTAL | |
73b30256 | 40 | ,const wxString& rsName = wxStaticLineNameStr |
3c299c3a DW |
41 | ); |
42 | ||
43 | inline bool IsVertical(void) const { return((GetWindowStyleFlag() & wxLI_VERTICAL) != 0); } | |
44 | inline static int GetDefaultSize(void) { return 2; } | |
0e320a79 | 45 | |
3c299c3a | 46 | // |
4c51a665 | 47 | // Overridden base class virtuals |
3c299c3a DW |
48 | // |
49 | inline virtual bool AcceptsFocus(void) const {return FALSE;} | |
50 | ||
51 | protected: | |
52 | inline wxSize AdjustSize(const wxSize& rSize) const | |
0e320a79 | 53 | { |
3c299c3a DW |
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; | |
0e320a79 DW |
69 | } |
70 | ||
3c299c3a DW |
71 | inline wxSize DoGetBestSize(void) const { return (AdjustSize(wxDefaultSize)); } |
72 | ||
b9b1d6c8 DW |
73 | // |
74 | // Usually overridden base class virtuals | |
75 | // | |
76 | virtual WXDWORD OS2GetStyle( long lStyle | |
77 | ,WXDWORD* pdwExstyle | |
78 | ) const; | |
79 | ||
3c299c3a DW |
80 | private: |
81 | DECLARE_DYNAMIC_CLASS(wxStaticLine) | |
82 | }; // end of CLASS wxStaticLine | |
0e320a79 | 83 | |
e6ebb514 | 84 | #endif // _WX_OS2_STATLINE_H_ |
0e320a79 DW |
85 | |
86 |