]> git.saurik.com Git - wxWidgets.git/blame - src/os2/statline.cpp
Remove SashHitTest() "tolerance" parameter
[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
a66ebb5b
DW
36// ----------------------------------------------------------------------------
37// wxStaticLine
38// ----------------------------------------------------------------------------
39
3c299c3a
DW
40bool wxStaticLine::Create(
41 wxWindow* pParent
42, wxWindowID vId
43, const wxPoint& rPos
44, const wxSize& rSize
45, long lStyle
46, const wxString& rsName
47)
a66ebb5b 48{
b9b1d6c8 49 wxSize vSize = AdjustSize(rSize);
3c299c3a 50
b9b1d6c8
DW
51 if ( !CreateControl( pParent
52 ,vId
53 ,rPos
54 ,vSize
55 ,lStyle
56 ,wxDefaultValidator
57 ,rsName
58 ))
a66ebb5b 59 return FALSE;
0fba44b4 60 if (!OS2CreateControl( wxT("STATIC")
70a2c656
DW
61 ,SS_FGNDFRAME
62 ,rPos
63 ,rSize
64 ,rsName
65 ))
66 return FALSE;
67
68 wxColour vColour;
69
0fba44b4 70 vColour.Set(wxString(wxT("GREY")));
70a2c656
DW
71
72 LONG lColor = (LONG)vColour.GetPixel();
73
74 ::WinSetPresParam( m_hWnd
75 ,PP_FOREGROUNDCOLOR
76 ,sizeof(LONG)
77 ,(PVOID)&lColor
78 );
79 return TRUE;
3c299c3a 80} // end of wxStaticLine::Create
a66ebb5b 81
b9b1d6c8
DW
82WXDWORD wxStaticLine::OS2GetStyle(
83 long lStyle
84, WXDWORD* pdwExstyle
85) const
86{
87 //
88 // We never have border
89 //
90 lStyle &= ~wxBORDER_MASK;
91 lStyle |= wxBORDER_NONE;
92
93 WXDWORD dwStyle = wxControl::OS2GetStyle( lStyle
94 ,pdwExstyle
95 );
96 //
97 // Add our default styles
98 //
99 return dwStyle | WS_CLIPSIBLINGS;
100}
3c299c3a 101#endif // wxUSE_STATLINE