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