]> git.saurik.com Git - wxWidgets.git/blame - src/mac/classic/statbox.cpp
[ 1563875 ] wxTreeCtrl::FindItem asserts when item not found
[wxWidgets.git] / src / mac / classic / statbox.cpp
CommitLineData
2646f485 1/////////////////////////////////////////////////////////////////////////////
18f3decb 2// Name: src/mac/classic/statbox.cpp
2646f485
SC
3// Purpose: wxStaticBox
4// Author: Stefan Csomor
5// Modified by:
6// Created: 1998-01-01
7// RCS-ID: $Id$
8// Copyright: (c) Stefan Csomor
18f3decb 9// Licence: wxWindows licence
2646f485
SC
10/////////////////////////////////////////////////////////////////////////////
11
18f3decb
WS
12#include "wx/wxprec.h"
13
14#ifdef __BORLANDC__
15 #pragma hdrstop
16#endif
2646f485
SC
17
18#include "wx/statbox.h"
19#include "wx/mac/uma.h"
20
2646f485
SC
21IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
22
23BEGIN_EVENT_TABLE(wxStaticBox, wxControl)
24 EVT_ERASE_BACKGROUND(wxStaticBox::OnEraseBackground)
25END_EVENT_TABLE()
26
2646f485
SC
27/*
28 * Static box
29 */
18f3decb 30
2646f485
SC
31bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
32 const wxString& label,
33 const wxPoint& pos,
34 const wxSize& size,
35 long style,
36 const wxString& name)
37{
38 if ( !wxControl::Create(parent, id, pos, size,
39 style, wxDefaultValidator, name) )
40 return false;
41
42 Rect bounds ;
43 Str255 title ;
18f3decb 44
2646f485 45 MacPreControlCreate( parent , id , label , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ;
18f3decb
WS
46
47 m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
2646f485 48 kControlGroupBoxTextTitleProc , (long) this ) ;
18f3decb 49
2646f485 50 MacPostControlCreate() ;
18f3decb
WS
51
52 return true;
2646f485 53}