// the parent window is known after wxFrame::SetMenu()
m_needParent = false;
m_style = style;
- m_invokingWindow = (wxWindow*) NULL;
+ m_invokingWindow = NULL;
- if (!PreCreation( (wxWindow*) NULL, wxDefaultPosition, wxDefaultSize ) ||
- !CreateBase( (wxWindow*) NULL, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("menubar") ))
+ if (!PreCreation( NULL, wxDefaultPosition, wxDefaultSize ) ||
+ !CreateBase( NULL, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("menubar") ))
{
wxFAIL_MSG( wxT("wxMenuBar creation failed") );
return;
static void wxMenubarUnsetInvokingWindow( wxMenu *menu, wxWindow *win )
{
- menu->SetInvokingWindow( (wxWindow*) NULL );
+ menu->SetInvokingWindow( NULL );
wxWindow *top_frame = win;
while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
void wxMenuBar::UnsetInvokingWindow( wxWindow *win )
{
- m_invokingWindow = (wxWindow*) NULL;
+ m_invokingWindow = NULL;
wxWindow *top_frame = win;
while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
top_frame = top_frame->GetParent();
wxMenu *menuOld = Remove(pos);
if ( menuOld && !Insert(pos, menu, title) )
{
- return (wxMenu*) NULL;
+ return NULL;
}
// either Insert() succeeded or Remove() failed and menuOld is NULL
{
wxMenu *menu = wxMenuBarBase::Remove(pos);
if ( !menu )
- return (wxMenu*) NULL;
+ return NULL;
gtk_menu_item_remove_submenu( GTK_MENU_ITEM(menu->m_owner) );
gtk_container_remove(GTK_CONTAINER(m_menubar), menu->m_owner);
if ( menuForItem )
{
- *menuForItem = result ? result->GetMenu() : (wxMenu *)NULL;
+ *menuForItem = result ? result->GetMenu() : NULL;
}
return result;
/* should find it for normal (not popup) menu */
wxASSERT_MSG( (id != -1) || (menu->GetInvokingWindow() != NULL),
- _T("menu item not found in gtk_menu_clicked_callback") );
+ wxT("menu item not found in gtk_menu_clicked_callback") );
if (!menu->IsEnabled(id))
return;
void wxMenuItem::Init()
{
- m_labelWidget = (GtkWidget *) NULL;
- m_menuItem = (GtkWidget *) NULL;
+ m_labelWidget = NULL;
+ m_menuItem = NULL;
DoSetText(m_text);
}
if ( !GetHotKey() )
{
// nothing
- return (wxAcceleratorEntry *)NULL;
+ return NULL;
}
// accelerator parsing code looks for them after a TAB, so insert a dummy
break;
default:
- wxFAIL_MSG( _T("can't check this item") );
+ wxFAIL_MSG( wxT("can't check this item") );
}
}
// our back by GTK+ e.g. when it is removed from menubar:
gtk_widget_ref(m_menu);
- m_owner = (GtkWidget*) NULL;
+ m_owner = NULL;
// Tearoffs are entries, just like separators. So if we want this
// menu to be a tear-off one, we just append a tearoff entry
}
default:
- wxFAIL_MSG( _T("unexpected menu item kind") );
+ wxFAIL_MSG( wxT("unexpected menu item kind") );
// fall through
case wxITEM_NORMAL:
wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)
{
if ( !wxMenuBase::DoRemove(item) )
- return (wxMenuItem *)NULL;
+ return NULL;
// TODO: this code doesn't delete the item factory item and this seems
// impossible as of GTK 1.2.6.
gtk_menu_popup(
GTK_MENU(menu->m_menu),
- (GtkWidget *) NULL, // parent menu shell
- (GtkWidget *) NULL, // parent menu item
+ NULL, // parent menu shell
+ NULL, // parent menu item
posfunc, // function to position it
userdata, // client data
0, // button used to activate it