]> git.saurik.com Git - wxWidgets.git/blob - src/mac/carbon/statlmac.cpp
cleanup - added some error checking, reformatting
[wxWidgets.git] / src / mac / carbon / statlmac.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: generic/statline.cpp
3 // Purpose: a generic 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
19 // For compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
21
22 #if wxUSE_STATLINE
23
24 #ifdef __BORLANDC__
25 #pragma hdrstop
26 #endif
27
28 #include "wx/statline.h"
29 #include "wx/statbox.h"
30
31 #include "wx/mac/uma.h"
32
33 // ============================================================================
34 // implementation
35 // ============================================================================
36
37 IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
38
39 // ----------------------------------------------------------------------------
40 // wxStaticLine
41 // ----------------------------------------------------------------------------
42
43 bool wxStaticLine::Create( wxWindow *parent,
44 wxWindowID id,
45 const wxPoint &pos,
46 const wxSize &size,
47 long style,
48 const wxString &name)
49 {
50 m_macIsUserPane = FALSE ;
51
52 if ( !wxStaticLineBase::Create(parent, id, pos, size,
53 style, wxDefaultValidator, name) )
54 return false;
55
56 Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
57 m_peer = new wxMacControl(this) ;
58 verify_noerr(CreateSeparatorControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, m_peer->GetControlRefAddr() ) ) ;
59
60 MacPostControlCreate(pos,size) ;
61
62 return TRUE;
63 }
64
65 #endif //wxUSE_STATLINE