Files
wxWidgets/src/mac/carbon/statbox.cpp
Stefan Csomor b905d6cc08 adding a peer pointing back to wxWindow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-23 15:46:03 +00:00

57 lines
1.4 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: statbox.cpp
// Purpose: wxStaticBox
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "statbox.h"
#endif
#include "wx/wxprec.h"
#if wxUSE_STATBOX
#include "wx/statbox.h"
#include "wx/mac/uma.h"
#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
#endif
/*
* Static box
*/
bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name)
{
m_macIsUserPane = FALSE ;
if ( !wxControl::Create(parent, id, pos, size,
style, wxDefaultValidator, name) )
return false;
m_label = label ;
Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
m_peer = new wxMacControl(this) ;
verify_noerr(CreateGroupBoxControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, CFSTR("") ,
true /*primary*/ , m_peer->GetControlRefAddr() ) ) ;
MacPostControlCreate(pos,size) ;
return TRUE;
}
#endif