Minor changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -88,14 +88,17 @@ public:
 | 
			
		||||
    int GetNumberOfRowsOrCols() const;
 | 
			
		||||
    void SetNumberOfRowsOrCols( int n );
 | 
			
		||||
    
 | 
			
		||||
    // implementation
 | 
			
		||||
    // --------------
 | 
			
		||||
    
 | 
			
		||||
    void SetFocus();
 | 
			
		||||
    
 | 
			
		||||
  // implementation    
 | 
			
		||||
    
 | 
			
		||||
    void DisableEvents();
 | 
			
		||||
    void EnableEvents();
 | 
			
		||||
    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 );
 | 
			
		||||
    
 | 
			
		||||
 
 | 
			
		||||
@@ -88,14 +88,17 @@ public:
 | 
			
		||||
    int GetNumberOfRowsOrCols() const;
 | 
			
		||||
    void SetNumberOfRowsOrCols( int n );
 | 
			
		||||
    
 | 
			
		||||
    // implementation
 | 
			
		||||
    // --------------
 | 
			
		||||
    
 | 
			
		||||
    void SetFocus();
 | 
			
		||||
    
 | 
			
		||||
  // implementation    
 | 
			
		||||
    
 | 
			
		||||
    void DisableEvents();
 | 
			
		||||
    void EnableEvents();
 | 
			
		||||
    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 );
 | 
			
		||||
    
 | 
			
		||||
 
 | 
			
		||||
@@ -542,8 +542,9 @@ public:
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // 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)
 | 
			
		||||
 
 | 
			
		||||
@@ -1207,7 +1207,8 @@ void wxListMainWindow::SendNotify( wxListLineData *line, wxEventType command )
 | 
			
		||||
    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) )
 | 
			
		||||
@@ -2545,6 +2546,31 @@ wxListEvent::wxListEvent( wxEventType commandType, int id ):
 | 
			
		||||
    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
 | 
			
		||||
// -------------------------------------------------------------------------------------
 | 
			
		||||
 
 | 
			
		||||
@@ -33,22 +33,26 @@ wxMask::wxMask()
 | 
			
		||||
 | 
			
		||||
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),
 | 
			
		||||
 
 | 
			
		||||
@@ -490,9 +490,11 @@ bool wxClipboard::IsSupported( const wxDataFormat& format )
 | 
			
		||||
    /* 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") );
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -405,11 +405,11 @@ void wxRadioBox::SetSelection( int n )
 | 
			
		||||
 | 
			
		||||
    GtkToggleButton *button = GTK_TOGGLE_BUTTON( node->Data() );
 | 
			
		||||
 | 
			
		||||
    DisableEvents();
 | 
			
		||||
    GtkDisableEvents();
 | 
			
		||||
    
 | 
			
		||||
    gtk_toggle_button_set_state( button, 1 );
 | 
			
		||||
    
 | 
			
		||||
    EnableEvents();
 | 
			
		||||
    GtkEnableEvents();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int wxRadioBox::GetSelection(void) const
 | 
			
		||||
@@ -575,7 +575,7 @@ void wxRadioBox::SetNumberOfRowsOrCols( int WXUNUSED(n) )
 | 
			
		||||
    wxFAIL_MSG(wxT("wxRadioBox::SetNumberOfRowsOrCols not implemented."));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wxRadioBox::DisableEvents()
 | 
			
		||||
void wxRadioBox::GtkDisableEvents()
 | 
			
		||||
{
 | 
			
		||||
    wxNode *node = m_boxes.First();
 | 
			
		||||
    while (node)
 | 
			
		||||
@@ -587,7 +587,7 @@ void wxRadioBox::DisableEvents()
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wxRadioBox::EnableEvents()
 | 
			
		||||
void wxRadioBox::GtkEnableEvents()
 | 
			
		||||
{
 | 
			
		||||
    wxNode *node = m_boxes.First();
 | 
			
		||||
    while (node)
 | 
			
		||||
@@ -618,6 +618,19 @@ void wxRadioBox::ApplyWidgetStyle()
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#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;
 | 
			
		||||
 
 | 
			
		||||
@@ -33,22 +33,26 @@ wxMask::wxMask()
 | 
			
		||||
 | 
			
		||||
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),
 | 
			
		||||
 
 | 
			
		||||
@@ -490,9 +490,11 @@ bool wxClipboard::IsSupported( const wxDataFormat& format )
 | 
			
		||||
    /* 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") );
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -405,11 +405,11 @@ void wxRadioBox::SetSelection( int n )
 | 
			
		||||
 | 
			
		||||
    GtkToggleButton *button = GTK_TOGGLE_BUTTON( node->Data() );
 | 
			
		||||
 | 
			
		||||
    DisableEvents();
 | 
			
		||||
    GtkDisableEvents();
 | 
			
		||||
    
 | 
			
		||||
    gtk_toggle_button_set_state( button, 1 );
 | 
			
		||||
    
 | 
			
		||||
    EnableEvents();
 | 
			
		||||
    GtkEnableEvents();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int wxRadioBox::GetSelection(void) const
 | 
			
		||||
@@ -575,7 +575,7 @@ void wxRadioBox::SetNumberOfRowsOrCols( int WXUNUSED(n) )
 | 
			
		||||
    wxFAIL_MSG(wxT("wxRadioBox::SetNumberOfRowsOrCols not implemented."));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wxRadioBox::DisableEvents()
 | 
			
		||||
void wxRadioBox::GtkDisableEvents()
 | 
			
		||||
{
 | 
			
		||||
    wxNode *node = m_boxes.First();
 | 
			
		||||
    while (node)
 | 
			
		||||
@@ -587,7 +587,7 @@ void wxRadioBox::DisableEvents()
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wxRadioBox::EnableEvents()
 | 
			
		||||
void wxRadioBox::GtkEnableEvents()
 | 
			
		||||
{
 | 
			
		||||
    wxNode *node = m_boxes.First();
 | 
			
		||||
    while (node)
 | 
			
		||||
@@ -618,6 +618,19 @@ void wxRadioBox::ApplyWidgetStyle()
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user