Made the RTTI thing an option.
Added submenus to controls sample. Failed at producing tear-off menus. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -44,8 +44,6 @@
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern wxCursor g_globalCursor;
|
||||
|
||||
wxApp *wxTheApp = (wxApp *) NULL;
|
||||
wxAppInitializerFunction wxApp::m_appInitFn = (wxAppInitializerFunction) NULL;
|
||||
|
||||
@@ -577,9 +575,6 @@ bool wxApp::Initialize()
|
||||
|
||||
wxImage::InitStandardHandlers();
|
||||
|
||||
// Not needed, leave it as default. (KB)
|
||||
// g_globalCursor = wxCursor(wxCURSOR_DEFAULT);
|
||||
|
||||
wxModule::RegisterModules();
|
||||
if (!wxModule::InitializeModules()) return FALSE;
|
||||
|
||||
|
@@ -64,7 +64,7 @@ wxCursor::wxCursor( int cursorId )
|
||||
GdkCursorType gdk_cur = GDK_LEFT_PTR;
|
||||
switch (cursorId)
|
||||
{
|
||||
case wxCURSOR_DEFAULT: gdk_cur = GDK_ARROW; break;
|
||||
case wxCURSOR_DEFAULT: gdk_cur = GDK_LEFT_PTR; break;
|
||||
case wxCURSOR_HAND: gdk_cur = GDK_HAND1; break;
|
||||
case wxCURSOR_CROSS: gdk_cur = GDK_CROSSHAIR; break;
|
||||
case wxCURSOR_SIZEWE: gdk_cur = GDK_SB_H_DOUBLE_ARROW; break;
|
||||
|
@@ -218,9 +218,13 @@ void wxMenuBar::Append( wxMenu *menu, const wxString &title )
|
||||
entry.accelerator = (gchar*) NULL;
|
||||
entry.callback = (GtkItemFactoryCallback) NULL;
|
||||
entry.callback_action = 0;
|
||||
entry.item_type = (m_style & wxMB_TEAROFF || menu->GetStyle() &
|
||||
wxMENU_TEAROFF) ?
|
||||
"<Tearoff>" : "<Branch>";
|
||||
|
||||
/*
|
||||
if ((m_style & wxMB_TEAROFF) || (menu->GetStyle() & wxMENU_TEAROFF))
|
||||
entry.item_type = "<Tearoff>";
|
||||
else
|
||||
*/
|
||||
entry.item_type = "<Branch>";
|
||||
|
||||
gtk_item_factory_create_item( m_factory, &entry, (gpointer) this, 2 ); /* what is 2 ? */
|
||||
|
||||
@@ -236,6 +240,16 @@ void wxMenuBar::Append( wxMenu *menu, const wxString &title )
|
||||
|
||||
gtk_menu_item_set_submenu( GTK_MENU_ITEM(menu->m_owner), menu->m_menu );
|
||||
|
||||
/*
|
||||
if ((m_style & wxMB_TEAROFF) || (menu->GetStyle() & wxMENU_TEAROFF))
|
||||
{
|
||||
entry.item_type = "<Tearoff>";
|
||||
tmp.Remove( 0, 6 );
|
||||
tmp.Append( _T("/tearoff") );
|
||||
strcpy( buf, tmp.mb_str() );
|
||||
gtk_item_factory_create_item( m_factory, &entry, (gpointer) this, 2 );
|
||||
}
|
||||
*/
|
||||
#else
|
||||
|
||||
menu->m_owner = gtk_menu_item_new_with_label( str.mb_str() );
|
||||
@@ -845,7 +859,13 @@ void wxMenu::Append( int id, const wxString &item, wxMenu *subMenu, const wxStri
|
||||
entry.path = buf;
|
||||
entry.callback = (GtkItemFactoryCallback) 0;
|
||||
entry.callback_action = 0;
|
||||
entry.item_type = (m_style & wxMENU_TEAROFF) ? "<Tearoff>" : "<Branch>";
|
||||
|
||||
/*
|
||||
if (m_style & wxMENU_TEAROFF)
|
||||
entry.item_type = "<Tearoff>";
|
||||
else
|
||||
*/
|
||||
entry.item_type = "<Branch>";
|
||||
|
||||
gtk_item_factory_create_item( m_factory, &entry, (gpointer) this, 2 ); /* what is 2 ? */
|
||||
|
||||
|
Reference in New Issue
Block a user