]> git.saurik.com Git - wxWidgets.git/blame - src/msw/statline.cpp
xti additions / changes, trying to reduce dependencies
[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
8// Licence: wxWindows licence
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"
2662e49e 35#include "wx/log.h"
c50f1fb9 36
f6bcfd97
BP
37#ifndef SS_SUNKEN
38 #define SS_SUNKEN 0x00001000L
39#endif
40
41#ifndef SS_NOTIFY
42 #define SS_NOTIFY 0x00000100L
43#endif
44
c50f1fb9
VZ
45// ============================================================================
46// implementation
47// ============================================================================
48
49IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
066f1b7a
SC
50/*
51 TODO PROPERTIES :
52 style (wxLI_HORIZONTAL)
53*/
c50f1fb9
VZ
54
55// ----------------------------------------------------------------------------
56// wxStaticLine
57// ----------------------------------------------------------------------------
58
cfa822b8
VZ
59bool wxStaticLine::Create(wxWindow *parent,
60 wxWindowID id,
61 const wxPoint& pos,
62 const wxSize& sizeOrig,
63 long style,
64 const wxString &name)
c50f1fb9 65{
cfa822b8 66 wxSize size = AdjustSize(sizeOrig);
f6bcfd97 67
cfa822b8 68 if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
c50f1fb9 69 return FALSE;
c50f1fb9 70
fda7962d 71 return MSWCreateControl(_T("STATIC"), wxEmptyString, pos, size);
cfa822b8
VZ
72}
73
74WXDWORD wxStaticLine::MSWGetStyle(long style, WXDWORD *exstyle) const
75{
3a01bb1b
VZ
76 // we never have border
77 style &= ~wxBORDER_MASK;
78 style |= wxBORDER_NONE;
79
cfa822b8 80 WXDWORD msStyle = wxControl::MSWGetStyle(style, exstyle);
c50f1fb9 81
cfa822b8 82 // add our default styles
4676948b
JS
83 msStyle |= SS_SUNKEN | SS_NOTIFY | WS_CLIPSIBLINGS;
84#ifndef __WXWINCE__
85 msStyle |= SS_GRAYRECT ;
86#endif
87
88 return msStyle ;
c50f1fb9 89}
f6bcfd97
BP
90
91#endif // wxUSE_STATLINE
c50f1fb9 92