1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/gtk/tbargtk.cpp
3 // Purpose: GTK toolbar
4 // Author: Robert Roebling
5 // Modified: 13.12.99 by VZ to derive from wxToolBarBase
7 // Copyright: (c) Robert Roebling
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
14 #if wxUSE_TOOLBAR_NATIVE
16 #include "wx/toolbar.h"
18 #include "wx/gtk/private.h"
20 // ----------------------------------------------------------------------------
22 // ----------------------------------------------------------------------------
25 extern bool g_blockEventsOnDrag
;
26 extern wxCursor g_globalCursor
;
28 // ----------------------------------------------------------------------------
30 // ----------------------------------------------------------------------------
32 class wxToolBarTool
: public wxToolBarToolBase
35 wxToolBarTool(wxToolBar
*tbar
,
37 const wxString
& label
,
38 const wxBitmap
& bitmap1
,
39 const wxBitmap
& bitmap2
,
42 const wxString
& shortHelpString
,
43 const wxString
& longHelpString
)
44 : wxToolBarToolBase(tbar
, id
, label
, bitmap1
, bitmap2
, kind
,
45 clientData
, shortHelpString
, longHelpString
)
50 wxToolBarTool(wxToolBar
*tbar
, wxControl
*control
, const wxString
& label
)
51 : wxToolBarToolBase(tbar
, control
, label
)
54 // Hold a reference to keep control alive until DoInsertTool() is
55 // called, or if RemoveTool() is called (see DoDeleteTool)
56 g_object_ref(control
->m_widget
);
57 // release reference when gtk_widget_destroy() is called on control
59 control
->m_widget
, "destroy", G_CALLBACK(g_object_unref
), NULL
);
63 void CreateDropDown();
64 void ShowDropdown(GtkToggleButton
* button
);
69 // ----------------------------------------------------------------------------
71 // ----------------------------------------------------------------------------
73 IMPLEMENT_DYNAMIC_CLASS(wxToolBar
, wxControl
)
75 // ============================================================================
77 // ============================================================================
79 //-----------------------------------------------------------------------------
80 // "clicked" from m_item
81 //-----------------------------------------------------------------------------
84 static void item_clicked(GtkToolButton
*, wxToolBarTool
* tool
)
86 if (g_blockEventsOnDrag
) return;
88 tool
->GetToolBar()->OnLeftClick(tool
->GetId(), false);
92 //-----------------------------------------------------------------------------
93 // "toggled" from m_item
94 //-----------------------------------------------------------------------------
97 static void item_toggled(GtkToggleToolButton
* button
, wxToolBarTool
* tool
)
99 if (g_blockEventsOnDrag
) return;
101 const bool active
= gtk_toggle_tool_button_get_active(button
) != 0;
102 tool
->Toggle(active
);
103 if (!active
&& tool
->GetKind() == wxITEM_RADIO
)
106 if (!tool
->GetToolBar()->OnLeftClick(tool
->GetId(), active
))
114 //-----------------------------------------------------------------------------
115 // "button_press_event" from m_item child
116 //-----------------------------------------------------------------------------
120 button_press_event(GtkWidget
*, GdkEventButton
* event
, wxToolBarTool
* tool
)
122 if (event
->button
!= 3)
125 if (g_blockEventsOnDrag
) return TRUE
;
127 tool
->GetToolBar()->OnRightClick(
128 tool
->GetId(), int(event
->x
), int(event
->y
));
134 //-----------------------------------------------------------------------------
135 // "child_detached" from m_widget
136 //-----------------------------------------------------------------------------
139 static void child_detached(GtkWidget
*, GtkToolbar
* toolbar
, void*)
141 // disable showing overflow arrow when toolbar is detached,
142 // otherwise toolbar collapses to just an arrow
143 gtk_toolbar_set_show_arrow(toolbar
, false);
147 //-----------------------------------------------------------------------------
148 // "child_attached" from m_widget
149 //-----------------------------------------------------------------------------
152 static void child_attached(GtkWidget
*, GtkToolbar
* toolbar
, void*)
154 gtk_toolbar_set_show_arrow(toolbar
, true);
158 //-----------------------------------------------------------------------------
159 // "enter_notify_event" / "leave_notify_event" from m_item
160 //-----------------------------------------------------------------------------
164 enter_notify_event(GtkWidget
*, GdkEventCrossing
* event
, wxToolBarTool
* tool
)
166 if (g_blockEventsOnDrag
) return TRUE
;
169 if (event
->type
== GDK_ENTER_NOTIFY
)
171 tool
->GetToolBar()->OnMouseEnter(id
);
177 //-----------------------------------------------------------------------------
178 // "size_request" from m_toolbar
179 //-----------------------------------------------------------------------------
183 size_request(GtkWidget
*, GtkRequisition
* req
, wxToolBar
* win
)
185 const wxSize margins
= win
->GetMargins();
186 req
->width
+= margins
.x
;
187 req
->height
+= 2 * margins
.y
;
191 //-----------------------------------------------------------------------------
192 // "expose_event" from GtkImage inside m_item
193 //-----------------------------------------------------------------------------
197 image_expose_event(GtkWidget
* widget
, GdkEventExpose
*, wxToolBarTool
* tool
)
199 const wxBitmap
& bitmap
= tool
->GetDisabledBitmap();
200 if (tool
->IsEnabled() || !bitmap
.IsOk())
203 // draw disabled bitmap ourselves, GtkImage has no way to specify it
204 const GtkAllocation
& alloc
= widget
->allocation
;
206 widget
->window
, widget
->style
->black_gc
, bitmap
.GetPixbuf(),
208 alloc
.x
+ (alloc
.width
- widget
->requisition
.width
) / 2,
209 alloc
.y
+ (alloc
.height
- widget
->requisition
.height
) / 2,
210 -1, -1, GDK_RGB_DITHER_NORMAL
, 0, 0);
215 //-----------------------------------------------------------------------------
216 // "toggled" from dropdown menu button
217 //-----------------------------------------------------------------------------
220 static void arrow_toggled(GtkToggleButton
* button
, wxToolBarTool
* tool
)
222 if (gtk_toggle_button_get_active(button
))
224 tool
->ShowDropdown(button
);
225 gtk_toggle_button_set_active(button
, false);
230 //-----------------------------------------------------------------------------
231 // "button_press_event" from dropdown menu button
232 //-----------------------------------------------------------------------------
236 arrow_button_press_event(GtkToggleButton
* button
, GdkEventButton
* event
, wxToolBarTool
* tool
)
238 if (event
->button
== 1)
240 g_signal_handlers_block_by_func(button
, (void*)arrow_toggled
, tool
);
241 gtk_toggle_button_set_active(button
, true);
242 tool
->ShowDropdown(button
);
243 gtk_toggle_button_set_active(button
, false);
244 g_signal_handlers_unblock_by_func(button
, (void*)arrow_toggled
, tool
);
251 //-----------------------------------------------------------------------------
252 // InsertChild callback for wxToolBar
253 //-----------------------------------------------------------------------------
255 static void wxInsertChildInToolBar(wxWindow
* parent
, wxWindow
* child
)
257 GtkWidget
* align
= gtk_alignment_new(0.5, 0.5, 0, 0);
258 gtk_widget_show(align
);
259 gtk_container_add(GTK_CONTAINER(align
), child
->m_widget
);
260 GtkToolItem
* item
= gtk_tool_item_new();
261 gtk_container_add(GTK_CONTAINER(item
), align
);
262 wxToolBar
* tbar
= static_cast<wxToolBar
*>(parent
);
263 // position will be corrected in DoInsertTool if necessary
264 gtk_toolbar_insert(GTK_TOOLBAR(GTK_BIN(tbar
->m_widget
)->child
), item
, -1);
267 // ----------------------------------------------------------------------------
269 // ----------------------------------------------------------------------------
271 void wxToolBarTool::SetImage()
273 const wxBitmap
& bitmap
= GetNormalBitmap();
274 wxCHECK_RET(bitmap
.IsOk(), "invalid bitmap for wxToolBar icon");
276 GtkWidget
* image
= gtk_tool_button_get_icon_widget(GTK_TOOL_BUTTON(m_item
));
277 // always use pixbuf, because pixmap mask does not
278 // work with disabled images in some themes
279 gtk_image_set_from_pixbuf(GTK_IMAGE(image
), bitmap
.GetPixbuf());
282 // helper to create a dropdown menu item
283 void wxToolBarTool::CreateDropDown()
285 gtk_tool_item_set_homogeneous(m_item
, false);
288 if (GetToolBar()->HasFlag(wxTB_LEFT
| wxTB_RIGHT
))
290 box
= gtk_vbox_new(false, 0);
291 arrow
= gtk_arrow_new(GTK_ARROW_RIGHT
, GTK_SHADOW_NONE
);
295 box
= gtk_hbox_new(false, 0);
296 arrow
= gtk_arrow_new(GTK_ARROW_DOWN
, GTK_SHADOW_NONE
);
298 GtkWidget
* tool_button
= GTK_BIN(m_item
)->child
;
299 gtk_widget_reparent(tool_button
, box
);
300 GtkWidget
* arrow_button
= gtk_toggle_button_new();
301 gtk_button_set_relief(GTK_BUTTON(arrow_button
),
302 gtk_tool_item_get_relief_style(GTK_TOOL_ITEM(m_item
)));
303 gtk_container_add(GTK_CONTAINER(arrow_button
), arrow
);
304 gtk_container_add(GTK_CONTAINER(box
), arrow_button
);
305 gtk_widget_show_all(box
);
306 gtk_container_add(GTK_CONTAINER(m_item
), box
);
308 g_signal_connect(arrow_button
, "toggled", G_CALLBACK(arrow_toggled
), this);
309 g_signal_connect(arrow_button
, "button_press_event",
310 G_CALLBACK(arrow_button_press_event
), this);
313 void wxToolBarTool::ShowDropdown(GtkToggleButton
* button
)
315 wxToolBarBase
* toolbar
= GetToolBar();
316 wxCommandEvent
event(wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED
, GetId());
317 if (!toolbar
->HandleWindowEvent(event
))
319 wxMenu
* menu
= GetDropdownMenu();
322 const GtkAllocation
& alloc
= GTK_WIDGET(button
)->allocation
;
325 if (toolbar
->HasFlag(wxTB_LEFT
| wxTB_RIGHT
))
329 toolbar
->PopupMenu(menu
, x
, y
);
334 wxToolBarToolBase
*wxToolBar::CreateTool(int id
,
335 const wxString
& text
,
336 const wxBitmap
& bitmap1
,
337 const wxBitmap
& bitmap2
,
339 wxObject
*clientData
,
340 const wxString
& shortHelpString
,
341 const wxString
& longHelpString
)
343 return new wxToolBarTool(this, id
, text
, bitmap1
, bitmap2
, kind
,
344 clientData
, shortHelpString
, longHelpString
);
348 wxToolBar::CreateTool(wxControl
*control
, const wxString
& label
)
350 return new wxToolBarTool(this, control
, label
);
353 //-----------------------------------------------------------------------------
354 // wxToolBar construction
355 //-----------------------------------------------------------------------------
357 void wxToolBar::Init()
359 m_toolbar
= (GtkToolbar
*)NULL
;
363 wxToolBar::~wxToolBar()
367 gtk_object_destroy(GTK_OBJECT(m_tooltips
));
368 g_object_unref(m_tooltips
);
372 bool wxToolBar::Create( wxWindow
*parent
,
377 const wxString
& name
)
379 m_insertCallback
= wxInsertChildInToolBar
;
381 if ( !PreCreation( parent
, pos
, size
) ||
382 !CreateBase( parent
, id
, pos
, size
, style
, wxDefaultValidator
, name
))
384 wxFAIL_MSG( wxT("wxToolBar creation failed") );
391 m_toolbar
= GTK_TOOLBAR( gtk_toolbar_new() );
392 m_tooltips
= gtk_tooltips_new();
393 g_object_ref(m_tooltips
);
394 gtk_object_sink(GTK_OBJECT(m_tooltips
));
397 if (style
& wxTB_DOCKABLE
)
399 m_widget
= gtk_handle_box_new();
401 g_signal_connect(m_widget
, "child_detached",
402 G_CALLBACK(child_detached
), NULL
);
403 g_signal_connect(m_widget
, "child_attached",
404 G_CALLBACK(child_attached
), NULL
);
406 if (style
& wxTB_FLAT
)
407 gtk_handle_box_set_shadow_type( GTK_HANDLE_BOX(m_widget
), GTK_SHADOW_NONE
);
411 m_widget
= gtk_event_box_new();
412 ConnectWidget( m_widget
);
414 gtk_container_add(GTK_CONTAINER(m_widget
), GTK_WIDGET(m_toolbar
));
415 gtk_widget_show(GTK_WIDGET(m_toolbar
));
417 m_parent
->DoAddChild( this );
421 g_signal_connect_after(m_toolbar
, "size_request",
422 G_CALLBACK(size_request
), this);
427 GdkWindow
*wxToolBar::GTKGetWindow(wxArrayGdkWindows
& WXUNUSED(windows
)) const
429 return GTK_WIDGET(m_toolbar
)->window
;
432 void wxToolBar::GtkSetStyle()
434 GtkOrientation orient
= GTK_ORIENTATION_HORIZONTAL
;
435 if (HasFlag(wxTB_LEFT
| wxTB_RIGHT
))
436 orient
= GTK_ORIENTATION_VERTICAL
;
438 GtkToolbarStyle style
= GTK_TOOLBAR_ICONS
;
439 if (HasFlag(wxTB_NOICONS
))
440 style
= GTK_TOOLBAR_TEXT
;
441 else if (HasFlag(wxTB_TEXT
))
443 style
= GTK_TOOLBAR_BOTH
;
444 if (HasFlag(wxTB_HORZ_LAYOUT
))
445 style
= GTK_TOOLBAR_BOTH_HORIZ
;
448 gtk_toolbar_set_orientation(m_toolbar
, orient
);
449 gtk_toolbar_set_style(m_toolbar
, style
);
452 void wxToolBar::SetWindowStyleFlag( long style
)
454 wxToolBarBase::SetWindowStyleFlag(style
);
460 bool wxToolBar::DoInsertTool(size_t pos
, wxToolBarToolBase
*toolBase
)
462 wxToolBarTool
* tool
= wx_static_cast(wxToolBarTool
*, toolBase
);
465 switch ( tool
->GetStyle() )
467 case wxTOOL_STYLE_BUTTON
:
468 switch (tool
->GetKind())
471 tool
->m_item
= gtk_toggle_tool_button_new();
472 g_signal_connect(tool
->m_item
, "toggled",
473 G_CALLBACK(item_toggled
), tool
);
476 radioGroup
= GetRadioGroup(pos
);
479 // this is the first button in the radio button group,
480 // it will be toggled automatically by GTK so bring the
481 // internal flag in sync
484 tool
->m_item
= gtk_radio_tool_button_new(radioGroup
);
485 g_signal_connect(tool
->m_item
, "toggled",
486 G_CALLBACK(item_toggled
), tool
);
489 wxFAIL_MSG("unknown toolbar child type");
491 case wxITEM_DROPDOWN
:
493 tool
->m_item
= gtk_tool_button_new(NULL
, "");
494 g_signal_connect(tool
->m_item
, "clicked",
495 G_CALLBACK(item_clicked
), tool
);
498 if (!HasFlag(wxTB_NOICONS
))
500 GtkWidget
* image
= gtk_image_new();
501 gtk_tool_button_set_icon_widget(
502 GTK_TOOL_BUTTON(tool
->m_item
), image
);
504 gtk_widget_show(image
);
505 g_signal_connect(image
, "expose_event",
506 G_CALLBACK(image_expose_event
), tool
);
508 if (!tool
->GetLabel().empty())
510 gtk_tool_button_set_label(
511 GTK_TOOL_BUTTON(tool
->m_item
), wxGTK_CONV(tool
->GetLabel()));
512 // needed for labels in horizontal toolbar with wxTB_HORZ_LAYOUT
513 gtk_tool_item_set_is_important(tool
->m_item
, true);
515 if (!HasFlag(wxTB_NO_TOOLTIPS
) && !tool
->GetShortHelp().empty())
517 gtk_tool_item_set_tooltip(tool
->m_item
,
518 m_tooltips
, wxGTK_CONV(tool
->GetShortHelp()), "");
520 g_signal_connect(GTK_BIN(tool
->m_item
)->child
, "button_press_event",
521 G_CALLBACK(button_press_event
), tool
);
522 g_signal_connect(tool
->m_item
, "enter_notify_event",
523 G_CALLBACK(enter_notify_event
), tool
);
524 g_signal_connect(tool
->m_item
, "leave_notify_event",
525 G_CALLBACK(enter_notify_event
), tool
);
527 if (tool
->GetKind() == wxITEM_DROPDOWN
)
528 tool
->CreateDropDown();
529 gtk_toolbar_insert(m_toolbar
, tool
->m_item
, int(pos
));
532 case wxTOOL_STYLE_SEPARATOR
:
533 tool
->m_item
= gtk_separator_tool_item_new();
534 gtk_toolbar_insert(m_toolbar
, tool
->m_item
, int(pos
));
537 case wxTOOL_STYLE_CONTROL
:
538 wxWindow
* control
= tool
->GetControl();
539 if (control
->m_widget
->parent
== NULL
)
540 wxInsertChildInToolBar(this, control
);
541 tool
->m_item
= GTK_TOOL_ITEM(control
->m_widget
->parent
->parent
);
542 if (gtk_toolbar_get_item_index(m_toolbar
, tool
->m_item
) != int(pos
))
544 g_object_ref(tool
->m_item
);
545 gtk_container_remove(
546 GTK_CONTAINER(m_toolbar
), GTK_WIDGET(tool
->m_item
));
547 gtk_toolbar_insert(m_toolbar
, tool
->m_item
, int(pos
));
548 g_object_unref(tool
->m_item
);
550 // Inserted items "slide" into place using an animated effect that
551 // causes multiple size events on the item. Must set size request
552 // to keep item size from getting permanently set too small by the
553 // first of these size events.
554 const wxSize size
= control
->GetSize();
555 gtk_widget_set_size_request(control
->m_widget
, size
.x
, size
.y
);
558 gtk_widget_show(GTK_WIDGET(tool
->m_item
));
560 InvalidateBestSize();
565 bool wxToolBar::DoDeleteTool(size_t /* pos */, wxToolBarToolBase
* toolBase
)
567 wxToolBarTool
* tool
= wx_static_cast(wxToolBarTool
*, toolBase
);
569 if (tool
->GetStyle() == wxTOOL_STYLE_CONTROL
)
571 // don't destroy the control here as we can be called from
572 // RemoveTool() and then we need to keep the control alive;
573 // while if we're called from DeleteTool() the control will
574 // be destroyed when wxToolBarToolBase itself is deleted
575 GtkWidget
* widget
= tool
->GetControl()->m_widget
;
576 gtk_container_remove(GTK_CONTAINER(widget
->parent
), widget
);
578 gtk_object_destroy(GTK_OBJECT(tool
->m_item
));
581 InvalidateBestSize();
585 GSList
* wxToolBar::GetRadioGroup(size_t pos
)
587 GSList
* radioGroup
= NULL
;
588 GtkToolItem
* item
= NULL
;
591 item
= gtk_toolbar_get_nth_item(m_toolbar
, int(pos
) - 1);
592 if (!GTK_IS_RADIO_TOOL_BUTTON(item
))
595 if (item
== NULL
&& pos
< m_tools
.size())
597 item
= gtk_toolbar_get_nth_item(m_toolbar
, int(pos
));
598 if (!GTK_IS_RADIO_TOOL_BUTTON(item
))
602 radioGroup
= gtk_radio_tool_button_get_group((GtkRadioToolButton
*)item
);
606 // ----------------------------------------------------------------------------
607 // wxToolBar tools state
608 // ----------------------------------------------------------------------------
610 void wxToolBar::DoEnableTool(wxToolBarToolBase
*toolBase
, bool enable
)
612 wxToolBarTool
* tool
= wx_static_cast(wxToolBarTool
*, toolBase
);
615 gtk_widget_set_sensitive(GTK_WIDGET(tool
->m_item
), enable
);
618 void wxToolBar::DoToggleTool( wxToolBarToolBase
*toolBase
, bool toggle
)
620 wxToolBarTool
* tool
= wx_static_cast(wxToolBarTool
*, toolBase
);
624 g_signal_handlers_block_by_func(tool
->m_item
, (void*)item_toggled
, tool
);
626 gtk_toggle_tool_button_set_active(
627 GTK_TOGGLE_TOOL_BUTTON(tool
->m_item
), toggle
);
629 g_signal_handlers_unblock_by_func(tool
->m_item
, (void*)item_toggled
, tool
);
633 void wxToolBar::DoSetToggle(wxToolBarToolBase
* WXUNUSED(tool
),
634 bool WXUNUSED(toggle
))
636 // VZ: absolutely no idea about how to do it
637 wxFAIL_MSG( _T("not implemented") );
640 // ----------------------------------------------------------------------------
641 // wxToolBar geometry
642 // ----------------------------------------------------------------------------
644 wxSize
wxToolBar::DoGetBestSize() const
646 // Unfortunately, if overflow arrow is enabled GtkToolbar only reports size
647 // of arrow. To get the real size, the arrow is temporarily disabled here.
648 // This is gross, since it will cause a queue_resize, and could potentially
649 // lead to an infinite loop. But there seems to be no alternative, short of
650 // disabling the arrow entirely.
651 gtk_toolbar_set_show_arrow(m_toolbar
, false);
652 const wxSize size
= wxToolBarBase::DoGetBestSize();
653 gtk_toolbar_set_show_arrow(m_toolbar
, true);
657 wxToolBarToolBase
*wxToolBar::FindToolForPosition(wxCoord
WXUNUSED(x
),
658 wxCoord
WXUNUSED(y
)) const
660 // VZ: GTK+ doesn't seem to have such thing
661 wxFAIL_MSG( _T("wxToolBar::FindToolForPosition() not implemented") );
663 return (wxToolBarToolBase
*)NULL
;
666 void wxToolBar::SetToolShortHelp( int id
, const wxString
& helpString
)
668 wxToolBarTool
* tool
= wx_static_cast(wxToolBarTool
*, FindById(id
));
672 (void)tool
->SetShortHelp(helpString
);
675 gtk_tool_item_set_tooltip(tool
->m_item
,
676 m_tooltips
, wxGTK_CONV(helpString
), "");
681 void wxToolBar::SetToolNormalBitmap( int id
, const wxBitmap
& bitmap
)
683 wxToolBarTool
* tool
= wx_static_cast(wxToolBarTool
*, FindById(id
));
686 wxCHECK_RET( tool
->IsButton(), wxT("Can only set bitmap on button tools."));
688 tool
->SetNormalBitmap(bitmap
);
693 void wxToolBar::SetToolDisabledBitmap( int id
, const wxBitmap
& bitmap
)
695 wxToolBarTool
* tool
= wx_static_cast(wxToolBarTool
*, FindById(id
));
698 wxCHECK_RET( tool
->IsButton(), wxT("Can only set bitmap on button tools."));
700 tool
->SetDisabledBitmap(bitmap
);
704 // ----------------------------------------------------------------------------
705 // wxToolBar idle handling
706 // ----------------------------------------------------------------------------
708 void wxToolBar::OnInternalIdle()
710 // Check if we have to show window now
711 if (GtkShowFromOnIdle()) return;
713 wxCursor cursor
= m_cursor
;
714 if (g_globalCursor
.Ok()) cursor
= g_globalCursor
;
718 /* I now set the cursor the anew in every OnInternalIdle call
719 as setting the cursor in a parent window also effects the
720 windows above so that checking for the current cursor is
723 if (HasFlag(wxTB_DOCKABLE
) && (m_widget
->window
))
725 /* if the toolbar is dockable, then m_widget stands for the
726 GtkHandleBox widget, which uses its own window so that we
727 can set the cursor for it. if the toolbar is not dockable,
728 m_widget comes from m_toolbar which uses its parent's
729 window ("windowless windows") and thus we cannot set the
731 gdk_window_set_cursor( m_widget
->window
, cursor
.GetCursor() );
734 wxToolBarToolsList::compatibility_iterator node
= m_tools
.GetFirst();
737 wxToolBarTool
*tool
= (wxToolBarTool
*)node
->GetData();
738 node
= node
->GetNext();
742 GdkWindow
* window
= GTK_WIDGET(tool
->m_item
)->window
;
746 gdk_window_set_cursor( window
, cursor
.GetCursor() );
752 if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
753 UpdateWindowUI(wxUPDATE_UI_FROMIDLE
);
757 // ----------------------------------------------------------------------------
761 wxToolBar::GetClassDefaultAttributes(wxWindowVariant
WXUNUSED(variant
))
763 return GetDefaultAttributesFromGTKWidget(gtk_toolbar_new
);
766 #endif // wxUSE_TOOLBAR_NATIVE