no changes, just removed TABs/trailing spaces
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -209,7 +209,7 @@ static gint wxapp_idle_callback( gpointer WXUNUSED(data) )
|
|||||||
|
|
||||||
// Release lock again
|
// Release lock again
|
||||||
gdk_threads_leave();
|
gdk_threads_leave();
|
||||||
|
|
||||||
{
|
{
|
||||||
// If another idle source was added, remove it
|
// If another idle source was added, remove it
|
||||||
#if wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
|
@@ -349,7 +349,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
|
|||||||
|
|
||||||
g_signal_connect_after (m_widget, "changed",
|
g_signal_connect_after (m_widget, "changed",
|
||||||
G_CALLBACK (gtkcombobox_changed_callback), this);
|
G_CALLBACK (gtkcombobox_changed_callback), this);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
@@ -278,7 +278,7 @@ bool wxFileDataObject::SetData(size_t WXUNUSED(size), const void *buf)
|
|||||||
// skip the slashes
|
// skip the slashes
|
||||||
lenPrefix += 2;
|
lenPrefix += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// It would probably be nicer to use a GTK or Glib
|
// It would probably be nicer to use a GTK or Glib
|
||||||
// function to unescape the 8-bit strings pointed to
|
// function to unescape the 8-bit strings pointed to
|
||||||
// by buf, but this does the same in wx code.
|
// by buf, but this does the same in wx code.
|
||||||
|
@@ -1102,9 +1102,9 @@ void wxDataViewTextRenderer::SetAlignment( int align )
|
|||||||
g_value_unset( &gvalue );
|
g_value_unset( &gvalue );
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
// wxDataViewBitmapRenderer
|
// wxDataViewBitmapRenderer
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
|
|
||||||
IMPLEMENT_CLASS(wxDataViewBitmapRenderer, wxDataViewRenderer)
|
IMPLEMENT_CLASS(wxDataViewBitmapRenderer, wxDataViewRenderer)
|
||||||
|
|
||||||
@@ -1124,38 +1124,38 @@ bool wxDataViewBitmapRenderer::SetValue( const wxVariant &value )
|
|||||||
{
|
{
|
||||||
wxBitmap bitmap;
|
wxBitmap bitmap;
|
||||||
bitmap << value;
|
bitmap << value;
|
||||||
|
|
||||||
// This may create a Pixbuf representation in the
|
// This may create a Pixbuf representation in the
|
||||||
// wxBitmap object (and it will stay there)
|
// wxBitmap object (and it will stay there)
|
||||||
GdkPixbuf *pixbuf = bitmap.GetPixbuf();
|
GdkPixbuf *pixbuf = bitmap.GetPixbuf();
|
||||||
|
|
||||||
GValue gvalue = { 0, };
|
GValue gvalue = { 0, };
|
||||||
g_value_init( &gvalue, G_TYPE_OBJECT );
|
g_value_init( &gvalue, G_TYPE_OBJECT );
|
||||||
g_value_set_object( &gvalue, pixbuf );
|
g_value_set_object( &gvalue, pixbuf );
|
||||||
g_object_set_property( G_OBJECT(m_renderer), "pixbuf", &gvalue );
|
g_object_set_property( G_OBJECT(m_renderer), "pixbuf", &gvalue );
|
||||||
g_value_unset( &gvalue );
|
g_value_unset( &gvalue );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value.GetType() == wxT("wxIcon"))
|
if (value.GetType() == wxT("wxIcon"))
|
||||||
{
|
{
|
||||||
wxIcon bitmap;
|
wxIcon bitmap;
|
||||||
bitmap << value;
|
bitmap << value;
|
||||||
|
|
||||||
// This may create a Pixbuf representation in the
|
// This may create a Pixbuf representation in the
|
||||||
// wxBitmap object (and it will stay there)
|
// wxBitmap object (and it will stay there)
|
||||||
GdkPixbuf *pixbuf = bitmap.GetPixbuf();
|
GdkPixbuf *pixbuf = bitmap.GetPixbuf();
|
||||||
|
|
||||||
GValue gvalue = { 0, };
|
GValue gvalue = { 0, };
|
||||||
g_value_init( &gvalue, G_TYPE_OBJECT );
|
g_value_init( &gvalue, G_TYPE_OBJECT );
|
||||||
g_value_set_object( &gvalue, pixbuf );
|
g_value_set_object( &gvalue, pixbuf );
|
||||||
g_object_set_property( G_OBJECT(m_renderer), "pixbuf", &gvalue );
|
g_object_set_property( G_OBJECT(m_renderer), "pixbuf", &gvalue );
|
||||||
g_value_unset( &gvalue );
|
g_value_unset( &gvalue );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1163,7 +1163,7 @@ bool wxDataViewBitmapRenderer::GetValue( wxVariant &value ) const
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
// wxDataViewToggleRenderer
|
// wxDataViewToggleRenderer
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
@@ -1540,7 +1540,7 @@ gtk_dataview_header_button_press_callback( GtkWidget *widget,
|
|||||||
{
|
{
|
||||||
if (gdk_event->type != GDK_BUTTON_PRESS)
|
if (gdk_event->type != GDK_BUTTON_PRESS)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if (gdk_event->button == 1)
|
if (gdk_event->button == 1)
|
||||||
{
|
{
|
||||||
wxDataViewCtrl *dv = column->GetOwner();
|
wxDataViewCtrl *dv = column->GetOwner();
|
||||||
@@ -1549,7 +1549,7 @@ gtk_dataview_header_button_press_callback( GtkWidget *widget,
|
|||||||
event.SetModel( dv->GetModel() );
|
event.SetModel( dv->GetModel() );
|
||||||
dv->GetEventHandler()->ProcessEvent( event );
|
dv->GetEventHandler()->ProcessEvent( event );
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1579,8 +1579,8 @@ static void wxGtkTreeCellDataFunc( GtkTreeViewColumn *column,
|
|||||||
list_store->model->GetValue( value, cell->GetOwner()->GetModelColumn(), model_row );
|
list_store->model->GetValue( value, cell->GetOwner()->GetModelColumn(), model_row );
|
||||||
|
|
||||||
if (value.GetType() != cell->GetVariantType())
|
if (value.GetType() != cell->GetVariantType())
|
||||||
wxLogError( wxT("Wrong type, required: %s but: %s"),
|
wxLogError( wxT("Wrong type, required: %s but: %s"),
|
||||||
value.GetType().c_str(),
|
value.GetType().c_str(),
|
||||||
cell->GetVariantType().c_str() );
|
cell->GetVariantType().c_str() );
|
||||||
|
|
||||||
cell->SetValue( value );
|
cell->SetValue( value );
|
||||||
@@ -1588,8 +1588,8 @@ static void wxGtkTreeCellDataFunc( GtkTreeViewColumn *column,
|
|||||||
|
|
||||||
IMPLEMENT_CLASS(wxDataViewColumn, wxDataViewColumnBase)
|
IMPLEMENT_CLASS(wxDataViewColumn, wxDataViewColumnBase)
|
||||||
|
|
||||||
wxDataViewColumn::wxDataViewColumn( const wxString &title, wxDataViewRenderer *cell,
|
wxDataViewColumn::wxDataViewColumn( const wxString &title, wxDataViewRenderer *cell,
|
||||||
unsigned int model_column, int width,
|
unsigned int model_column, int width,
|
||||||
wxAlignment align, int flags ) :
|
wxAlignment align, int flags ) :
|
||||||
wxDataViewColumnBase( title, cell, model_column, width, align, flags )
|
wxDataViewColumnBase( title, cell, model_column, width, align, flags )
|
||||||
{
|
{
|
||||||
@@ -1599,8 +1599,8 @@ wxDataViewColumn::wxDataViewColumn( const wxString &title, wxDataViewRenderer *c
|
|||||||
SetTitle( title );
|
SetTitle( title );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxDataViewColumn::wxDataViewColumn( const wxBitmap &bitmap, wxDataViewRenderer *cell,
|
wxDataViewColumn::wxDataViewColumn( const wxBitmap &bitmap, wxDataViewRenderer *cell,
|
||||||
unsigned int model_column, int width,
|
unsigned int model_column, int width,
|
||||||
wxAlignment align, int flags ) :
|
wxAlignment align, int flags ) :
|
||||||
wxDataViewColumnBase( bitmap, cell, model_column, width, align, flags )
|
wxDataViewColumnBase( bitmap, cell, model_column, width, align, flags )
|
||||||
{
|
{
|
||||||
@@ -1643,7 +1643,7 @@ void wxDataViewColumn::OnInternalIdle()
|
|||||||
{
|
{
|
||||||
if (m_isConnected)
|
if (m_isConnected)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (GTK_WIDGET_REALIZED(GetOwner()->m_treeview))
|
if (GTK_WIDGET_REALIZED(GetOwner()->m_treeview))
|
||||||
{
|
{
|
||||||
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
|
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
|
||||||
@@ -1651,7 +1651,7 @@ void wxDataViewColumn::OnInternalIdle()
|
|||||||
{
|
{
|
||||||
g_signal_connect(column->button, "button_press_event",
|
g_signal_connect(column->button, "button_press_event",
|
||||||
G_CALLBACK (gtk_dataview_header_button_press_callback), this);
|
G_CALLBACK (gtk_dataview_header_button_press_callback), this);
|
||||||
|
|
||||||
m_isConnected = true;
|
m_isConnected = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1660,22 +1660,22 @@ void wxDataViewColumn::OnInternalIdle()
|
|||||||
void wxDataViewColumn::SetOwner( wxDataViewCtrl *owner )
|
void wxDataViewColumn::SetOwner( wxDataViewCtrl *owner )
|
||||||
{
|
{
|
||||||
wxDataViewColumnBase::SetOwner( owner );
|
wxDataViewColumnBase::SetOwner( owner );
|
||||||
|
|
||||||
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
|
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
|
||||||
|
|
||||||
gtk_tree_view_column_set_title( column, wxGTK_CONV_FONT(GetTitle(), GetOwner()->GetFont() ) );
|
gtk_tree_view_column_set_title( column, wxGTK_CONV_FONT(GetTitle(), GetOwner()->GetFont() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDataViewColumn::SetTitle( const wxString &title )
|
void wxDataViewColumn::SetTitle( const wxString &title )
|
||||||
{
|
{
|
||||||
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
|
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
|
||||||
|
|
||||||
if (m_isConnected)
|
if (m_isConnected)
|
||||||
{
|
{
|
||||||
// disconnect before column->button gets recreated
|
// disconnect before column->button gets recreated
|
||||||
g_signal_handlers_disconnect_by_func( column->button,
|
g_signal_handlers_disconnect_by_func( column->button,
|
||||||
(GtkWidget*) gtk_dataview_header_button_press_callback, this);
|
(GtkWidget*) gtk_dataview_header_button_press_callback, this);
|
||||||
|
|
||||||
m_isConnected = false;
|
m_isConnected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1701,7 +1701,7 @@ void wxDataViewColumn::SetBitmap( const wxBitmap &bitmap )
|
|||||||
if (bitmap.Ok())
|
if (bitmap.Ok())
|
||||||
{
|
{
|
||||||
GtkImage *gtk_image = GTK_IMAGE( gtk_image_new() );
|
GtkImage *gtk_image = GTK_IMAGE( gtk_image_new() );
|
||||||
|
|
||||||
GdkBitmap *mask = (GdkBitmap *) NULL;
|
GdkBitmap *mask = (GdkBitmap *) NULL;
|
||||||
if (bitmap.GetMask())
|
if (bitmap.GetMask())
|
||||||
mask = bitmap.GetMask()->GetBitmap();
|
mask = bitmap.GetMask()->GetBitmap();
|
||||||
@@ -1717,7 +1717,7 @@ void wxDataViewColumn::SetBitmap( const wxBitmap &bitmap )
|
|||||||
bitmap.GetPixmap(), mask);
|
bitmap.GetPixmap(), mask);
|
||||||
}
|
}
|
||||||
gtk_widget_show( GTK_WIDGET(gtk_image) );
|
gtk_widget_show( GTK_WIDGET(gtk_image) );
|
||||||
|
|
||||||
gtk_tree_view_column_set_widget( column, GTK_WIDGET(gtk_image) );
|
gtk_tree_view_column_set_widget( column, GTK_WIDGET(gtk_image) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1739,14 +1739,14 @@ void wxDataViewColumn::SetResizeable( bool resizeable )
|
|||||||
void wxDataViewColumn::SetAlignment( wxAlignment align )
|
void wxDataViewColumn::SetAlignment( wxAlignment align )
|
||||||
{
|
{
|
||||||
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
|
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
|
||||||
|
|
||||||
gfloat xalign = 0.0;
|
gfloat xalign = 0.0;
|
||||||
if (align == wxALIGN_RIGHT)
|
if (align == wxALIGN_RIGHT)
|
||||||
xalign = 1.0;
|
xalign = 1.0;
|
||||||
if (align == wxALIGN_CENTER_HORIZONTAL ||
|
if (align == wxALIGN_CENTER_HORIZONTAL ||
|
||||||
align == wxALIGN_CENTER)
|
align == wxALIGN_CENTER)
|
||||||
xalign = 0.5;
|
xalign = 0.5;
|
||||||
|
|
||||||
gtk_tree_view_column_set_alignment( column, xalign );
|
gtk_tree_view_column_set_alignment( column, xalign );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1758,7 +1758,7 @@ wxAlignment wxDataViewColumn::GetAlignment() const
|
|||||||
return wxALIGN_RIGHT;
|
return wxALIGN_RIGHT;
|
||||||
if (xalign == 0.5)
|
if (xalign == 0.5)
|
||||||
return wxALIGN_CENTER_HORIZONTAL;
|
return wxALIGN_CENTER_HORIZONTAL;
|
||||||
|
|
||||||
return wxALIGN_LEFT;
|
return wxALIGN_LEFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1789,7 +1789,7 @@ bool wxDataViewColumn::IsHidden() const
|
|||||||
void wxDataViewColumn::SetSortOrder( bool ascending )
|
void wxDataViewColumn::SetSortOrder( bool ascending )
|
||||||
{
|
{
|
||||||
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
|
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
|
||||||
|
|
||||||
if (ascending)
|
if (ascending)
|
||||||
gtk_tree_view_column_set_sort_order( column, GTK_SORT_ASCENDING );
|
gtk_tree_view_column_set_sort_order( column, GTK_SORT_ASCENDING );
|
||||||
else
|
else
|
||||||
@@ -1799,7 +1799,7 @@ void wxDataViewColumn::SetSortOrder( bool ascending )
|
|||||||
bool wxDataViewColumn::IsSortOrderAscending() const
|
bool wxDataViewColumn::IsSortOrderAscending() const
|
||||||
{
|
{
|
||||||
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
|
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
|
||||||
|
|
||||||
return (gtk_tree_view_column_get_sort_order( column ) != GTK_SORT_DESCENDING);
|
return (gtk_tree_view_column_get_sort_order( column ) != GTK_SORT_DESCENDING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1833,7 +1833,7 @@ wxdataview_selection_changed_callback( GtkTreeSelection* selection, wxDataViewCt
|
|||||||
{
|
{
|
||||||
if (!GTK_WIDGET_REALIZED(dv->m_widget))
|
if (!GTK_WIDGET_REALIZED(dv->m_widget))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ROW_SELECTED, dv->GetId() );
|
wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ROW_SELECTED, dv->GetId() );
|
||||||
event.SetRow( dv->GetSelection() );
|
event.SetRow( dv->GetSelection() );
|
||||||
event.SetModel( dv->GetModel() );
|
event.SetModel( dv->GetModel() );
|
||||||
@@ -1841,7 +1841,7 @@ wxdataview_selection_changed_callback( GtkTreeSelection* selection, wxDataViewCt
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
wxdataview_row_activated_callback( GtkTreeView* treeview, GtkTreePath *path,
|
wxdataview_row_activated_callback( GtkTreeView* treeview, GtkTreePath *path,
|
||||||
GtkTreeViewColumn *column, wxDataViewCtrl *dv )
|
GtkTreeViewColumn *column, wxDataViewCtrl *dv )
|
||||||
{
|
{
|
||||||
wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ROW_ACTIVATED, dv->GetId() );
|
wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ROW_ACTIVATED, dv->GetId() );
|
||||||
@@ -1912,8 +1912,8 @@ bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
if (!gtk_check_version(2,10,0))
|
if (!gtk_check_version(2,10,0))
|
||||||
{
|
{
|
||||||
GtkTreeViewGridLines grid = GTK_TREE_VIEW_GRID_LINES_NONE;
|
GtkTreeViewGridLines grid = GTK_TREE_VIEW_GRID_LINES_NONE;
|
||||||
|
|
||||||
if ((style & wxDV_HORIZ_RULES) != 0 &&
|
if ((style & wxDV_HORIZ_RULES) != 0 &&
|
||||||
(style & wxDV_VERT_RULES) != 0)
|
(style & wxDV_VERT_RULES) != 0)
|
||||||
grid = GTK_TREE_VIEW_GRID_LINES_BOTH;
|
grid = GTK_TREE_VIEW_GRID_LINES_BOTH;
|
||||||
else if (style & wxDV_VERT_RULES)
|
else if (style & wxDV_VERT_RULES)
|
||||||
@@ -1947,7 +1947,7 @@ bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
void wxDataViewCtrl::OnInternalIdle()
|
void wxDataViewCtrl::OnInternalIdle()
|
||||||
{
|
{
|
||||||
wxWindow::OnInternalIdle();
|
wxWindow::OnInternalIdle();
|
||||||
|
|
||||||
unsigned int cols = GetColumnCount();
|
unsigned int cols = GetColumnCount();
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
for (i = 0; i < cols; i++)
|
for (i = 0; i < cols; i++)
|
||||||
@@ -1990,7 +1990,7 @@ bool wxDataViewCtrl::AppendColumn( wxDataViewColumn *col )
|
|||||||
void wxDataViewCtrl::SetSelection( int row )
|
void wxDataViewCtrl::SetSelection( int row )
|
||||||
{
|
{
|
||||||
GtkTreeSelection *selection = gtk_tree_view_get_selection( GTK_TREE_VIEW(m_treeview) );
|
GtkTreeSelection *selection = gtk_tree_view_get_selection( GTK_TREE_VIEW(m_treeview) );
|
||||||
|
|
||||||
if (row < 0)
|
if (row < 0)
|
||||||
{
|
{
|
||||||
gtk_tree_selection_unselect_all( selection );
|
gtk_tree_selection_unselect_all( selection );
|
||||||
@@ -1999,9 +1999,9 @@ void wxDataViewCtrl::SetSelection( int row )
|
|||||||
{
|
{
|
||||||
GtkTreePath *path = gtk_tree_path_new ();
|
GtkTreePath *path = gtk_tree_path_new ();
|
||||||
gtk_tree_path_append_index( path, row );
|
gtk_tree_path_append_index( path, row );
|
||||||
|
|
||||||
gtk_tree_selection_select_path( selection, path );
|
gtk_tree_selection_select_path( selection, path );
|
||||||
|
|
||||||
gtk_tree_path_free( path );
|
gtk_tree_path_free( path );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2009,12 +2009,12 @@ void wxDataViewCtrl::SetSelection( int row )
|
|||||||
void wxDataViewCtrl::Unselect( unsigned int row )
|
void wxDataViewCtrl::Unselect( unsigned int row )
|
||||||
{
|
{
|
||||||
GtkTreeSelection *selection = gtk_tree_view_get_selection( GTK_TREE_VIEW(m_treeview) );
|
GtkTreeSelection *selection = gtk_tree_view_get_selection( GTK_TREE_VIEW(m_treeview) );
|
||||||
|
|
||||||
GtkTreePath *path = gtk_tree_path_new ();
|
GtkTreePath *path = gtk_tree_path_new ();
|
||||||
gtk_tree_path_append_index( path, row );
|
gtk_tree_path_append_index( path, row );
|
||||||
|
|
||||||
gtk_tree_selection_unselect_path( selection, path );
|
gtk_tree_selection_unselect_path( selection, path );
|
||||||
|
|
||||||
gtk_tree_path_free( path );
|
gtk_tree_path_free( path );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2025,18 +2025,18 @@ void wxDataViewCtrl::SetSelectionRange( unsigned int from, unsigned int to )
|
|||||||
void wxDataViewCtrl::SetSelections( const wxArrayInt& aSelections)
|
void wxDataViewCtrl::SetSelections( const wxArrayInt& aSelections)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxDataViewCtrl::IsSelected( unsigned int row ) const
|
bool wxDataViewCtrl::IsSelected( unsigned int row ) const
|
||||||
{
|
{
|
||||||
GtkTreeSelection *selection = gtk_tree_view_get_selection( GTK_TREE_VIEW(m_treeview) );
|
GtkTreeSelection *selection = gtk_tree_view_get_selection( GTK_TREE_VIEW(m_treeview) );
|
||||||
|
|
||||||
GtkTreePath *path = gtk_tree_path_new ();
|
GtkTreePath *path = gtk_tree_path_new ();
|
||||||
gtk_tree_path_append_index( path, row );
|
gtk_tree_path_append_index( path, row );
|
||||||
|
|
||||||
gboolean ret = gtk_tree_selection_path_is_selected( selection, path );
|
gboolean ret = gtk_tree_selection_path_is_selected( selection, path );
|
||||||
|
|
||||||
gtk_tree_path_free( path );
|
gtk_tree_path_free( path );
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2047,25 +2047,25 @@ int wxDataViewCtrl::GetSelection() const
|
|||||||
{
|
{
|
||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
GList *list = gtk_tree_selection_get_selected_rows( selection, &model );
|
GList *list = gtk_tree_selection_get_selected_rows( selection, &model );
|
||||||
|
|
||||||
// do something
|
// do something
|
||||||
if (list)
|
if (list)
|
||||||
{
|
{
|
||||||
// list = g_list_nth( list, 0 ); should be a noop
|
// list = g_list_nth( list, 0 ); should be a noop
|
||||||
GtkTreePath *path = (GtkTreePath*) list->data;
|
GtkTreePath *path = (GtkTreePath*) list->data;
|
||||||
|
|
||||||
unsigned int row = (unsigned int)gtk_tree_path_get_indices (path)[0];
|
unsigned int row = (unsigned int)gtk_tree_path_get_indices (path)[0];
|
||||||
|
|
||||||
// delete list
|
// delete list
|
||||||
g_list_foreach( list, (GFunc) gtk_tree_path_free, NULL );
|
g_list_foreach( list, (GFunc) gtk_tree_path_free, NULL );
|
||||||
g_list_free( list );
|
g_list_free( list );
|
||||||
|
|
||||||
return (int) row;
|
return (int) row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
gboolean has_selection = gtk_tree_selection_get_selected( selection, &model, &iter );
|
gboolean has_selection = gtk_tree_selection_get_selected( selection, &model, &iter );
|
||||||
@@ -2075,7 +2075,7 @@ int wxDataViewCtrl::GetSelection() const
|
|||||||
return (int) row;
|
return (int) row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2088,25 +2088,25 @@ int wxDataViewCtrl::GetSelections(wxArrayInt& aSelections) const
|
|||||||
{
|
{
|
||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
GList *list = gtk_tree_selection_get_selected_rows( selection, &model );
|
GList *list = gtk_tree_selection_get_selected_rows( selection, &model );
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
while (list)
|
while (list)
|
||||||
{
|
{
|
||||||
|
|
||||||
// list = g_list_nth( list, 0 ); should be a noop
|
// list = g_list_nth( list, 0 ); should be a noop
|
||||||
GtkTreePath *path = (GtkTreePath*) list->data;
|
GtkTreePath *path = (GtkTreePath*) list->data;
|
||||||
|
|
||||||
unsigned int row = (unsigned int)gtk_tree_path_get_indices (path)[0];
|
unsigned int row = (unsigned int)gtk_tree_path_get_indices (path)[0];
|
||||||
|
|
||||||
aSelections.Add( (int) row );
|
aSelections.Add( (int) row );
|
||||||
|
|
||||||
list = g_list_next( list );
|
list = g_list_next( list );
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete list
|
// delete list
|
||||||
g_list_foreach( list, (GFunc) gtk_tree_path_free, NULL );
|
g_list_foreach( list, (GFunc) gtk_tree_path_free, NULL );
|
||||||
g_list_free( list );
|
g_list_free( list );
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2121,7 +2121,7 @@ int wxDataViewCtrl::GetSelections(wxArrayInt& aSelections) const
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -324,7 +324,7 @@ wxWindowDC::wxWindowDC( wxWindow *window )
|
|||||||
standard (as e.g. wxStatusBar) */
|
standard (as e.g. wxStatusBar) */
|
||||||
|
|
||||||
m_owner = window;
|
m_owner = window;
|
||||||
|
|
||||||
if (m_owner && m_owner->m_wxwindow && (m_owner->GetLayoutDirection() == wxLayout_RightToLeft))
|
if (m_owner && m_owner->m_wxwindow && (m_owner->GetLayoutDirection() == wxLayout_RightToLeft))
|
||||||
{
|
{
|
||||||
// reverse sense
|
// reverse sense
|
||||||
@@ -391,7 +391,7 @@ void wxWindowDC::SetUpDC()
|
|||||||
gdk_gc_set_background( m_textGC, m_textBackgroundColour.GetColor() );
|
gdk_gc_set_background( m_textGC, m_textBackgroundColour.GetColor() );
|
||||||
|
|
||||||
gdk_gc_set_fill( m_textGC, GDK_SOLID );
|
gdk_gc_set_fill( m_textGC, GDK_SOLID );
|
||||||
|
|
||||||
gdk_gc_set_colormap( m_textGC, m_cmap );
|
gdk_gc_set_colormap( m_textGC, m_cmap );
|
||||||
|
|
||||||
/* m_penGC */
|
/* m_penGC */
|
||||||
@@ -862,7 +862,7 @@ void wxWindowDC::DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord h
|
|||||||
gdk_draw_rectangle( m_window, m_penGC, FALSE, xx, yy, ww-2, hh-2 );
|
gdk_draw_rectangle( m_window, m_penGC, FALSE, xx, yy, ww-2, hh-2 );
|
||||||
gdk_draw_rectangle( m_window, m_penGC, FALSE, xx-1, yy-1, ww, hh );
|
gdk_draw_rectangle( m_window, m_penGC, FALSE, xx-1, yy-1, ww, hh );
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset
|
// reset
|
||||||
gdk_gc_set_line_attributes( m_penGC, 2, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND );
|
gdk_gc_set_line_attributes( m_penGC, 2, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND );
|
||||||
}
|
}
|
||||||
@@ -1083,10 +1083,10 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
|
|||||||
|
|
||||||
int w = bitmap.GetWidth();
|
int w = bitmap.GetWidth();
|
||||||
int h = bitmap.GetHeight();
|
int h = bitmap.GetHeight();
|
||||||
|
|
||||||
if (m_owner && m_owner->GetLayoutDirection() == wxLayout_RightToLeft)
|
if (m_owner && m_owner->GetLayoutDirection() == wxLayout_RightToLeft)
|
||||||
xx -= w;
|
xx -= w;
|
||||||
|
|
||||||
CalcBoundingBox( x, y );
|
CalcBoundingBox( x, y );
|
||||||
CalcBoundingBox( x + w, y + h );
|
CalcBoundingBox( x + w, y + h );
|
||||||
|
|
||||||
@@ -1219,7 +1219,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
|
|||||||
|
|
||||||
wxMemoryDC *memDC = wxDynamicCast(source, wxMemoryDC);
|
wxMemoryDC *memDC = wxDynamicCast(source, wxMemoryDC);
|
||||||
wxBitmap selected = source->GetSelectedBitmap();
|
wxBitmap selected = source->GetSelectedBitmap();
|
||||||
|
|
||||||
bool use_bitmap_method = false;
|
bool use_bitmap_method = false;
|
||||||
bool is_mono = false;
|
bool is_mono = false;
|
||||||
|
|
||||||
@@ -1230,7 +1230,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (memDC && !selected.Ok()) return false;
|
if (memDC && !selected.Ok()) return false;
|
||||||
|
|
||||||
if (selected.Ok())
|
if (selected.Ok())
|
||||||
{
|
{
|
||||||
is_mono = (selected.GetDepth() == 1);
|
is_mono = (selected.GetDepth() == 1);
|
||||||
@@ -1428,7 +1428,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
|
|||||||
GdkWindow* window = source->GetGDKWindow();
|
GdkWindow* window = source->GetGDKWindow();
|
||||||
if ( !window )
|
if ( !window )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// copy including child window contents
|
// copy including child window contents
|
||||||
gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS );
|
gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS );
|
||||||
gdk_draw_drawable( m_window, m_penGC,
|
gdk_draw_drawable( m_window, m_penGC,
|
||||||
@@ -1579,7 +1579,7 @@ void wxWindowDC::DoDrawText( const wxString &text, wxCoord x, wxCoord y )
|
|||||||
gdk_draw_rectangle(m_window, m_textGC, TRUE, x, y, w, h);
|
gdk_draw_rectangle(m_window, m_textGC, TRUE, x, y, w, h);
|
||||||
gdk_gc_set_foreground(m_textGC, m_textForegroundColour.GetColor());
|
gdk_gc_set_foreground(m_textGC, m_textForegroundColour.GetColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw layout.
|
// Draw layout.
|
||||||
if (m_owner && m_owner->GetLayoutDirection() == wxLayout_RightToLeft)
|
if (m_owner && m_owner->GetLayoutDirection() == wxLayout_RightToLeft)
|
||||||
gdk_draw_layout( m_window, m_textGC, x-w, y, m_layout );
|
gdk_draw_layout( m_window, m_textGC, x-w, y, m_layout );
|
||||||
@@ -1796,7 +1796,7 @@ bool wxWindowDC::DoGetPartialTextExtents(const wxString& text,
|
|||||||
}
|
}
|
||||||
|
|
||||||
pango_layout_set_text( m_layout, dataUTF8, strlen(dataUTF8) );
|
pango_layout_set_text( m_layout, dataUTF8, strlen(dataUTF8) );
|
||||||
|
|
||||||
// Calculate the position of each character based on the widths of
|
// Calculate the position of each character based on the widths of
|
||||||
// the previous characters
|
// the previous characters
|
||||||
|
|
||||||
@@ -2368,7 +2368,7 @@ void wxWindowDC::SetDeviceOrigin( wxCoord x, wxCoord y )
|
|||||||
{
|
{
|
||||||
m_deviceOriginX = x;
|
m_deviceOriginX = x;
|
||||||
m_deviceOriginY = y;
|
m_deviceOriginY = y;
|
||||||
|
|
||||||
ComputeScaleAndOrigin();
|
ComputeScaleAndOrigin();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2376,10 +2376,10 @@ void wxWindowDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
|
|||||||
{
|
{
|
||||||
m_signX = (xLeftRight ? 1 : -1);
|
m_signX = (xLeftRight ? 1 : -1);
|
||||||
m_signY = (yBottomUp ? -1 : 1);
|
m_signY = (yBottomUp ? -1 : 1);
|
||||||
|
|
||||||
if (m_owner && m_owner->m_wxwindow && (m_owner->GetLayoutDirection() == wxLayout_RightToLeft))
|
if (m_owner && m_owner->m_wxwindow && (m_owner->GetLayoutDirection() == wxLayout_RightToLeft))
|
||||||
m_signX = -m_signX;
|
m_signX = -m_signX;
|
||||||
|
|
||||||
ComputeScaleAndOrigin();
|
ComputeScaleAndOrigin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -337,7 +337,7 @@ static gboolean target_drag_drop( GtkWidget *widget,
|
|||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
wxLogTrace(TRACE_DND, wxT( "Drop target: OnDrop returned FALSE") );
|
wxLogTrace(TRACE_DND, wxT( "Drop target: OnDrop returned FALSE") );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* cancel the whole thing */
|
/* cancel the whole thing */
|
||||||
gtk_drag_finish( context,
|
gtk_drag_finish( context,
|
||||||
FALSE, /* no success */
|
FALSE, /* no success */
|
||||||
@@ -349,7 +349,7 @@ static gboolean target_drag_drop( GtkWidget *widget,
|
|||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
wxLogTrace(TRACE_DND, wxT( "Drop target: OnDrop returned true") );
|
wxLogTrace(TRACE_DND, wxT( "Drop target: OnDrop returned true") );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
/* disable GUI threads */
|
/* disable GUI threads */
|
||||||
#endif
|
#endif
|
||||||
@@ -419,7 +419,7 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget),
|
|||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
wxLogTrace(TRACE_DND, wxT( "Drop target: data received event") );
|
wxLogTrace(TRACE_DND, wxT( "Drop target: data received event") );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* inform the wxDropTarget about the current GtkSelectionData.
|
/* inform the wxDropTarget about the current GtkSelectionData.
|
||||||
this is only valid for the duration of this call */
|
this is only valid for the duration of this call */
|
||||||
drop_target->SetDragData( data );
|
drop_target->SetDragData( data );
|
||||||
@@ -431,7 +431,7 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget),
|
|||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
wxLogTrace(TRACE_DND, wxT( "Drop target: OnData returned true") );
|
wxLogTrace(TRACE_DND, wxT( "Drop target: OnData returned true") );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* tell GTK that data transfer was successful */
|
/* tell GTK that data transfer was successful */
|
||||||
gtk_drag_finish( context, TRUE, FALSE, time );
|
gtk_drag_finish( context, TRUE, FALSE, time );
|
||||||
}
|
}
|
||||||
@@ -440,7 +440,7 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget),
|
|||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
wxLogTrace(TRACE_DND, wxT( "Drop target: OnData returned FALSE") );
|
wxLogTrace(TRACE_DND, wxT( "Drop target: OnData returned FALSE") );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* tell GTK that data transfer was not successful */
|
/* tell GTK that data transfer was not successful */
|
||||||
gtk_drag_finish( context, FALSE, FALSE, time );
|
gtk_drag_finish( context, FALSE, FALSE, time );
|
||||||
}
|
}
|
||||||
@@ -615,7 +615,7 @@ source_drag_data_get (GtkWidget *WXUNUSED(widget),
|
|||||||
wxLogTrace(TRACE_DND, wxT("Drop source: format requested: %s"),
|
wxLogTrace(TRACE_DND, wxT("Drop source: format requested: %s"),
|
||||||
format.GetId().c_str());
|
format.GetId().c_str());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
drop_source->m_retValue = wxDragCancel;
|
drop_source->m_retValue = wxDragCancel;
|
||||||
|
|
||||||
wxDataObject *data = drop_source->GetDataObject();
|
wxDataObject *data = drop_source->GetDataObject();
|
||||||
@@ -859,7 +859,7 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
|
|||||||
// don't start dragging if no button is down
|
// don't start dragging if no button is down
|
||||||
if (g_lastButtonNumber == 0)
|
if (g_lastButtonNumber == 0)
|
||||||
return wxDragNone;
|
return wxDragNone;
|
||||||
|
|
||||||
// we can only start a drag after a mouse event
|
// we can only start a drag after a mouse event
|
||||||
if (g_lastMouseEvent == NULL)
|
if (g_lastMouseEvent == NULL)
|
||||||
return wxDragNone;
|
return wxDragNone;
|
||||||
|
@@ -232,7 +232,7 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
|
|||||||
|
|
||||||
#if wxUSE_STATUSBAR
|
#if wxUSE_STATUSBAR
|
||||||
// status bar
|
// status bar
|
||||||
if (m_frameStatusBar && m_frameStatusBar->IsShown() &&
|
if (m_frameStatusBar && m_frameStatusBar->IsShown() &&
|
||||||
!(m_fsIsShowing && (m_fsSaveFlag & wxFULLSCREEN_NOSTATUSBAR) != 0))
|
!(m_fsIsShowing && (m_fsSaveFlag & wxFULLSCREEN_NOSTATUSBAR) != 0))
|
||||||
(*height) -= wxSTATUS_HEIGHT;
|
(*height) -= wxSTATUS_HEIGHT;
|
||||||
#endif // wxUSE_STATUSBAR
|
#endif // wxUSE_STATUSBAR
|
||||||
@@ -288,7 +288,7 @@ void wxFrame::DoSetClientSize( int width, int height )
|
|||||||
|
|
||||||
#if wxUSE_STATUSBAR
|
#if wxUSE_STATUSBAR
|
||||||
// status bar
|
// status bar
|
||||||
if (m_frameStatusBar && m_frameStatusBar->IsShown() &&
|
if (m_frameStatusBar && m_frameStatusBar->IsShown() &&
|
||||||
!(m_fsIsShowing && (m_fsSaveFlag & wxFULLSCREEN_NOSTATUSBAR) != 0))
|
!(m_fsIsShowing && (m_fsSaveFlag & wxFULLSCREEN_NOSTATUSBAR) != 0))
|
||||||
height += wxSTATUS_HEIGHT;
|
height += wxSTATUS_HEIGHT;
|
||||||
#endif
|
#endif
|
||||||
@@ -485,7 +485,7 @@ void wxFrame::GtkOnSize()
|
|||||||
{
|
{
|
||||||
if (!GTK_WIDGET_VISIBLE(m_frameStatusBar->m_widget))
|
if (!GTK_WIDGET_VISIBLE(m_frameStatusBar->m_widget))
|
||||||
gtk_widget_show( m_frameStatusBar->m_widget );
|
gtk_widget_show( m_frameStatusBar->m_widget );
|
||||||
|
|
||||||
int xx = 0 + m_miniEdge;
|
int xx = 0 + m_miniEdge;
|
||||||
int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge - client_area_y_offset;
|
int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge - client_area_y_offset;
|
||||||
int ww = m_width - 2*m_miniEdge;
|
int ww = m_width - 2*m_miniEdge;
|
||||||
|
@@ -857,7 +857,7 @@ wxGnomePrintDC::wxGnomePrintDC( wxGnomePrinter *printer )
|
|||||||
|
|
||||||
m_signX = 1; // default x-axis left to right
|
m_signX = 1; // default x-axis left to right
|
||||||
m_signY = -1; // default y-axis bottom up -> top down
|
m_signY = -1; // default y-axis bottom up -> top down
|
||||||
|
|
||||||
GetSize( NULL, &m_deviceOffsetY );
|
GetSize( NULL, &m_deviceOffsetY );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -882,8 +882,8 @@ wxGnomePrintDC::wxGnomePrintDC( const wxPrintData& data )
|
|||||||
m_currentGreen = 0;
|
m_currentGreen = 0;
|
||||||
|
|
||||||
m_signX = 1; // default x-axis left to right
|
m_signX = 1; // default x-axis left to right
|
||||||
m_signY = -1; // default y-axis bottom up -> top down
|
m_signY = -1; // default y-axis bottom up -> top down
|
||||||
|
|
||||||
GetSize( NULL, &m_deviceOffsetY );
|
GetSize( NULL, &m_deviceOffsetY );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1940,7 +1940,7 @@ void wxGnomePrintPreview::DetermineScaling()
|
|||||||
m_previewPrintout->SetPPIPrinter(wxGnomePrintDC::GetResolution(), wxGnomePrintDC::GetResolution());
|
m_previewPrintout->SetPPIPrinter(wxGnomePrintDC::GetResolution(), wxGnomePrintDC::GetResolution());
|
||||||
|
|
||||||
wxSize sizeDevUnits(paper->GetSizeDeviceUnits());
|
wxSize sizeDevUnits(paper->GetSizeDeviceUnits());
|
||||||
|
|
||||||
// TODO: get better resolution information from wxGnomePrintDC, if possible.
|
// TODO: get better resolution information from wxGnomePrintDC, if possible.
|
||||||
|
|
||||||
sizeDevUnits.x = (wxCoord)((float)sizeDevUnits.x * wxGnomePrintDC::GetResolution() / 72.0);
|
sizeDevUnits.x = (wxCoord)((float)sizeDevUnits.x * wxGnomePrintDC::GetResolution() / 72.0);
|
||||||
|
@@ -113,7 +113,7 @@ bool wxHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
// wxWindowGTK will connect to the enter_notify and leave_notify GTK+ signals
|
// wxWindowGTK will connect to the enter_notify and leave_notify GTK+ signals
|
||||||
// thus overriding GTK+'s internal signal handlers which set the cursor of
|
// thus overriding GTK+'s internal signal handlers which set the cursor of
|
||||||
// the widget - thus we need to manually set it here:
|
// the widget - thus we need to manually set it here:
|
||||||
SetCursor(wxCursor(wxCURSOR_HAND));
|
SetCursor(wxCursor(wxCURSOR_HAND));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -83,7 +83,7 @@ gtk_listbox_row_activated_callback(GtkTreeView *treeview,
|
|||||||
if (listbox->IsSelected(sel))
|
if (listbox->IsSelected(sel))
|
||||||
{
|
{
|
||||||
GtkTreeEntry* entry = listbox->GtkGetEntry(sel);
|
GtkTreeEntry* entry = listbox->GtkGetEntry(sel);
|
||||||
|
|
||||||
if (entry)
|
if (entry)
|
||||||
{
|
{
|
||||||
event.SetInt(sel);
|
event.SetInt(sel);
|
||||||
@@ -93,7 +93,7 @@ gtk_listbox_row_activated_callback(GtkTreeView *treeview,
|
|||||||
event.SetClientObject( (wxClientData*) gtk_tree_entry_get_userdata(entry) );
|
event.SetClientObject( (wxClientData*) gtk_tree_entry_get_userdata(entry) );
|
||||||
else if ( listbox->HasClientUntypedData() )
|
else if ( listbox->HasClientUntypedData() )
|
||||||
event.SetClientData( gtk_tree_entry_get_userdata(entry) );
|
event.SetClientData( gtk_tree_entry_get_userdata(entry) );
|
||||||
|
|
||||||
g_object_unref (entry);
|
g_object_unref (entry);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -148,9 +148,9 @@ static void
|
|||||||
gtk_listitem_changed_callback( GtkTreeSelection* selection, wxListBox *listbox )
|
gtk_listitem_changed_callback( GtkTreeSelection* selection, wxListBox *listbox )
|
||||||
{
|
{
|
||||||
if (g_blockEventsOnDrag) return;
|
if (g_blockEventsOnDrag) return;
|
||||||
|
|
||||||
if (listbox->m_blockEvent) return;
|
if (listbox->m_blockEvent) return;
|
||||||
|
|
||||||
wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, listbox->GetId() );
|
wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, listbox->GetId() );
|
||||||
event.SetEventObject( listbox );
|
event.SetEventObject( listbox );
|
||||||
|
|
||||||
@@ -158,15 +158,15 @@ gtk_listitem_changed_callback( GtkTreeSelection* selection, wxListBox *listbox )
|
|||||||
{
|
{
|
||||||
wxArrayInt selections;
|
wxArrayInt selections;
|
||||||
listbox->GetSelections( selections );
|
listbox->GetSelections( selections );
|
||||||
|
|
||||||
if (selections.GetCount() == 0)
|
if (selections.GetCount() == 0)
|
||||||
{
|
{
|
||||||
// indicate that this is a deselection
|
// indicate that this is a deselection
|
||||||
event.SetExtraLong( 0 );
|
event.SetExtraLong( 0 );
|
||||||
event.SetInt( -1 );
|
event.SetInt( -1 );
|
||||||
|
|
||||||
listbox->GetEventHandler()->ProcessEvent( event );
|
listbox->GetEventHandler()->ProcessEvent( event );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -174,7 +174,7 @@ gtk_listitem_changed_callback( GtkTreeSelection* selection, wxListBox *listbox )
|
|||||||
// indicate that this is a selection
|
// indicate that this is a selection
|
||||||
event.SetExtraLong( 1 );
|
event.SetExtraLong( 1 );
|
||||||
event.SetInt( selections[0] );
|
event.SetInt( selections[0] );
|
||||||
|
|
||||||
listbox->GetEventHandler()->ProcessEvent( event );
|
listbox->GetEventHandler()->ProcessEvent( event );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -186,9 +186,9 @@ gtk_listitem_changed_callback( GtkTreeSelection* selection, wxListBox *listbox )
|
|||||||
// indicate that this is a deselection
|
// indicate that this is a deselection
|
||||||
event.SetExtraLong( 0 );
|
event.SetExtraLong( 0 );
|
||||||
event.SetInt( -1 );
|
event.SetInt( -1 );
|
||||||
|
|
||||||
listbox->GetEventHandler()->ProcessEvent( event );
|
listbox->GetEventHandler()->ProcessEvent( event );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -406,7 +406,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
|
|
||||||
GtkTreeSelection* selection = gtk_tree_view_get_selection( m_treeview );
|
GtkTreeSelection* selection = gtk_tree_view_get_selection( m_treeview );
|
||||||
|
|
||||||
g_signal_connect_after (selection, "changed",
|
g_signal_connect_after (selection, "changed",
|
||||||
G_CALLBACK (gtk_listitem_changed_callback), this);
|
G_CALLBACK (gtk_listitem_changed_callback), this);
|
||||||
|
|
||||||
|
@@ -1,14 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: main.cpp
|
|
||||||
// Purpose: Entry point
|
|
||||||
// Author: Julian Smart
|
|
||||||
// Modified by:
|
|
||||||
// Created: 17/09/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Julian Smart
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// We don't put main() in the library any more. RR.
|
|
||||||
|
|
@@ -250,7 +250,7 @@ wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const
|
|||||||
|
|
||||||
gint i = gtk_notebook_get_current_page( notebook );
|
gint i = gtk_notebook_get_current_page( notebook );
|
||||||
if (i < 0) return (wxMDIChildFrame*) NULL;
|
if (i < 0) return (wxMDIChildFrame*) NULL;
|
||||||
|
|
||||||
GtkNotebookPage* page = (GtkNotebookPage*) (g_list_nth(notebook->children,i)->data);
|
GtkNotebookPage* page = (GtkNotebookPage*) (g_list_nth(notebook->children,i)->data);
|
||||||
if (!page) return (wxMDIChildFrame*) NULL;
|
if (!page) return (wxMDIChildFrame*) NULL;
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const
|
|||||||
{
|
{
|
||||||
if ( wxPendingDelete.Member(node->GetData()) )
|
if ( wxPendingDelete.Member(node->GetData()) )
|
||||||
return (wxMDIChildFrame*) NULL;
|
return (wxMDIChildFrame*) NULL;
|
||||||
|
|
||||||
wxMDIChildFrame *child_frame = wxDynamicCast( node->GetData(), wxMDIChildFrame );
|
wxMDIChildFrame *child_frame = wxDynamicCast( node->GetData(), wxMDIChildFrame );
|
||||||
|
|
||||||
if (!child_frame)
|
if (!child_frame)
|
||||||
@@ -267,7 +267,7 @@ wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const
|
|||||||
|
|
||||||
if (child_frame->m_page == page)
|
if (child_frame->m_page == page)
|
||||||
return child_frame;
|
return child_frame;
|
||||||
|
|
||||||
node = node->GetNext();
|
node = node->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -45,10 +45,10 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent,
|
|||||||
|
|
||||||
if (style & wxYES_NO)
|
if (style & wxYES_NO)
|
||||||
{
|
{
|
||||||
if (style & wxCANCEL)
|
if (style & wxCANCEL)
|
||||||
buttons = GTK_BUTTONS_NONE;
|
buttons = GTK_BUTTONS_NONE;
|
||||||
else
|
else
|
||||||
buttons = GTK_BUTTONS_YES_NO;
|
buttons = GTK_BUTTONS_YES_NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (style & wxOK)
|
if (style & wxOK)
|
||||||
@@ -84,14 +84,14 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent,
|
|||||||
if (style & wxYES_NO)
|
if (style & wxYES_NO)
|
||||||
{
|
{
|
||||||
if (style & wxCANCEL)
|
if (style & wxCANCEL)
|
||||||
{
|
{
|
||||||
gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_NO,
|
gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_NO,
|
||||||
GTK_RESPONSE_NO);
|
GTK_RESPONSE_NO);
|
||||||
gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_CANCEL,
|
gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_CANCEL,
|
||||||
GTK_RESPONSE_CANCEL);
|
GTK_RESPONSE_CANCEL);
|
||||||
gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_YES,
|
gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_YES,
|
||||||
GTK_RESPONSE_YES);
|
GTK_RESPONSE_YES);
|
||||||
}
|
}
|
||||||
if (style & wxNO_DEFAULT)
|
if (style & wxNO_DEFAULT)
|
||||||
gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_NO);
|
gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_NO);
|
||||||
else
|
else
|
||||||
|
@@ -402,7 +402,7 @@ int wxNotebook::DoSetSelection( size_t page, int flags )
|
|||||||
if ( !(flags & SetSelection_SendEvent) )
|
if ( !(flags & SetSelection_SendEvent) )
|
||||||
{
|
{
|
||||||
// reconnect to signals
|
// reconnect to signals
|
||||||
|
|
||||||
g_signal_connect (m_widget, "switch_page",
|
g_signal_connect (m_widget, "switch_page",
|
||||||
G_CALLBACK (gtk_notebook_page_changing_callback), this);
|
G_CALLBACK (gtk_notebook_page_changing_callback), this);
|
||||||
|
|
||||||
@@ -658,7 +658,7 @@ bool wxNotebook::InsertPage( size_t position,
|
|||||||
|
|
||||||
/* show the label */
|
/* show the label */
|
||||||
gtk_widget_show( GTK_WIDGET(nb_page->m_label) );
|
gtk_widget_show( GTK_WIDGET(nb_page->m_label) );
|
||||||
|
|
||||||
if (select && (m_pagesData.GetCount() > 1))
|
if (select && (m_pagesData.GetCount() > 1))
|
||||||
{
|
{
|
||||||
SetSelection( position );
|
SetSelection( position );
|
||||||
|
@@ -459,7 +459,7 @@ wxRect wxRegionIterator::GetRect() const
|
|||||||
wxRegionIterator& wxRegionIterator::operator=(const wxRegionIterator& ri)
|
wxRegionIterator& wxRegionIterator::operator=(const wxRegionIterator& ri)
|
||||||
{
|
{
|
||||||
wxDELETEA(m_rects);
|
wxDELETEA(m_rects);
|
||||||
|
|
||||||
m_current = ri.m_current;
|
m_current = ri.m_current;
|
||||||
m_numRects = ri.m_numRects;
|
m_numRects = ri.m_numRects;
|
||||||
if ( m_numRects )
|
if ( m_numRects )
|
||||||
|
@@ -199,7 +199,7 @@ wxRendererGTK::DrawHeaderButton(wxWindow *win,
|
|||||||
int x_diff = 0;
|
int x_diff = 0;
|
||||||
if (win->GetLayoutDirection() == wxLayout_RightToLeft)
|
if (win->GetLayoutDirection() == wxLayout_RightToLeft)
|
||||||
x_diff = rect.width;
|
x_diff = rect.width;
|
||||||
|
|
||||||
gtk_paint_box
|
gtk_paint_box
|
||||||
(
|
(
|
||||||
button->style,
|
button->style,
|
||||||
@@ -334,7 +334,7 @@ wxRendererGTK::DrawSplitterSash(wxWindow *win,
|
|||||||
rect.height = full_size;
|
rect.height = full_size;
|
||||||
rect.width = w;
|
rect.width = w;
|
||||||
}
|
}
|
||||||
|
|
||||||
int x_diff = 0;
|
int x_diff = 0;
|
||||||
if (win->GetLayoutDirection() == wxLayout_RightToLeft)
|
if (win->GetLayoutDirection() == wxLayout_RightToLeft)
|
||||||
x_diff = rect.width;
|
x_diff = rect.width;
|
||||||
@@ -540,7 +540,7 @@ wxRendererGTK::DrawItemSelectionRect(wxWindow *win,
|
|||||||
|
|
||||||
if (flags & wxCONTROL_CURRENT)
|
if (flags & wxCONTROL_CURRENT)
|
||||||
{
|
{
|
||||||
gtk_paint_focus( win->m_widget->style,
|
gtk_paint_focus( win->m_widget->style,
|
||||||
gdk_window,
|
gdk_window,
|
||||||
state,
|
state,
|
||||||
NULL,
|
NULL,
|
||||||
|
@@ -516,7 +516,7 @@ int wxSystemSettingsNative::GetMetric( wxSystemMetric index, wxWindow* win )
|
|||||||
// since that is what the API wants. But the values
|
// since that is what the API wants. But the values
|
||||||
// are much bigger under GNOME than under Windows and
|
// are much bigger under GNOME than under Windows and
|
||||||
// just seem to much in many cases to be useful.
|
// just seem to much in many cases to be useful.
|
||||||
// drag_threshold *= 2;
|
// drag_threshold *= 2;
|
||||||
|
|
||||||
return drag_threshold;
|
return drag_threshold;
|
||||||
|
|
||||||
|
@@ -72,15 +72,15 @@ bool wxStaticText::Create(wxWindow *parent,
|
|||||||
justify = GTK_JUSTIFY_RIGHT;
|
justify = GTK_JUSTIFY_RIGHT;
|
||||||
else // wxALIGN_LEFT is 0
|
else // wxALIGN_LEFT is 0
|
||||||
justify = GTK_JUSTIFY_LEFT;
|
justify = GTK_JUSTIFY_LEFT;
|
||||||
|
|
||||||
if (GetLayoutDirection() == wxLayout_RightToLeft)
|
if (GetLayoutDirection() == wxLayout_RightToLeft)
|
||||||
{
|
{
|
||||||
if (justify == GTK_JUSTIFY_RIGHT)
|
if (justify == GTK_JUSTIFY_RIGHT)
|
||||||
justify = GTK_JUSTIFY_LEFT;
|
justify = GTK_JUSTIFY_LEFT;
|
||||||
if (justify == GTK_JUSTIFY_LEFT)
|
if (justify == GTK_JUSTIFY_LEFT)
|
||||||
justify = GTK_JUSTIFY_RIGHT;
|
justify = GTK_JUSTIFY_RIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_label_set_justify(GTK_LABEL(m_widget), justify);
|
gtk_label_set_justify(GTK_LABEL(m_widget), justify);
|
||||||
|
|
||||||
// GTK_JUSTIFY_LEFT is 0, RIGHT 1 and CENTER 2
|
// GTK_JUSTIFY_LEFT is 0, RIGHT 1 and CENTER 2
|
||||||
|
@@ -223,7 +223,7 @@ void gtktoolwidget_size_callback( GtkWidget *widget,
|
|||||||
{
|
{
|
||||||
// this shouldn't happen...
|
// this shouldn't happen...
|
||||||
if (win->GetParent()->m_wxwindow) return;
|
if (win->GetParent()->m_wxwindow) return;
|
||||||
|
|
||||||
wxSize size = win->GetEffectiveMinSize();
|
wxSize size = win->GetEffectiveMinSize();
|
||||||
if (size.y != alloc->height)
|
if (size.y != alloc->height)
|
||||||
{
|
{
|
||||||
@@ -474,11 +474,11 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
|
|||||||
(const char *) NULL,
|
(const char *) NULL,
|
||||||
posGtk
|
posGtk
|
||||||
);
|
);
|
||||||
|
|
||||||
// connect after in order to correct size_allocate events
|
// connect after in order to correct size_allocate events
|
||||||
g_signal_connect_after (tool->GetControl()->m_widget, "size_allocate",
|
g_signal_connect_after (tool->GetControl()->m_widget, "size_allocate",
|
||||||
G_CALLBACK (gtktoolwidget_size_callback), tool->GetControl());
|
G_CALLBACK (gtktoolwidget_size_callback), tool->GetControl());
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -606,7 +606,7 @@ void wxToolBar::SetToolNormalBitmap( int id, const wxBitmap& bitmap )
|
|||||||
|
|
||||||
tool->SetNormalBitmap(bitmap);
|
tool->SetNormalBitmap(bitmap);
|
||||||
tool->SetImage(tool->GetBitmap());
|
tool->SetImage(tool->GetBitmap());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
|
void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
|
||||||
@@ -618,7 +618,7 @@ void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
|
|||||||
|
|
||||||
tool->SetDisabledBitmap(bitmap);
|
tool->SetDisabledBitmap(bitmap);
|
||||||
tool->SetImage(tool->GetBitmap());
|
tool->SetImage(tool->GetBitmap());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -629,7 +629,7 @@ void wxToolBar::OnInternalIdle()
|
|||||||
{
|
{
|
||||||
// Check if we have to show window now
|
// Check if we have to show window now
|
||||||
if (GtkShowFromOnIdle()) return;
|
if (GtkShowFromOnIdle()) return;
|
||||||
|
|
||||||
wxCursor cursor = m_cursor;
|
wxCursor cursor = m_cursor;
|
||||||
if (g_globalCursor.Ok()) cursor = g_globalCursor;
|
if (g_globalCursor.Ok()) cursor = g_globalCursor;
|
||||||
|
|
||||||
|
@@ -258,11 +258,11 @@ gint gtk_pizza_get_rtl_offset (GtkPizza *pizza)
|
|||||||
|
|
||||||
g_return_val_if_fail ( (pizza != NULL), 0 );
|
g_return_val_if_fail ( (pizza != NULL), 0 );
|
||||||
g_return_val_if_fail ( (GTK_IS_PIZZA (pizza)), 0 );
|
g_return_val_if_fail ( (GTK_IS_PIZZA (pizza)), 0 );
|
||||||
|
|
||||||
if (!pizza->bin_window) return 0;
|
if (!pizza->bin_window) return 0;
|
||||||
|
|
||||||
border = pizza->container.border_width;
|
border = pizza->container.border_width;
|
||||||
|
|
||||||
return GTK_WIDGET(pizza)->allocation.width - border*2;
|
return GTK_WIDGET(pizza)->allocation.width - border*2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -544,7 +544,7 @@ gtk_pizza_size_allocate (GtkWidget *widget,
|
|||||||
widget->allocation = *allocation;
|
widget->allocation = *allocation;
|
||||||
|
|
||||||
border = pizza->container.border_width;
|
border = pizza->container.border_width;
|
||||||
|
|
||||||
x = allocation->x + border;
|
x = allocation->x + border;
|
||||||
y = allocation->y + border;
|
y = allocation->y + border;
|
||||||
w = allocation->width - border*2;
|
w = allocation->width - border*2;
|
||||||
@@ -679,15 +679,15 @@ gtk_pizza_allocate_child (GtkPizza *pizza,
|
|||||||
if (gtk_widget_get_direction( GTK_WIDGET(pizza) ) == GTK_TEXT_DIR_RTL)
|
if (gtk_widget_get_direction( GTK_WIDGET(pizza) ) == GTK_TEXT_DIR_RTL)
|
||||||
{
|
{
|
||||||
/* reverse horizontal placement */
|
/* reverse horizontal placement */
|
||||||
gint offset,border;
|
gint offset,border;
|
||||||
|
|
||||||
offset = GTK_WIDGET(pizza)->allocation.width;
|
offset = GTK_WIDGET(pizza)->allocation.width;
|
||||||
border = pizza->container.border_width;
|
border = pizza->container.border_width;
|
||||||
offset -= border*2;
|
offset -= border*2;
|
||||||
|
|
||||||
allocation.x = offset - child->x - allocation.width + pizza->m_xoffset;
|
allocation.x = offset - child->x - allocation.width + pizza->m_xoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_widget_size_allocate (child->widget, &allocation);
|
gtk_widget_size_allocate (child->widget, &allocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1683,9 +1683,9 @@ gtk_window_button_release_callback( GtkWidget *widget,
|
|||||||
event.SetId( win->GetId() );
|
event.SetId( win->GetId() );
|
||||||
|
|
||||||
bool ret = win->GTKProcessEvent(event);
|
bool ret = win->GTKProcessEvent(event);
|
||||||
|
|
||||||
g_lastMouseEvent = NULL;
|
g_lastMouseEvent = NULL;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1354,7 +1354,7 @@ wxMask::wxMask(const wxMask &mask)
|
|||||||
SelectObject(destDC, (HBITMAP) m_maskBitmap);
|
SelectObject(destDC, (HBITMAP) m_maskBitmap);
|
||||||
|
|
||||||
BitBlt(destDC, 0, 0, w, h, srcDC, 0, 0, SRCCOPY);
|
BitBlt(destDC, 0, 0, w, h, srcDC, 0, 0, SRCCOPY);
|
||||||
|
|
||||||
SelectObject(srcDC, 0);
|
SelectObject(srcDC, 0);
|
||||||
DeleteDC(srcDC);
|
DeleteDC(srcDC);
|
||||||
SelectObject(destDC, 0);
|
SelectObject(destDC, 0);
|
||||||
|
@@ -506,7 +506,7 @@ void wxChoice::DoSetSize(int x, int y,
|
|||||||
int sizeFlags)
|
int sizeFlags)
|
||||||
{
|
{
|
||||||
int heightOrig = height;
|
int heightOrig = height;
|
||||||
|
|
||||||
// the height which we must pass to Windows should be the total height of
|
// the height which we must pass to Windows should be the total height of
|
||||||
// the control including the drop down list while the height given to us
|
// the control including the drop down list while the height given to us
|
||||||
// is, of course, just the height of the permanently visible part of it
|
// is, of course, just the height of the permanently visible part of it
|
||||||
|
@@ -265,7 +265,7 @@ bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
{
|
{
|
||||||
if (SendMessage(GetHwnd(), CB_GETDROPPEDSTATE, 0, 0))
|
if (SendMessage(GetHwnd(), CB_GETDROPPEDSTATE, 0, 0))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
|
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
|
||||||
|
|
||||||
const int sel = GetSelection();
|
const int sel = GetSelection();
|
||||||
|
@@ -201,7 +201,7 @@ bool wxCrashReportImpl::Generate(int flags, EXCEPTION_POINTERS *ep)
|
|||||||
dumpFlags = (MINIDUMP_TYPE)(MiniDumpScanMemory
|
dumpFlags = (MINIDUMP_TYPE)(MiniDumpScanMemory
|
||||||
#if _MSC_VER > 1300
|
#if _MSC_VER > 1300
|
||||||
|MiniDumpWithIndirectlyReferencedMemory
|
|MiniDumpWithIndirectlyReferencedMemory
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -549,9 +549,9 @@ void wxGLCanvas::OnSize(wxSizeEvent& WXUNUSED(event))
|
|||||||
void wxGLCanvas::SetCurrent(const wxGLContext& RC) const
|
void wxGLCanvas::SetCurrent(const wxGLContext& RC) const
|
||||||
{
|
{
|
||||||
// although on MSW it works even if the window is still hidden, it doesn't
|
// although on MSW it works even if the window is still hidden, it doesn't
|
||||||
// under wxGTK and documentation mentions that SetCurrent() can only be
|
// under wxGTK and documentation mentions that SetCurrent() can only be
|
||||||
// called for a shown window, so check it
|
// called for a shown window, so check it
|
||||||
wxASSERT_MSG( GetParent()->IsShown(), _T("can't make hidden GL canvas current") );
|
wxASSERT_MSG( GetParent()->IsShown(), _T("can't make hidden GL canvas current") );
|
||||||
|
|
||||||
RC.SetCurrent(*this);
|
RC.SetCurrent(*this);
|
||||||
}
|
}
|
||||||
|
@@ -178,7 +178,7 @@ public :
|
|||||||
// gets the component valuess of the matrix
|
// gets the component valuess of the matrix
|
||||||
virtual void Get(wxDouble* a=NULL, wxDouble* b=NULL, wxDouble* c=NULL,
|
virtual void Get(wxDouble* a=NULL, wxDouble* b=NULL, wxDouble* c=NULL,
|
||||||
wxDouble* d=NULL, wxDouble* tx=NULL, wxDouble* ty=NULL) const;
|
wxDouble* d=NULL, wxDouble* tx=NULL, wxDouble* ty=NULL) const;
|
||||||
|
|
||||||
// makes this the inverse matrix
|
// makes this the inverse matrix
|
||||||
virtual void Invert();
|
virtual void Invert();
|
||||||
|
|
||||||
|
@@ -864,9 +864,9 @@ GSocketEventFlags GSocket::Select(GSocketEventFlags flags)
|
|||||||
result |= GSOCK_INPUT_FLAG;
|
result |= GSOCK_INPUT_FLAG;
|
||||||
|
|
||||||
if (m_server && m_stream)
|
if (m_server && m_stream)
|
||||||
{
|
{
|
||||||
/* This is a TCP server socket that detected a connection.
|
/* This is a TCP server socket that detected a connection.
|
||||||
While the INPUT_FLAG is also set, it doesn't matter on
|
While the INPUT_FLAG is also set, it doesn't matter on
|
||||||
this kind of sockets, as we can only Accept() from them. */
|
this kind of sockets, as we can only Accept() from them. */
|
||||||
result |= GSOCK_CONNECTION_FLAG;
|
result |= GSOCK_CONNECTION_FLAG;
|
||||||
m_detected |= GSOCK_CONNECTION_FLAG;
|
m_detected |= GSOCK_CONNECTION_FLAG;
|
||||||
|
@@ -1780,10 +1780,10 @@ int WXDLLIMPEXP_CORE wxMSWGetColumnClicked(NMHDR *nmhdr, POINT *ptClick)
|
|||||||
|
|
||||||
// where did the click occur?
|
// where did the click occur?
|
||||||
#if defined(__WXWINCE__) && !defined(__HANDHELDPC__) && _WIN32_WCE < 400
|
#if defined(__WXWINCE__) && !defined(__HANDHELDPC__) && _WIN32_WCE < 400
|
||||||
if (nmhdr->code == GN_CONTEXTMENU)
|
if (nmhdr->code == GN_CONTEXTMENU)
|
||||||
{
|
{
|
||||||
*ptClick = ((NMRGINFO*)nmhdr)->ptAction;
|
*ptClick = ((NMRGINFO*)nmhdr)->ptAction;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif //__WXWINCE__
|
#endif //__WXWINCE__
|
||||||
if ( !::GetCursorPos(ptClick) )
|
if ( !::GetCursorPos(ptClick) )
|
||||||
|
@@ -77,7 +77,7 @@ typedef struct tagMENUINFO
|
|||||||
} MENUINFO, FAR *LPMENUINFO;
|
} MENUINFO, FAR *LPMENUINFO;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_OWNER_DRAWN
|
#if wxUSE_OWNER_DRAWN
|
||||||
#include "wx/dynlib.h"
|
#include "wx/dynlib.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -451,14 +451,14 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
|||||||
!pItem->GetBackgroundColour().Ok() &&
|
!pItem->GetBackgroundColour().Ok() &&
|
||||||
!pItem->GetFont().Ok() )
|
!pItem->GetFont().Ok() )
|
||||||
{
|
{
|
||||||
// try to use InsertMenuItem() as it's guaranteed to look correct
|
// try to use InsertMenuItem() as it's guaranteed to look correct
|
||||||
// while our owner-drawn code is not
|
// while our owner-drawn code is not
|
||||||
#ifndef __DMC__
|
#ifndef __DMC__
|
||||||
// DMC at march 2007 doesn't have HBITMAP hbmpItem tagMENUITEMINFOA /W
|
// DMC at march 2007 doesn't have HBITMAP hbmpItem tagMENUITEMINFOA /W
|
||||||
// MIIM_BITMAP only works under WinME/2000+
|
// MIIM_BITMAP only works under WinME/2000+
|
||||||
WinStruct<MENUITEMINFO> mii;
|
WinStruct<MENUITEMINFO> mii;
|
||||||
if ( wxGetWinVersion() >= wxWinVersion_98 )
|
if ( wxGetWinVersion() >= wxWinVersion_98 )
|
||||||
{
|
{
|
||||||
mii.fMask = MIIM_STRING | MIIM_DATA | MIIM_BITMAP;
|
mii.fMask = MIIM_STRING | MIIM_DATA | MIIM_BITMAP;
|
||||||
if ( pItem->IsCheckable() )
|
if ( pItem->IsCheckable() )
|
||||||
{
|
{
|
||||||
|
@@ -42,7 +42,7 @@ int GetScrollPosWX (HWND hWnd, int iSBar)
|
|||||||
}
|
}
|
||||||
|
|
||||||
BOOL ScrollWindow(HWND hWnd, int xAmount, int yAmount,
|
BOOL ScrollWindow(HWND hWnd, int xAmount, int yAmount,
|
||||||
CONST RECT* lpRect, CONST RECT* lpClipRect)
|
CONST RECT* lpRect, CONST RECT* lpClipRect)
|
||||||
{
|
{
|
||||||
/* TODO */
|
/* TODO */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -243,34 +243,34 @@ int GetObject(HGDIOBJ hObj, int sz, LPVOID logObj)
|
|||||||
|
|
||||||
GdGetFontInfo(((MWFONTOBJ*) hFont)->pfont, &fi);
|
GdGetFontInfo(((MWFONTOBJ*) hFont)->pfont, &fi);
|
||||||
|
|
||||||
/* FIXME many items are guessed for the time being*/
|
/* FIXME many items are guessed for the time being*/
|
||||||
logFont->lfHeight = fi.height;
|
logFont->lfHeight = fi.height;
|
||||||
|
|
||||||
/* reversed for kaffe port
|
/* reversed for kaffe port
|
||||||
logFont->tmAscent = fi.height - fi.baseline;
|
logFont->tmAscent = fi.height - fi.baseline;
|
||||||
logFont->tmDescent= fi.baseline;
|
logFont->tmDescent= fi.baseline;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
logFont->lfWidth = fi.widths['x'];
|
logFont->lfWidth = fi.widths['x'];
|
||||||
logFont->lfWeight = FW_NORMAL;
|
logFont->lfWeight = FW_NORMAL;
|
||||||
logFont->lfEscapement = 0;
|
logFont->lfEscapement = 0;
|
||||||
logFont->lfOrientation = 0;
|
logFont->lfOrientation = 0;
|
||||||
logFont->lfOutPrecision = OUT_OUTLINE_PRECIS;
|
logFont->lfOutPrecision = OUT_OUTLINE_PRECIS;
|
||||||
logFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
|
logFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
|
||||||
logFont->lfQuality = DEFAULT_QUALITY;
|
logFont->lfQuality = DEFAULT_QUALITY;
|
||||||
logFont->lfItalic = 0;
|
logFont->lfItalic = 0;
|
||||||
logFont->lfUnderline = 0;
|
logFont->lfUnderline = 0;
|
||||||
logFont->lfStrikeOut = 0;
|
logFont->lfStrikeOut = 0;
|
||||||
/* note that win32 has the TMPF_FIXED_PITCH flags REVERSED...*/
|
/* note that win32 has the TMPF_FIXED_PITCH flags REVERSED...*/
|
||||||
logFont->lfPitchAndFamily = fi.fixed?
|
logFont->lfPitchAndFamily = fi.fixed?
|
||||||
FF_DONTCARE: (FF_DONTCARE | TMPF_FIXED_PITCH);
|
FF_DONTCARE: (FF_DONTCARE | TMPF_FIXED_PITCH);
|
||||||
logFont->lfCharSet = OEM_CHARSET;
|
logFont->lfCharSet = OEM_CHARSET;
|
||||||
/* TODO I don't know how to get the font name. May
|
/* TODO I don't know how to get the font name. May
|
||||||
* test for different font classes.
|
* test for different font classes.
|
||||||
*/
|
*/
|
||||||
logFont->lfFaceName[0] = 0;
|
logFont->lfFaceName[0] = 0;
|
||||||
#if 0
|
#if 0
|
||||||
strncpy(logFont->lfFaceName, ??, sizeof(logFont->lfFaceName));
|
strncpy(logFont->lfFaceName, ??, sizeof(logFont->lfFaceName));
|
||||||
#endif
|
#endif
|
||||||
return sz;
|
return sz;
|
||||||
}
|
}
|
||||||
@@ -285,36 +285,36 @@ int GetObject(HGDIOBJ hObj, int sz, LPVOID logObj)
|
|||||||
HBITMAP WINAPI
|
HBITMAP WINAPI
|
||||||
CreateCompatibleBitmap(HDC hdc, int nWidth, int nHeight)
|
CreateCompatibleBitmap(HDC hdc, int nWidth, int nHeight)
|
||||||
{
|
{
|
||||||
MWBITMAPOBJ * hbitmap;
|
MWBITMAPOBJ *hbitmap;
|
||||||
int size;
|
int size;
|
||||||
int linelen;
|
int linelen;
|
||||||
|
|
||||||
if(!hdc)
|
if(!hdc)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
nWidth = MWMAX(nWidth, 1);
|
nWidth = MWMAX(nWidth, 1);
|
||||||
nHeight = MWMAX(nHeight, 1);
|
nHeight = MWMAX(nHeight, 1);
|
||||||
|
|
||||||
/* calc memory allocation size and linelen from width and height*/
|
/* calc memory allocation size and linelen from width and height*/
|
||||||
if(!GdCalcMemGCAlloc(hdc->psd, nWidth, nHeight, 0, 0, &size, &linelen))
|
if(!GdCalcMemGCAlloc(hdc->psd, nWidth, nHeight, 0, 0, &size, &linelen))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* allocate gdi object*/
|
/* allocate gdi object*/
|
||||||
hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size);
|
hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size);
|
||||||
if(!hbitmap)
|
if(!hbitmap)
|
||||||
return NULL;
|
return NULL;
|
||||||
hbitmap->hdr.type = OBJ_BITMAP;
|
hbitmap->hdr.type = OBJ_BITMAP;
|
||||||
hbitmap->hdr.stockobj = FALSE;
|
hbitmap->hdr.stockobj = FALSE;
|
||||||
hbitmap->width = nWidth;
|
hbitmap->width = nWidth;
|
||||||
hbitmap->height = nHeight;
|
hbitmap->height = nHeight;
|
||||||
|
|
||||||
/* create compatible with hdc*/
|
/* create compatible with hdc*/
|
||||||
hbitmap->planes = hdc->psd->planes;
|
hbitmap->planes = hdc->psd->planes;
|
||||||
hbitmap->bpp = hdc->psd->bpp;
|
hbitmap->bpp = hdc->psd->bpp;
|
||||||
hbitmap->linelen = linelen;
|
hbitmap->linelen = linelen;
|
||||||
hbitmap->size = size;
|
hbitmap->size = size;
|
||||||
|
|
||||||
return (HBRUSH)hbitmap;
|
return (HBRUSH)hbitmap;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -325,41 +325,41 @@ CreateCompatibleBitmap(HDC hdc, int nWidth, int nHeight)
|
|||||||
HBITMAP WINAPI
|
HBITMAP WINAPI
|
||||||
CreateBitmap( int nWidth, int nHeight, int nPlanes, int bPP, LPCVOID lpData)
|
CreateBitmap( int nWidth, int nHeight, int nPlanes, int bPP, LPCVOID lpData)
|
||||||
{
|
{
|
||||||
MWBITMAPOBJ * hbitmap;
|
MWBITMAPOBJ *hbitmap;
|
||||||
int size;
|
int size;
|
||||||
int linelen;
|
int linelen;
|
||||||
|
|
||||||
HDC hScreenDC;
|
HDC hScreenDC;
|
||||||
|
|
||||||
hScreenDC = GetDC(NULL);
|
hScreenDC = GetDC(NULL);
|
||||||
|
|
||||||
nWidth = MWMAX(nWidth, 1);
|
nWidth = MWMAX(nWidth, 1);
|
||||||
nHeight = MWMAX(nHeight, 1);
|
nHeight = MWMAX(nHeight, 1);
|
||||||
|
|
||||||
/* calc memory allocation size and linelen from width and height*/
|
/* calc memory allocation size and linelen from width and height*/
|
||||||
if(!GdCalcMemGCAlloc(hScreenDC->psd, nWidth, nHeight, nPlanes, bPP, &size, &linelen))
|
if(!GdCalcMemGCAlloc(hScreenDC->psd, nWidth, nHeight, nPlanes, bPP, &size, &linelen))
|
||||||
{
|
{
|
||||||
ReleaseDC(NULL, hScreenDC);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
ReleaseDC(NULL, hScreenDC);
|
ReleaseDC(NULL, hScreenDC);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
ReleaseDC(NULL, hScreenDC);
|
||||||
|
|
||||||
/* allocate gdi object*/
|
/* allocate gdi object*/
|
||||||
hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size);
|
hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size);
|
||||||
if(!hbitmap)
|
if(!hbitmap)
|
||||||
return NULL;
|
return NULL;
|
||||||
hbitmap->hdr.type = OBJ_BITMAP;
|
hbitmap->hdr.type = OBJ_BITMAP;
|
||||||
hbitmap->hdr.stockobj = FALSE;
|
hbitmap->hdr.stockobj = FALSE;
|
||||||
hbitmap->width = nWidth;
|
hbitmap->width = nWidth;
|
||||||
hbitmap->height = nHeight;
|
hbitmap->height = nHeight;
|
||||||
|
|
||||||
/* create with specified parameters */
|
/* create with specified parameters */
|
||||||
hbitmap->planes = nPlanes;
|
hbitmap->planes = nPlanes;
|
||||||
hbitmap->bpp = bPP;
|
hbitmap->bpp = bPP;
|
||||||
hbitmap->linelen = linelen;
|
hbitmap->linelen = linelen;
|
||||||
hbitmap->size = size;
|
hbitmap->size = size;
|
||||||
|
|
||||||
/* TODO: copy data */
|
/* TODO: copy data */
|
||||||
|
|
||||||
return (HBRUSH)hbitmap;
|
return (HBRUSH)hbitmap;
|
||||||
}
|
}
|
||||||
|
@@ -935,7 +935,7 @@ void wxNotebook::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
MSWDefWindowProc(WM_PAINT, (WPARAM)memdc.GetHDC(), 0);
|
MSWDefWindowProc(WM_PAINT, (WPARAM)memdc.GetHDC(), 0);
|
||||||
|
|
||||||
// For some reason in RTL mode, source offset has to be -1, otherwise the
|
// For some reason in RTL mode, source offset has to be -1, otherwise the
|
||||||
// right border (physical) remains unpainted.
|
// right border (physical) remains unpainted.
|
||||||
const wxCoord ofs = dir == wxLayout_RightToLeft ? -1 : 0;
|
const wxCoord ofs = dir == wxLayout_RightToLeft ? -1 : 0;
|
||||||
dc.Blit(ofs, 0, rc.right, rc.bottom, &memdc, ofs, 0);
|
dc.Blit(ofs, 0, rc.right, rc.bottom, &memdc, ofs, 0);
|
||||||
|
@@ -63,7 +63,7 @@ bool wxPalette::FreeResource(bool WXUNUSED(force))
|
|||||||
{
|
{
|
||||||
DeleteObject((HPALETTE)M_PALETTEDATA->m_hPalette);
|
DeleteObject((HPALETTE)M_PALETTEDATA->m_hPalette);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ int wxPalette::GetColoursCount() const
|
|||||||
{
|
{
|
||||||
return ::GetPaletteEntries((HPALETTE) M_PALETTEDATA->m_hPalette, 0, 0, NULL );
|
return ::GetPaletteEntries((HPALETTE) M_PALETTEDATA->m_hPalette, 0, 0, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/msw/printwin.h"
|
#include "wx/msw/printwin.h"
|
||||||
#include "wx/msw/printdlg.h" // RJL used Windows dialog?s
|
#include "wx/msw/printdlg.h"
|
||||||
#include "wx/msw/private.h"
|
#include "wx/msw/private.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -368,7 +368,7 @@ void wxWindowsPrintPreview::DetermineScaling()
|
|||||||
int logPPIPrinterX;
|
int logPPIPrinterX;
|
||||||
int logPPIPrinterY;
|
int logPPIPrinterY;
|
||||||
|
|
||||||
wxRect paperRect;
|
wxRect paperRect;
|
||||||
|
|
||||||
if ( printerDC.Ok() )
|
if ( printerDC.Ok() )
|
||||||
{
|
{
|
||||||
@@ -380,7 +380,7 @@ void wxWindowsPrintPreview::DetermineScaling()
|
|||||||
logPPIPrinterX = ::GetDeviceCaps(dc, LOGPIXELSX);
|
logPPIPrinterX = ::GetDeviceCaps(dc, LOGPIXELSX);
|
||||||
logPPIPrinterY = ::GetDeviceCaps(dc, LOGPIXELSY);
|
logPPIPrinterY = ::GetDeviceCaps(dc, LOGPIXELSY);
|
||||||
|
|
||||||
paperRect = printerDC.GetPaperRect();
|
paperRect = printerDC.GetPaperRect();
|
||||||
|
|
||||||
if ( logPPIPrinterX == 0 ||
|
if ( logPPIPrinterX == 0 ||
|
||||||
logPPIPrinterY == 0 ||
|
logPPIPrinterY == 0 ||
|
||||||
@@ -400,7 +400,7 @@ void wxWindowsPrintPreview::DetermineScaling()
|
|||||||
logPPIPrinterX = 600;
|
logPPIPrinterX = 600;
|
||||||
logPPIPrinterY = 600;
|
logPPIPrinterY = 600;
|
||||||
|
|
||||||
paperRect = wxRect(0, 0, printerXRes, printerYRes);
|
paperRect = wxRect(0, 0, printerXRes, printerYRes);
|
||||||
m_isOk = false;
|
m_isOk = false;
|
||||||
}
|
}
|
||||||
m_pageWidth = printerXRes;
|
m_pageWidth = printerXRes;
|
||||||
|
@@ -125,7 +125,7 @@ public:
|
|||||||
wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE,
|
wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE,
|
||||||
wxHeaderButtonParams* params = NULL);
|
wxHeaderButtonParams* params = NULL);
|
||||||
virtual int GetHeaderButtonHeight(wxWindow *win);
|
virtual int GetHeaderButtonHeight(wxWindow *win);
|
||||||
|
|
||||||
virtual void DrawTreeItemButton(wxWindow *win,
|
virtual void DrawTreeItemButton(wxWindow *win,
|
||||||
wxDC& dc,
|
wxDC& dc,
|
||||||
const wxRect& rect,
|
const wxRect& rect,
|
||||||
@@ -333,7 +333,7 @@ wxRendererXP::DrawHeaderButton(wxWindow *win,
|
|||||||
// NOTE: Using the theme to draw HP_HEADERSORTARROW doesn't do anything.
|
// NOTE: Using the theme to draw HP_HEADERSORTARROW doesn't do anything.
|
||||||
// Why? If this can be fixed then draw the sort arrows using the theme
|
// Why? If this can be fixed then draw the sort arrows using the theme
|
||||||
// and then clear those flags before calling DrawHeaderButtonContents.
|
// and then clear those flags before calling DrawHeaderButtonContents.
|
||||||
|
|
||||||
// Add any extras that are specified in flags and params
|
// Add any extras that are specified in flags and params
|
||||||
return DrawHeaderButtonContents(win, dc, rect, flags, sortArrow, params);
|
return DrawHeaderButtonContents(win, dc, rect, flags, sortArrow, params);
|
||||||
}
|
}
|
||||||
@@ -347,10 +347,10 @@ wxRendererXP::GetHeaderButtonHeight(wxWindow *win)
|
|||||||
{
|
{
|
||||||
return m_rendererNative.GetHeaderButtonHeight(win);
|
return m_rendererNative.GetHeaderButtonHeight(win);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
int value = -1;
|
int value = -1;
|
||||||
|
|
||||||
hr = wxUxThemeEngine::Get()->GetThemeMetric( hTheme,
|
hr = wxUxThemeEngine::Get()->GetThemeMetric( hTheme,
|
||||||
NULL,
|
NULL,
|
||||||
HP_HEADERITEM,
|
HP_HEADERITEM,
|
||||||
|
@@ -257,7 +257,7 @@ void wxSpinButton::SetValue(int val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void wxSpinButton::NormalizeValue()
|
void wxSpinButton::NormalizeValue()
|
||||||
{
|
{
|
||||||
SetValue( GetValue() );
|
SetValue( GetValue() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1073,7 +1073,7 @@ bool wxToolBar::Realize()
|
|||||||
{
|
{
|
||||||
// if not set yet, have one column
|
// if not set yet, have one column
|
||||||
m_maxRows = 1;
|
m_maxRows = 1;
|
||||||
SetRows(m_nButtons);
|
SetRows(m_nButtons);
|
||||||
}
|
}
|
||||||
|
|
||||||
InvalidateBestSize();
|
InvalidateBestSize();
|
||||||
@@ -1340,7 +1340,7 @@ void wxToolBar::SetToolNormalBitmap( int id, const wxBitmap& bitmap )
|
|||||||
|
|
||||||
tool->SetNormalBitmap(bitmap);
|
tool->SetNormalBitmap(bitmap);
|
||||||
Realize();
|
Realize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
|
void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
|
||||||
@@ -1352,7 +1352,7 @@ void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
|
|||||||
|
|
||||||
tool->SetDisabledBitmap(bitmap);
|
tool->SetDisabledBitmap(bitmap);
|
||||||
Realize();
|
Realize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -5779,7 +5779,7 @@ static inline bool wxIsKeyDown(WXWORD vk)
|
|||||||
switch (vk)
|
switch (vk)
|
||||||
{
|
{
|
||||||
case VK_LBUTTON:
|
case VK_LBUTTON:
|
||||||
if (GetSystemMetrics(SM_SWAPBUTTON)) vk = VK_RBUTTON;
|
if (GetSystemMetrics(SM_SWAPBUTTON)) vk = VK_RBUTTON;
|
||||||
break;
|
break;
|
||||||
case VK_RBUTTON:
|
case VK_RBUTTON:
|
||||||
if (GetSystemMetrics(SM_SWAPBUTTON)) vk = VK_LBUTTON;
|
if (GetSystemMetrics(SM_SWAPBUTTON)) vk = VK_LBUTTON;
|
||||||
|
Reference in New Issue
Block a user