summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9af175d)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12112
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
#endif
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
#endif
-short nextMenuId = 100 ; // wxMenu takes the lower ids
+extern MenuHandle NewUniqueMenu() ;
m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , -12345 , 0 ,
kControlPopupButtonProc + kControlPopupFixedWidthVariant , (long) this ) ;
m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , -12345 , 0 ,
kControlPopupButtonProc + kControlPopupFixedWidthVariant , (long) this ) ;
- m_macPopUpMenuHandle = NewMenu( 1 , "\pPopUp Menu" ) ;
+ m_macPopUpMenuHandle = NewUniqueMenu() ;
SetControlData( m_macControl , kControlNoPart , kControlPopupButtonMenuHandleTag , sizeof( MenuHandle ) , (char*) &m_macPopUpMenuHandle) ;
SetControlMinimum( m_macControl , 0 ) ;
SetControlMaximum( m_macControl , 0) ;
SetControlData( m_macControl , kControlNoPart , kControlPopupButtonMenuHandleTag , sizeof( MenuHandle ) , (char*) &m_macPopUpMenuHandle) ;
SetControlMinimum( m_macControl , 0 ) ;
SetControlMaximum( m_macControl , 0) ;
// right now we don't support editable comboboxes
// right now we don't support editable comboboxes
+static nextPopUpMenuId = 1000 ;
+MenuHandle NewUniqueMenu()
+{
+ MenuHandle handle = NewMenu( nextPopUpMenuId , "\pMenu" ) ;
+ nextPopUpMenuId++ ;
+ return handle ;
+}
bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
const wxString& value,
bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
const wxString& value,
m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , -12345 , 0,
kControlPopupButtonProc , (long) this ) ;
m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , -12345 , 0,
kControlPopupButtonProc , (long) this ) ;
- m_macPopUpMenuHandle = NewMenu( 1 , "\pPopUp Menu" ) ;
+ m_macPopUpMenuHandle = NewUniqueMenu() ;
SetControlData( m_macControl , kControlNoPart , kControlPopupButtonMenuHandleTag , sizeof( MenuHandle ) , (char*) &m_macPopUpMenuHandle) ;
for ( int i = 0 ; i < n ; i++ )
{
SetControlData( m_macControl , kControlNoPart , kControlPopupButtonMenuHandleTag , sizeof( MenuHandle ) , (char*) &m_macPopUpMenuHandle) ;
for ( int i = 0 ; i < n ; i++ )
{
if ( event.m_metaDown )
modifiers |= cmdKey ;
if ( event.m_metaDown )
modifiers |= cmdKey ;
-
-// controlpart = FindControl( localwhere , window , &control ) ;
control = FindControlUnderMouse( localwhere , window , &controlpart ) ;
control = FindControlUnderMouse( localwhere , window , &controlpart ) ;
+#else
+// control = FindControlUnderMouse( localwhere , window , &controlpart ) ;
+ controlpart = FindControl( localwhere , window , &control ) ;
+#endif
{
/*
if ( AcceptsFocus() && FindFocus() != this )
{
/*
if ( AcceptsFocus() && FindFocus() != this )
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
#endif
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
#endif
-short nextMenuId = 100 ; // wxMenu takes the lower ids
+extern MenuHandle NewUniqueMenu() ;
m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , -12345 , 0 ,
kControlPopupButtonProc + kControlPopupFixedWidthVariant , (long) this ) ;
m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , -12345 , 0 ,
kControlPopupButtonProc + kControlPopupFixedWidthVariant , (long) this ) ;
- m_macPopUpMenuHandle = NewMenu( 1 , "\pPopUp Menu" ) ;
+ m_macPopUpMenuHandle = NewUniqueMenu() ;
SetControlData( m_macControl , kControlNoPart , kControlPopupButtonMenuHandleTag , sizeof( MenuHandle ) , (char*) &m_macPopUpMenuHandle) ;
SetControlMinimum( m_macControl , 0 ) ;
SetControlMaximum( m_macControl , 0) ;
SetControlData( m_macControl , kControlNoPart , kControlPopupButtonMenuHandleTag , sizeof( MenuHandle ) , (char*) &m_macPopUpMenuHandle) ;
SetControlMinimum( m_macControl , 0 ) ;
SetControlMaximum( m_macControl , 0) ;
// right now we don't support editable comboboxes
// right now we don't support editable comboboxes
+static nextPopUpMenuId = 1000 ;
+MenuHandle NewUniqueMenu()
+{
+ MenuHandle handle = NewMenu( nextPopUpMenuId , "\pMenu" ) ;
+ nextPopUpMenuId++ ;
+ return handle ;
+}
bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
const wxString& value,
bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
const wxString& value,
m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , -12345 , 0,
kControlPopupButtonProc , (long) this ) ;
m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , -12345 , 0,
kControlPopupButtonProc , (long) this ) ;
- m_macPopUpMenuHandle = NewMenu( 1 , "\pPopUp Menu" ) ;
+ m_macPopUpMenuHandle = NewUniqueMenu() ;
SetControlData( m_macControl , kControlNoPart , kControlPopupButtonMenuHandleTag , sizeof( MenuHandle ) , (char*) &m_macPopUpMenuHandle) ;
for ( int i = 0 ; i < n ; i++ )
{
SetControlData( m_macControl , kControlNoPart , kControlPopupButtonMenuHandleTag , sizeof( MenuHandle ) , (char*) &m_macPopUpMenuHandle) ;
for ( int i = 0 ; i < n ; i++ )
{
if ( event.m_metaDown )
modifiers |= cmdKey ;
if ( event.m_metaDown )
modifiers |= cmdKey ;
-
-// controlpart = FindControl( localwhere , window , &control ) ;
control = FindControlUnderMouse( localwhere , window , &controlpart ) ;
control = FindControlUnderMouse( localwhere , window , &controlpart ) ;
+#else
+// control = FindControlUnderMouse( localwhere , window , &controlpart ) ;
+ controlpart = FindControl( localwhere , window , &control ) ;
+#endif
{
/*
if ( AcceptsFocus() && FindFocus() != this )
{
/*
if ( AcceptsFocus() && FindFocus() != this )