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