]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/os2/statline.h
A few tweaks and cleanups
[wxWidgets.git] / include / wx / os2 / statline.h
... / ...
CommitLineData
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#ifdef __GNUG__
15 #pragma interface
16#endif
17
18// ----------------------------------------------------------------------------
19// wxStaticLine
20// ----------------------------------------------------------------------------
21
22class WXDLLEXPORT wxStaticLine : public wxStaticLineBase
23{
24
25public:
26 // constructors and pseudo-constructors
27 wxStaticLine() { }
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; }
49
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
57 {
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;
73 }
74
75 inline wxSize DoGetBestSize(void) const { return (AdjustSize(wxDefaultSize)); }
76
77 //
78 // Usually overridden base class virtuals
79 //
80 virtual WXDWORD OS2GetStyle( long lStyle
81 ,WXDWORD* pdwExstyle
82 ) const;
83
84private:
85 DECLARE_DYNAMIC_CLASS(wxStaticLine)
86}; // end of CLASS wxStaticLine
87
88#endif // _WX_OS2_STATLINE_H_
89
90