+/* Respond by getting the
+ * designated "default button" in the action area and activate it
+ * as if the user had selected it.
+ */
+void wxListBoxDefaultActionProc (Widget list_w, XtPointer client_data, XmListCallbackStruct * cbs)
+{
+ wxListBox *lbox = (wxListBox *) client_data;
+
+ wxCommandEvent event(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, lbox->GetId());
+ event.SetEventObject( lbox );
+ lbox->GetEventHandler()->ProcessEvent(event) ;
+}
+
+WXWidget wxListBox::GetTopWidget() const
+{
+ return (WXWidget) XtParent( (Widget) m_mainWidget );
+}
+
+void wxListBox::ChangeFont(bool keepOriginalSize)
+{
+ wxWindow::ChangeFont(keepOriginalSize);
+}
+
+void wxListBox::ChangeBackgroundColour()
+{
+ wxWindow::ChangeBackgroundColour();
+
+ Widget parent = XtParent ((Widget) m_mainWidget);
+ Widget hsb, vsb;
+
+ XtVaGetValues (parent,
+ XmNhorizontalScrollBar, &hsb,
+ XmNverticalScrollBar, &vsb,
+ NULL);
+
+ /* TODO: should scrollbars be affected? Should probably have separate
+ * function to change them (by default, taken from wxSystemSettings)
+ DoChangeBackgroundColour((WXWidget) hsb, m_backgroundColour, TRUE);
+ DoChangeBackgroundColour((WXWidget) vsb, m_backgroundColour, TRUE);
+ */
+
+ DoChangeBackgroundColour((WXWidget) parent, m_backgroundColour, TRUE);
+}
+
+void wxListBox::ChangeForegroundColour()
+{
+ wxWindow::ChangeForegroundColour();
+
+ Widget parent = XtParent ((Widget) m_mainWidget);
+ Widget hsb, vsb;
+
+ XtVaGetValues (parent,
+ XmNhorizontalScrollBar, &hsb,
+ XmNverticalScrollBar, &vsb,
+ NULL);
+ /* TODO: should scrollbars be affected? Should probably have separate
+ * function to change them (by default, taken from wxSystemSettings)
+ DoChangeForegroundColour((WXWidget) hsb, m_foregroundColour);
+ DoChangeForegroundColour((WXWidget) vsb, m_foregroundColour);
+ DoChangeForegroundColour((WXWidget) parent, m_foregroundColour);
+ */
+}
+
+