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