]> git.saurik.com Git - wxWidgets.git/blame - src/os2/statline.cpp
Better sorting example and better default
[wxWidgets.git] / src / os2 / statline.cpp
CommitLineData
a66ebb5b 1/////////////////////////////////////////////////////////////////////////////
e4db172a 2// Name: src/os2/statline.cpp
a66ebb5b
DW
3// Purpose: OS2 version of wxStaticLine class
4// Author: David Webster
5// Created: 10/23/99
6// Version: $Id$
7// Copyright: (c) 1999 David Webster
65571936 8// Licence: wxWindows licence
a66ebb5b
DW
9/////////////////////////////////////////////////////////////////////////////
10
11// ============================================================================
12// declarations
13// ============================================================================
14
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
19// For compilers that support precompilation, includes "wx.h".
20#include "wx/wxprec.h"
21
e4db172a
WS
22#if wxUSE_STATLINE
23
a66ebb5b
DW
24#include "wx/statline.h"
25
e4db172a
WS
26#ifndef WX_PRECOMP
27 #include "wx/log.h"
28#endif
a66ebb5b
DW
29
30#include "wx/os2/private.h"
a66ebb5b
DW
31
32// ============================================================================
33// implementation
34// ============================================================================
35
36IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
37
38// ----------------------------------------------------------------------------
39// wxStaticLine
40// ----------------------------------------------------------------------------
41
3c299c3a
DW
42bool wxStaticLine::Create(
43 wxWindow* pParent
44, wxWindowID vId
45, const wxPoint& rPos
46, const wxSize& rSize
47, long lStyle
48, const wxString& rsName
49)
a66ebb5b 50{
b9b1d6c8 51 wxSize vSize = AdjustSize(rSize);
3c299c3a 52
b9b1d6c8
DW
53 if ( !CreateControl( pParent
54 ,vId
55 ,rPos
56 ,vSize
57 ,lStyle
58 ,wxDefaultValidator
59 ,rsName
60 ))
a66ebb5b 61 return FALSE;
0fba44b4 62 if (!OS2CreateControl( wxT("STATIC")
70a2c656
DW
63 ,SS_FGNDFRAME
64 ,rPos
65 ,rSize
66 ,rsName
67 ))
68 return FALSE;
69
70 wxColour vColour;
71
0fba44b4 72 vColour.Set(wxString(wxT("GREY")));
70a2c656
DW
73
74 LONG lColor = (LONG)vColour.GetPixel();
75
76 ::WinSetPresParam( m_hWnd
77 ,PP_FOREGROUNDCOLOR
78 ,sizeof(LONG)
79 ,(PVOID)&lColor
80 );
81 return TRUE;
3c299c3a 82} // end of wxStaticLine::Create
a66ebb5b 83
b9b1d6c8
DW
84WXDWORD wxStaticLine::OS2GetStyle(
85 long lStyle
86, WXDWORD* pdwExstyle
87) const
88{
89 //
90 // We never have border
91 //
92 lStyle &= ~wxBORDER_MASK;
93 lStyle |= wxBORDER_NONE;
94
95 WXDWORD dwStyle = wxControl::OS2GetStyle( lStyle
96 ,pdwExstyle
97 );
98 //
99 // Add our default styles
100 //
101 return dwStyle | WS_CLIPSIBLINGS;
102}
3c299c3a 103#endif // wxUSE_STATLINE