]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/statline.h
Fixed conflicts with Robert's similar fixes; fixed toolbar size calculation
[wxWidgets.git] / include / wx / os2 / statline.h
CommitLineData
0e320a79
DW
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
e6ebb514
DW
11#ifndef _WX_OS2_STATLINE_H_
12#define _WX_OS2_STATLINE_H_
0e320a79
DW
13
14#ifdef __GNUG__
15 #pragma interface
16#endif
17
18// ----------------------------------------------------------------------------
19// wxStaticLine
20// ----------------------------------------------------------------------------
21
22class WXDLLEXPORT wxStaticLine : public wxStaticLineBase
23{
0e320a79
DW
24
25public:
26 // constructors and pseudo-constructors
27 wxStaticLine() { }
3c299c3a
DW
28 wxStaticLine( wxWindow* pParent
29 ,wxWindowID vId
30 ,const wxPoint& rPos = wxDefaultPosition
31 ,const wxSize& rSize = wxDefaultSize
32 ,long lStyle = wxLI_HORIZONTAL
33 ,const wxString& rsName = wxStaticTextNameStr
34 )
35 {
36 Create(pParent, vId, rPos, rSize, lStyle, rsName);
37 }
38
39 bool Create( wxWindow* pParent
40 ,wxWindowID vId
41 ,const wxPoint& rPos = wxDefaultPosition
42 ,const wxSize& rSize = wxDefaultSize
43 ,long lStyle = wxLI_HORIZONTAL
44 ,const wxString& rsName = wxStaticTextNameStr
45 );
46
47 inline bool IsVertical(void) const { return((GetWindowStyleFlag() & wxLI_VERTICAL) != 0); }
48 inline static int GetDefaultSize(void) { return 2; }
0e320a79 49
3c299c3a
DW
50 //
51 // Overriden base class virtuals
52 //
53 inline virtual bool AcceptsFocus(void) const {return FALSE;}
54
55protected:
56 inline wxSize AdjustSize(const wxSize& rSize) const
0e320a79 57 {
3c299c3a
DW
58 wxSize vSizeReal( rSize.x
59 ,rSize.y
60 );
61
62 if (IsVertical())
63 {
64 if (rSize.x == -1 )
65 vSizeReal.x = GetDefaultSize();
66 }
67 else
68 {
69 if (rSize.y == -1)
70 vSizeReal.y = GetDefaultSize();
71 }
72 return vSizeReal;
0e320a79
DW
73 }
74
3c299c3a
DW
75 inline wxSize DoGetBestSize(void) const { return (AdjustSize(wxDefaultSize)); }
76
b9b1d6c8
DW
77 //
78 // Usually overridden base class virtuals
79 //
80 virtual WXDWORD OS2GetStyle( long lStyle
81 ,WXDWORD* pdwExstyle
82 ) const;
83
3c299c3a
DW
84private:
85 DECLARE_DYNAMIC_CLASS(wxStaticLine)
86}; // end of CLASS wxStaticLine
0e320a79 87
e6ebb514 88#endif // _WX_OS2_STATLINE_H_
0e320a79
DW
89
90