]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: src/msw/statline.cpp | |
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 | // ============================================================================ | |
11 | // declarations | |
12 | // ============================================================================ | |
13 | ||
14 | // ---------------------------------------------------------------------------- | |
15 | // headers | |
16 | // ---------------------------------------------------------------------------- | |
17 | ||
18 | // For compilers that support precompilation, includes "wx.h". | |
19 | #include "wx/wxprec.h" | |
20 | ||
21 | #ifdef __BORLANDC__ | |
22 | #pragma hdrstop | |
23 | #endif | |
24 | ||
25 | #include "wx/statline.h" | |
26 | ||
27 | #if wxUSE_STATLINE | |
28 | ||
29 | #ifndef WX_PRECOMP | |
30 | #include "wx/msw/private.h" | |
31 | #include "wx/msw/missing.h" | |
32 | #endif | |
33 | ||
34 | // ============================================================================ | |
35 | // implementation | |
36 | // ============================================================================ | |
37 | ||
38 | // ---------------------------------------------------------------------------- | |
39 | // wxStaticLine | |
40 | // ---------------------------------------------------------------------------- | |
41 | ||
42 | bool wxStaticLine::Create(wxWindow *parent, | |
43 | wxWindowID id, | |
44 | const wxPoint& pos, | |
45 | const wxSize& sizeOrig, | |
46 | long style, | |
47 | const wxString &name) | |
48 | { | |
49 | wxSize size = AdjustSize(sizeOrig); | |
50 | ||
51 | if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) ) | |
52 | return false; | |
53 | ||
54 | return MSWCreateControl(wxT("STATIC"), wxEmptyString, pos, size); | |
55 | } | |
56 | ||
57 | WXDWORD wxStaticLine::MSWGetStyle(long style, WXDWORD *exstyle) const | |
58 | { | |
59 | // we never have border | |
60 | style &= ~wxBORDER_MASK; | |
61 | style |= wxBORDER_NONE; | |
62 | ||
63 | WXDWORD msStyle = wxControl::MSWGetStyle(style, exstyle); | |
64 | ||
65 | // add our default styles | |
66 | msStyle |= SS_SUNKEN | SS_NOTIFY | WS_CLIPSIBLINGS; | |
67 | #ifndef __WXWINCE__ | |
68 | msStyle |= SS_GRAYRECT ; | |
69 | #endif | |
70 | ||
71 | return msStyle ; | |
72 | } | |
73 | ||
74 | #endif // wxUSE_STATLINE |