]> git.saurik.com Git - wxWidgets.git/blame - src/msw/statline.cpp
Override email address for Jaakko Salli.
[wxWidgets.git] / src / msw / statline.cpp
CommitLineData
c50f1fb9 1/////////////////////////////////////////////////////////////////////////////
57bd4c60 2// Name: src/msw/statline.cpp
c50f1fb9
VZ
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
c50f1fb9
VZ
9/////////////////////////////////////////////////////////////////////////////
10
11// ============================================================================
12// declarations
13// ============================================================================
14
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
c50f1fb9
VZ
19// For compilers that support precompilation, includes "wx.h".
20#include "wx/wxprec.h"
21
22#ifdef __BORLANDC__
23 #pragma hdrstop
24#endif
25
26#include "wx/statline.h"
27
f3c0f9e7
JS
28#if wxUSE_STATLINE
29
57bd4c60
WS
30#ifndef WX_PRECOMP
31 #include "wx/msw/private.h"
32 #include "wx/msw/missing.h"
33#endif
cc4f5ad8 34
c50f1fb9
VZ
35// ============================================================================
36// implementation
37// ============================================================================
38
bc9fb572
JS
39#if wxUSE_EXTENDED_RTTI
40WX_DEFINE_FLAGS( wxStaticLineStyle )
41
3ff066a4 42wxBEGIN_FLAGS( wxStaticLineStyle )
bc9fb572
JS
43 // new style border flags, we put them first to
44 // use them for streaming out
3ff066a4
SC
45 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
46 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
47 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
48 wxFLAGS_MEMBER(wxBORDER_RAISED)
49 wxFLAGS_MEMBER(wxBORDER_STATIC)
50 wxFLAGS_MEMBER(wxBORDER_NONE)
57f4f925 51
bc9fb572 52 // old style border flags
3ff066a4
SC
53 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
54 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
55 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
56 wxFLAGS_MEMBER(wxRAISED_BORDER)
57 wxFLAGS_MEMBER(wxSTATIC_BORDER)
cb0afb26 58 wxFLAGS_MEMBER(wxBORDER)
bc9fb572
JS
59
60 // standard window styles
3ff066a4
SC
61 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
62 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
63 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
64 wxFLAGS_MEMBER(wxWANTS_CHARS)
cb0afb26 65 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
3ff066a4
SC
66 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
67 wxFLAGS_MEMBER(wxVSCROLL)
68 wxFLAGS_MEMBER(wxHSCROLL)
bc9fb572 69
3ff066a4
SC
70 wxFLAGS_MEMBER(wxLI_HORIZONTAL)
71 wxFLAGS_MEMBER(wxLI_VERTICAL)
bc9fb572 72
3ff066a4 73wxEND_FLAGS( wxStaticLineStyle )
bc9fb572
JS
74
75IMPLEMENT_DYNAMIC_CLASS_XTI(wxStaticLine, wxControl,"wx/statline.h")
76
3ff066a4 77wxBEGIN_PROPERTIES_TABLE(wxStaticLine)
af498247 78 wxPROPERTY_FLAGS( WindowStyle , wxStaticLineStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
3ff066a4 79wxEND_PROPERTIES_TABLE()
bc9fb572 80
3ff066a4
SC
81wxBEGIN_HANDLERS_TABLE(wxStaticLine)
82wxEND_HANDLERS_TABLE()
bc9fb572 83
3ff066a4 84wxCONSTRUCTOR_5( wxStaticLine, wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle)
bc9fb572
JS
85
86#else
c50f1fb9 87IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
bc9fb572
JS
88#endif
89
066f1b7a 90/*
57f4f925
WS
91 TODO PROPERTIES :
92 style (wxLI_HORIZONTAL)
066f1b7a 93*/
c50f1fb9
VZ
94
95// ----------------------------------------------------------------------------
96// wxStaticLine
97// ----------------------------------------------------------------------------
98
cfa822b8
VZ
99bool wxStaticLine::Create(wxWindow *parent,
100 wxWindowID id,
101 const wxPoint& pos,
102 const wxSize& sizeOrig,
103 long style,
104 const wxString &name)
c50f1fb9 105{
cfa822b8 106 wxSize size = AdjustSize(sizeOrig);
f6bcfd97 107
cfa822b8 108 if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
57f4f925 109 return false;
c50f1fb9 110
fda7962d 111 return MSWCreateControl(_T("STATIC"), wxEmptyString, pos, size);
cfa822b8
VZ
112}
113
114WXDWORD wxStaticLine::MSWGetStyle(long style, WXDWORD *exstyle) const
115{
3a01bb1b
VZ
116 // we never have border
117 style &= ~wxBORDER_MASK;
118 style |= wxBORDER_NONE;
119
cfa822b8 120 WXDWORD msStyle = wxControl::MSWGetStyle(style, exstyle);
c50f1fb9 121
cfa822b8 122 // add our default styles
4676948b
JS
123 msStyle |= SS_SUNKEN | SS_NOTIFY | WS_CLIPSIBLINGS;
124#ifndef __WXWINCE__
125 msStyle |= SS_GRAYRECT ;
126#endif
127
128 return msStyle ;
c50f1fb9 129}
f6bcfd97
BP
130
131#endif // wxUSE_STATLINE