int GetNumberOfRowsOrCols() const;
void SetNumberOfRowsOrCols( int n );
- void SetFocus();
-
- // implementation
+ // implementation
+ // --------------
- void DisableEvents();
- void EnableEvents();
+ void SetFocus();
+ void GtkDisableEvents();
+ void GtkEnableEvents();
bool IsOwnGtkWindow( GdkWindow *window );
void ApplyWidgetStyle();
+#if wxUSE_TOOLTIPS
+ void ApplyToolTip( GtkTooltips *tips, const wxChar *tip );
+#endif // wxUSE_TOOLTIPS
wxSize LayoutItems();
void DoSetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO );
int GetNumberOfRowsOrCols() const;
void SetNumberOfRowsOrCols( int n );
- void SetFocus();
-
- // implementation
+ // implementation
+ // --------------
- void DisableEvents();
- void EnableEvents();
+ void SetFocus();
+ void GtkDisableEvents();
+ void GtkEnableEvents();
bool IsOwnGtkWindow( GdkWindow *window );
void ApplyWidgetStyle();
+#if wxUSE_TOOLTIPS
+ void ApplyToolTip( GtkTooltips *tips, const wxChar *tip );
+#endif // wxUSE_TOOLTIPS
wxSize LayoutItems();
void DoSetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO );
}
// override base class (pure) virtuals
- virtual void OnEnter()
- { m_frame->SetStatusText("Mouse entered the frame"); }
+ virtual wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def)
+ { m_frame->SetStatusText("Mouse entered the frame");
+ return OnDragOver(x, y, def); }
virtual void OnLeave()
{ m_frame->SetStatusText("Mouse left the frame"); }
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def)
le.SetEventObject( GetParent() );
le.m_itemIndex = GetIndexOfLine( line );
line->GetItem( 0, le.m_item );
- GetParent()->GetEventHandler()->ProcessEvent( le );
+// GetParent()->GetEventHandler()->ProcessEvent( le );
+ GetParent()->GetEventHandler()->AddPendingEvent( le );
}
void wxListMainWindow::FocusLine( wxListLineData *WXUNUSED(line) )
m_pointDrag.y = 0;
}
+void wxListEvent::CopyObject(wxObject& object_dest) const
+{
+ wxListEvent *obj = (wxListEvent *)&object_dest;
+
+ wxNotifyEvent::CopyObject(object_dest);
+
+ obj->m_code = m_code;
+ obj->m_itemIndex = m_itemIndex;
+ obj->m_oldItemIndex = m_oldItemIndex;
+ obj->m_col = m_col;
+ obj->m_cancelled = m_cancelled;
+ obj->m_pointDrag = m_pointDrag;
+ obj->m_item.m_mask = m_item.m_mask;
+ obj->m_item.m_itemId = m_item.m_itemId;
+ obj->m_item.m_col = m_item.m_col;
+ obj->m_item.m_state = m_item.m_state;
+ obj->m_item.m_stateMask = m_item.m_stateMask;
+ obj->m_item.m_text = m_item.m_text;
+ obj->m_item.m_image = m_item.m_image;
+ obj->m_item.m_data = m_item.m_data;
+ obj->m_item.m_format = m_item.m_format;
+ obj->m_item.m_width = m_item.m_width;
+ obj->m_item.m_colour = m_item.m_colour;
+}
+
// -------------------------------------------------------------------------------------
// wxListCtrl
// -------------------------------------------------------------------------------------
wxMask::wxMask( const wxBitmap& bitmap, const wxColour& colour )
{
+ m_bitmap = (GdkBitmap *) NULL;
Create( bitmap, colour );
}
wxMask::wxMask( const wxBitmap& bitmap, int paletteIndex )
{
+ m_bitmap = (GdkBitmap *) NULL;
Create( bitmap, paletteIndex );
}
wxMask::wxMask( const wxBitmap& bitmap )
{
+ m_bitmap = (GdkBitmap *) NULL;
Create( bitmap );
}
wxMask::~wxMask()
{
- if (m_bitmap) gdk_bitmap_unref( m_bitmap );
+ if (m_bitmap)
+ gdk_bitmap_unref( m_bitmap );
}
bool wxMask::Create( const wxBitmap& WXUNUSED(bitmap),
/* store requested format to be asked for by callbacks */
m_targetRequested = format;
+#if 0
wxLogTrace( TRACE_CLIPBOARD,
wxT("wxClipboard:IsSupported: requested format: %s"),
format.GetId().c_str() );
+#endif
wxCHECK_MSG( m_targetRequested, FALSE, wxT("invalid clipboard format") );
GtkToggleButton *button = GTK_TOGGLE_BUTTON( node->Data() );
- DisableEvents();
+ GtkDisableEvents();
gtk_toggle_button_set_state( button, 1 );
- EnableEvents();
+ GtkEnableEvents();
}
int wxRadioBox::GetSelection(void) const
wxFAIL_MSG(wxT("wxRadioBox::SetNumberOfRowsOrCols not implemented."));
}
-void wxRadioBox::DisableEvents()
+void wxRadioBox::GtkDisableEvents()
{
wxNode *node = m_boxes.First();
while (node)
}
}
-void wxRadioBox::EnableEvents()
+void wxRadioBox::GtkEnableEvents()
{
wxNode *node = m_boxes.First();
while (node)
}
}
+#if wxUSE_TOOLTIPS
+void wxRadioBox::ApplyToolTip( GtkTooltips *tips, const wxChar *tip )
+{
+ wxNode *node = m_boxes.First();
+ while (node)
+ {
+ GtkWidget *widget = GTK_WIDGET( node->Data() );
+ gtk_tooltips_set_tip( tips, widget, wxConvCurrent->cWX2MB(tip), (gchar*) NULL );
+ node = node->Next();
+ }
+}
+#endif // wxUSE_TOOLTIPS
+
bool wxRadioBox::IsOwnGtkWindow( GdkWindow *window )
{
if (window == m_widget->window) return TRUE;
wxMask::wxMask( const wxBitmap& bitmap, const wxColour& colour )
{
+ m_bitmap = (GdkBitmap *) NULL;
Create( bitmap, colour );
}
wxMask::wxMask( const wxBitmap& bitmap, int paletteIndex )
{
+ m_bitmap = (GdkBitmap *) NULL;
Create( bitmap, paletteIndex );
}
wxMask::wxMask( const wxBitmap& bitmap )
{
+ m_bitmap = (GdkBitmap *) NULL;
Create( bitmap );
}
wxMask::~wxMask()
{
- if (m_bitmap) gdk_bitmap_unref( m_bitmap );
+ if (m_bitmap)
+ gdk_bitmap_unref( m_bitmap );
}
bool wxMask::Create( const wxBitmap& WXUNUSED(bitmap),
/* store requested format to be asked for by callbacks */
m_targetRequested = format;
+#if 0
wxLogTrace( TRACE_CLIPBOARD,
wxT("wxClipboard:IsSupported: requested format: %s"),
format.GetId().c_str() );
+#endif
wxCHECK_MSG( m_targetRequested, FALSE, wxT("invalid clipboard format") );
GtkToggleButton *button = GTK_TOGGLE_BUTTON( node->Data() );
- DisableEvents();
+ GtkDisableEvents();
gtk_toggle_button_set_state( button, 1 );
- EnableEvents();
+ GtkEnableEvents();
}
int wxRadioBox::GetSelection(void) const
wxFAIL_MSG(wxT("wxRadioBox::SetNumberOfRowsOrCols not implemented."));
}
-void wxRadioBox::DisableEvents()
+void wxRadioBox::GtkDisableEvents()
{
wxNode *node = m_boxes.First();
while (node)
}
}
-void wxRadioBox::EnableEvents()
+void wxRadioBox::GtkEnableEvents()
{
wxNode *node = m_boxes.First();
while (node)
}
}
+#if wxUSE_TOOLTIPS
+void wxRadioBox::ApplyToolTip( GtkTooltips *tips, const wxChar *tip )
+{
+ wxNode *node = m_boxes.First();
+ while (node)
+ {
+ GtkWidget *widget = GTK_WIDGET( node->Data() );
+ gtk_tooltips_set_tip( tips, widget, wxConvCurrent->cWX2MB(tip), (gchar*) NULL );
+ node = node->Next();
+ }
+}
+#endif // wxUSE_TOOLTIPS
+
bool wxRadioBox::IsOwnGtkWindow( GdkWindow *window )
{
if (window == m_widget->window) return TRUE;