From f4322df68b099e5e983acc0a3dad4ad5841b57b5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 7 Mar 2007 22:56:34 +0000 Subject: [PATCH] no changes, just removed TABs/trailing spaces git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/app.cpp | 2 +- src/gtk/combobox.cpp | 2 +- src/gtk/dataobj.cpp | 2 +- src/gtk/dataview.cpp | 128 ++++++++++++++++----------------- src/gtk/dcclient.cpp | 28 ++++---- src/gtk/dnd.cpp | 14 ++-- src/gtk/frame.cpp | 6 +- src/gtk/gnome/gprint.cpp | 8 +-- src/gtk/hyperlink.cpp | 2 +- src/gtk/listbox.cpp | 22 +++--- src/gtk/main.cpp | 14 ---- src/gtk/mdi.cpp | 6 +- src/gtk/msgdlg.cpp | 12 ++-- src/gtk/notebook.cpp | 4 +- src/gtk/region.cpp | 2 +- src/gtk/renderer.cpp | 6 +- src/gtk/settings.cpp | 2 +- src/gtk/stattext.cpp | 6 +- src/gtk/tbargtk.cpp | 12 ++-- src/gtk/win_gtk.c | 18 ++--- src/gtk/window.cpp | 4 +- src/msw/bitmap.cpp | 2 +- src/msw/choice.cpp | 2 +- src/msw/combobox.cpp | 2 +- src/msw/crashrpt.cpp | 2 +- src/msw/glcanvas.cpp | 6 +- src/msw/graphics.cpp | 2 +- src/msw/gsocket.cpp | 6 +- src/msw/listctrl.cpp | 4 +- src/msw/menu.cpp | 8 +-- src/msw/microwin.c | 150 +++++++++++++++++++-------------------- src/msw/notebook.cpp | 2 +- src/msw/palette.cpp | 4 +- src/msw/printwin.cpp | 8 +-- src/msw/renderer.cpp | 8 +-- src/msw/spinbutt.cpp | 2 +- src/msw/tbar95.cpp | 6 +- src/msw/window.cpp | 2 +- 38 files changed, 251 insertions(+), 265 deletions(-) delete mode 100644 src/gtk/main.cpp diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 780924b4eb..2c9bb645f1 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -209,7 +209,7 @@ static gint wxapp_idle_callback( gpointer WXUNUSED(data) ) // Release lock again gdk_threads_leave(); - + { // If another idle source was added, remove it #if wxUSE_THREADS diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index 8dc1c7a820..d4c88afb03 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -349,7 +349,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, g_signal_connect_after (m_widget, "changed", G_CALLBACK (gtkcombobox_changed_callback), this); - + } else #endif diff --git a/src/gtk/dataobj.cpp b/src/gtk/dataobj.cpp index 55d829e2d0..ce2ec4730b 100644 --- a/src/gtk/dataobj.cpp +++ b/src/gtk/dataobj.cpp @@ -278,7 +278,7 @@ bool wxFileDataObject::SetData(size_t WXUNUSED(size), const void *buf) // skip the slashes lenPrefix += 2; } - + // It would probably be nicer to use a GTK or Glib // function to unescape the 8-bit strings pointed to // by buf, but this does the same in wx code. diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index cc2dd4f4a7..f814a661f6 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -1102,9 +1102,9 @@ void wxDataViewTextRenderer::SetAlignment( int align ) g_value_unset( &gvalue ); } -// --------------------------------------------------------- +// --------------------------------------------------------- // wxDataViewBitmapRenderer -// --------------------------------------------------------- +// --------------------------------------------------------- IMPLEMENT_CLASS(wxDataViewBitmapRenderer, wxDataViewRenderer) @@ -1124,38 +1124,38 @@ bool wxDataViewBitmapRenderer::SetValue( const wxVariant &value ) { wxBitmap bitmap; bitmap << value; - + // This may create a Pixbuf representation in the // wxBitmap object (and it will stay there) GdkPixbuf *pixbuf = bitmap.GetPixbuf(); - + GValue gvalue = { 0, }; g_value_init( &gvalue, G_TYPE_OBJECT ); g_value_set_object( &gvalue, pixbuf ); g_object_set_property( G_OBJECT(m_renderer), "pixbuf", &gvalue ); g_value_unset( &gvalue ); - + return true; } - + if (value.GetType() == wxT("wxIcon")) { wxIcon bitmap; bitmap << value; - + // This may create a Pixbuf representation in the // wxBitmap object (and it will stay there) GdkPixbuf *pixbuf = bitmap.GetPixbuf(); - + GValue gvalue = { 0, }; g_value_init( &gvalue, G_TYPE_OBJECT ); g_value_set_object( &gvalue, pixbuf ); g_object_set_property( G_OBJECT(m_renderer), "pixbuf", &gvalue ); g_value_unset( &gvalue ); - + return true; } - + return false; } @@ -1163,7 +1163,7 @@ bool wxDataViewBitmapRenderer::GetValue( wxVariant &value ) const { return false; } - + // --------------------------------------------------------- // wxDataViewToggleRenderer // --------------------------------------------------------- @@ -1540,7 +1540,7 @@ gtk_dataview_header_button_press_callback( GtkWidget *widget, { if (gdk_event->type != GDK_BUTTON_PRESS) return TRUE; - + if (gdk_event->button == 1) { wxDataViewCtrl *dv = column->GetOwner(); @@ -1549,7 +1549,7 @@ gtk_dataview_header_button_press_callback( GtkWidget *widget, event.SetModel( dv->GetModel() ); dv->GetEventHandler()->ProcessEvent( event ); } - + return TRUE; } @@ -1579,8 +1579,8 @@ static void wxGtkTreeCellDataFunc( GtkTreeViewColumn *column, list_store->model->GetValue( value, cell->GetOwner()->GetModelColumn(), model_row ); if (value.GetType() != cell->GetVariantType()) - wxLogError( wxT("Wrong type, required: %s but: %s"), - value.GetType().c_str(), + wxLogError( wxT("Wrong type, required: %s but: %s"), + value.GetType().c_str(), cell->GetVariantType().c_str() ); cell->SetValue( value ); @@ -1588,8 +1588,8 @@ static void wxGtkTreeCellDataFunc( GtkTreeViewColumn *column, IMPLEMENT_CLASS(wxDataViewColumn, wxDataViewColumnBase) -wxDataViewColumn::wxDataViewColumn( const wxString &title, wxDataViewRenderer *cell, - unsigned int model_column, int width, +wxDataViewColumn::wxDataViewColumn( const wxString &title, wxDataViewRenderer *cell, + unsigned int model_column, int width, wxAlignment align, int flags ) : wxDataViewColumnBase( title, cell, model_column, width, align, flags ) { @@ -1599,8 +1599,8 @@ wxDataViewColumn::wxDataViewColumn( const wxString &title, wxDataViewRenderer *c SetTitle( title ); } -wxDataViewColumn::wxDataViewColumn( const wxBitmap &bitmap, wxDataViewRenderer *cell, - unsigned int model_column, int width, +wxDataViewColumn::wxDataViewColumn( const wxBitmap &bitmap, wxDataViewRenderer *cell, + unsigned int model_column, int width, wxAlignment align, int flags ) : wxDataViewColumnBase( bitmap, cell, model_column, width, align, flags ) { @@ -1643,7 +1643,7 @@ void wxDataViewColumn::OnInternalIdle() { if (m_isConnected) return; - + if (GTK_WIDGET_REALIZED(GetOwner()->m_treeview)) { GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column); @@ -1651,7 +1651,7 @@ void wxDataViewColumn::OnInternalIdle() { g_signal_connect(column->button, "button_press_event", G_CALLBACK (gtk_dataview_header_button_press_callback), this); - + m_isConnected = true; } } @@ -1660,22 +1660,22 @@ void wxDataViewColumn::OnInternalIdle() void wxDataViewColumn::SetOwner( wxDataViewCtrl *owner ) { wxDataViewColumnBase::SetOwner( owner ); - + GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column); - + gtk_tree_view_column_set_title( column, wxGTK_CONV_FONT(GetTitle(), GetOwner()->GetFont() ) ); } void wxDataViewColumn::SetTitle( const wxString &title ) { GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column); - + if (m_isConnected) { // 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); - + m_isConnected = false; } @@ -1701,7 +1701,7 @@ void wxDataViewColumn::SetBitmap( const wxBitmap &bitmap ) if (bitmap.Ok()) { GtkImage *gtk_image = GTK_IMAGE( gtk_image_new() ); - + GdkBitmap *mask = (GdkBitmap *) NULL; if (bitmap.GetMask()) mask = bitmap.GetMask()->GetBitmap(); @@ -1717,7 +1717,7 @@ void wxDataViewColumn::SetBitmap( const wxBitmap &bitmap ) bitmap.GetPixmap(), mask); } gtk_widget_show( GTK_WIDGET(gtk_image) ); - + gtk_tree_view_column_set_widget( column, GTK_WIDGET(gtk_image) ); } else @@ -1739,14 +1739,14 @@ void wxDataViewColumn::SetResizeable( bool resizeable ) void wxDataViewColumn::SetAlignment( wxAlignment align ) { GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column); - + gfloat xalign = 0.0; if (align == wxALIGN_RIGHT) xalign = 1.0; if (align == wxALIGN_CENTER_HORIZONTAL || align == wxALIGN_CENTER) xalign = 0.5; - + gtk_tree_view_column_set_alignment( column, xalign ); } @@ -1758,7 +1758,7 @@ wxAlignment wxDataViewColumn::GetAlignment() const return wxALIGN_RIGHT; if (xalign == 0.5) return wxALIGN_CENTER_HORIZONTAL; - + return wxALIGN_LEFT; } @@ -1789,7 +1789,7 @@ bool wxDataViewColumn::IsHidden() const void wxDataViewColumn::SetSortOrder( bool ascending ) { GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column); - + if (ascending) gtk_tree_view_column_set_sort_order( column, GTK_SORT_ASCENDING ); else @@ -1799,7 +1799,7 @@ void wxDataViewColumn::SetSortOrder( bool ascending ) bool wxDataViewColumn::IsSortOrderAscending() const { GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column); - + 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)) return; - + wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ROW_SELECTED, dv->GetId() ); event.SetRow( dv->GetSelection() ); event.SetModel( dv->GetModel() ); @@ -1841,7 +1841,7 @@ wxdataview_selection_changed_callback( GtkTreeSelection* selection, wxDataViewCt } static void -wxdataview_row_activated_callback( GtkTreeView* treeview, GtkTreePath *path, +wxdataview_row_activated_callback( GtkTreeView* treeview, GtkTreePath *path, GtkTreeViewColumn *column, wxDataViewCtrl *dv ) { 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)) { 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) grid = GTK_TREE_VIEW_GRID_LINES_BOTH; else if (style & wxDV_VERT_RULES) @@ -1947,7 +1947,7 @@ bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id, void wxDataViewCtrl::OnInternalIdle() { wxWindow::OnInternalIdle(); - + unsigned int cols = GetColumnCount(); unsigned int i; for (i = 0; i < cols; i++) @@ -1990,7 +1990,7 @@ bool wxDataViewCtrl::AppendColumn( wxDataViewColumn *col ) void wxDataViewCtrl::SetSelection( int row ) { GtkTreeSelection *selection = gtk_tree_view_get_selection( GTK_TREE_VIEW(m_treeview) ); - + if (row < 0) { gtk_tree_selection_unselect_all( selection ); @@ -1999,9 +1999,9 @@ void wxDataViewCtrl::SetSelection( int row ) { GtkTreePath *path = gtk_tree_path_new (); gtk_tree_path_append_index( path, row ); - + gtk_tree_selection_select_path( selection, path ); - + gtk_tree_path_free( path ); } } @@ -2009,12 +2009,12 @@ void wxDataViewCtrl::SetSelection( int row ) void wxDataViewCtrl::Unselect( unsigned int row ) { GtkTreeSelection *selection = gtk_tree_view_get_selection( GTK_TREE_VIEW(m_treeview) ); - + GtkTreePath *path = gtk_tree_path_new (); gtk_tree_path_append_index( path, row ); - + gtk_tree_selection_unselect_path( selection, 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) { } - + bool wxDataViewCtrl::IsSelected( unsigned int row ) const { GtkTreeSelection *selection = gtk_tree_view_get_selection( GTK_TREE_VIEW(m_treeview) ); - + GtkTreePath *path = gtk_tree_path_new (); gtk_tree_path_append_index( path, row ); - + gboolean ret = gtk_tree_selection_path_is_selected( selection, path ); - + gtk_tree_path_free( path ); - + return ret; } @@ -2047,25 +2047,25 @@ int wxDataViewCtrl::GetSelection() const { GtkTreeModel *model; GList *list = gtk_tree_selection_get_selected_rows( selection, &model ); - + // do something if (list) { // list = g_list_nth( list, 0 ); should be a noop GtkTreePath *path = (GtkTreePath*) list->data; - + unsigned int row = (unsigned int)gtk_tree_path_get_indices (path)[0]; - + // delete list g_list_foreach( list, (GFunc) gtk_tree_path_free, NULL ); g_list_free( list ); - + return (int) row; } } else { - + GtkTreeModel *model; GtkTreeIter iter; gboolean has_selection = gtk_tree_selection_get_selected( selection, &model, &iter ); @@ -2075,7 +2075,7 @@ int wxDataViewCtrl::GetSelection() const return (int) row; } } - + return -1; } @@ -2088,25 +2088,25 @@ int wxDataViewCtrl::GetSelections(wxArrayInt& aSelections) const { GtkTreeModel *model; GList *list = gtk_tree_selection_get_selected_rows( selection, &model ); - + int count = 0; while (list) { - + // list = g_list_nth( list, 0 ); should be a noop GtkTreePath *path = (GtkTreePath*) list->data; - + unsigned int row = (unsigned int)gtk_tree_path_get_indices (path)[0]; - + aSelections.Add( (int) row ); - - list = g_list_next( list ); + + list = g_list_next( list ); } - + // delete list g_list_foreach( list, (GFunc) gtk_tree_path_free, NULL ); g_list_free( list ); - + return count; } else @@ -2121,7 +2121,7 @@ int wxDataViewCtrl::GetSelections(wxArrayInt& aSelections) const return 1; } } - + return 0; } diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index c79e4175d6..4d69ff1d0f 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -324,7 +324,7 @@ wxWindowDC::wxWindowDC( wxWindow *window ) standard (as e.g. wxStatusBar) */ m_owner = window; - + if (m_owner && m_owner->m_wxwindow && (m_owner->GetLayoutDirection() == wxLayout_RightToLeft)) { // reverse sense @@ -391,7 +391,7 @@ void wxWindowDC::SetUpDC() gdk_gc_set_background( m_textGC, m_textBackgroundColour.GetColor() ); gdk_gc_set_fill( m_textGC, GDK_SOLID ); - + gdk_gc_set_colormap( m_textGC, m_cmap ); /* 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-1, yy-1, ww, hh ); } - + // reset 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 h = bitmap.GetHeight(); - + if (m_owner && m_owner->GetLayoutDirection() == wxLayout_RightToLeft) xx -= w; - + CalcBoundingBox( x, y ); CalcBoundingBox( x + w, y + h ); @@ -1219,7 +1219,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, wxMemoryDC *memDC = wxDynamicCast(source, wxMemoryDC); wxBitmap selected = source->GetSelectedBitmap(); - + bool use_bitmap_method = false; bool is_mono = false; @@ -1230,7 +1230,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, } if (memDC && !selected.Ok()) return false; - + if (selected.Ok()) { is_mono = (selected.GetDepth() == 1); @@ -1428,7 +1428,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, GdkWindow* window = source->GetGDKWindow(); if ( !window ) return false; - + // copy including child window contents gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS ); 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_gc_set_foreground(m_textGC, m_textForegroundColour.GetColor()); } - + // Draw layout. if (m_owner && m_owner->GetLayoutDirection() == wxLayout_RightToLeft) 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) ); - + // Calculate the position of each character based on the widths of // the previous characters @@ -2368,7 +2368,7 @@ void wxWindowDC::SetDeviceOrigin( wxCoord x, wxCoord y ) { m_deviceOriginX = x; m_deviceOriginY = y; - + ComputeScaleAndOrigin(); } @@ -2376,10 +2376,10 @@ void wxWindowDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp ) { m_signX = (xLeftRight ? 1 : -1); m_signY = (yBottomUp ? -1 : 1); - + if (m_owner && m_owner->m_wxwindow && (m_owner->GetLayoutDirection() == wxLayout_RightToLeft)) - m_signX = -m_signX; - + m_signX = -m_signX; + ComputeScaleAndOrigin(); } diff --git a/src/gtk/dnd.cpp b/src/gtk/dnd.cpp index 0733a6e2e4..b3c5b4aba4 100644 --- a/src/gtk/dnd.cpp +++ b/src/gtk/dnd.cpp @@ -337,7 +337,7 @@ static gboolean target_drag_drop( GtkWidget *widget, #ifdef __WXDEBUG__ wxLogTrace(TRACE_DND, wxT( "Drop target: OnDrop returned FALSE") ); #endif - + /* cancel the whole thing */ gtk_drag_finish( context, FALSE, /* no success */ @@ -349,7 +349,7 @@ static gboolean target_drag_drop( GtkWidget *widget, #ifdef __WXDEBUG__ wxLogTrace(TRACE_DND, wxT( "Drop target: OnDrop returned true") ); #endif - + #if wxUSE_THREADS /* disable GUI threads */ #endif @@ -419,7 +419,7 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget), #ifdef __WXDEBUG__ wxLogTrace(TRACE_DND, wxT( "Drop target: data received event") ); #endif - + /* inform the wxDropTarget about the current GtkSelectionData. this is only valid for the duration of this call */ drop_target->SetDragData( data ); @@ -431,7 +431,7 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget), #ifdef __WXDEBUG__ wxLogTrace(TRACE_DND, wxT( "Drop target: OnData returned true") ); #endif - + /* tell GTK that data transfer was successful */ gtk_drag_finish( context, TRUE, FALSE, time ); } @@ -440,7 +440,7 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget), #ifdef __WXDEBUG__ wxLogTrace(TRACE_DND, wxT( "Drop target: OnData returned FALSE") ); #endif - + /* tell GTK that data transfer was not successful */ 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"), format.GetId().c_str()); #endif - + drop_source->m_retValue = wxDragCancel; wxDataObject *data = drop_source->GetDataObject(); @@ -859,7 +859,7 @@ wxDragResult wxDropSource::DoDragDrop(int flags) // don't start dragging if no button is down if (g_lastButtonNumber == 0) return wxDragNone; - + // we can only start a drag after a mouse event if (g_lastMouseEvent == NULL) return wxDragNone; diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index 29c492c62d..20b72a5865 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -232,7 +232,7 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const #if wxUSE_STATUSBAR // status bar - if (m_frameStatusBar && m_frameStatusBar->IsShown() && + if (m_frameStatusBar && m_frameStatusBar->IsShown() && !(m_fsIsShowing && (m_fsSaveFlag & wxFULLSCREEN_NOSTATUSBAR) != 0)) (*height) -= wxSTATUS_HEIGHT; #endif // wxUSE_STATUSBAR @@ -288,7 +288,7 @@ void wxFrame::DoSetClientSize( int width, int height ) #if wxUSE_STATUSBAR // status bar - if (m_frameStatusBar && m_frameStatusBar->IsShown() && + if (m_frameStatusBar && m_frameStatusBar->IsShown() && !(m_fsIsShowing && (m_fsSaveFlag & wxFULLSCREEN_NOSTATUSBAR) != 0)) height += wxSTATUS_HEIGHT; #endif @@ -485,7 +485,7 @@ void wxFrame::GtkOnSize() { if (!GTK_WIDGET_VISIBLE(m_frameStatusBar->m_widget)) gtk_widget_show( m_frameStatusBar->m_widget ); - + int xx = 0 + m_miniEdge; int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge - client_area_y_offset; int ww = m_width - 2*m_miniEdge; diff --git a/src/gtk/gnome/gprint.cpp b/src/gtk/gnome/gprint.cpp index 3150ad5092..672823aac5 100644 --- a/src/gtk/gnome/gprint.cpp +++ b/src/gtk/gnome/gprint.cpp @@ -857,7 +857,7 @@ wxGnomePrintDC::wxGnomePrintDC( wxGnomePrinter *printer ) m_signX = 1; // default x-axis left to right m_signY = -1; // default y-axis bottom up -> top down - + GetSize( NULL, &m_deviceOffsetY ); } @@ -882,8 +882,8 @@ wxGnomePrintDC::wxGnomePrintDC( const wxPrintData& data ) m_currentGreen = 0; 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 ); } @@ -1940,7 +1940,7 @@ void wxGnomePrintPreview::DetermineScaling() m_previewPrintout->SetPPIPrinter(wxGnomePrintDC::GetResolution(), wxGnomePrintDC::GetResolution()); wxSize sizeDevUnits(paper->GetSizeDeviceUnits()); - + // TODO: get better resolution information from wxGnomePrintDC, if possible. sizeDevUnits.x = (wxCoord)((float)sizeDevUnits.x * wxGnomePrintDC::GetResolution() / 72.0); diff --git a/src/gtk/hyperlink.cpp b/src/gtk/hyperlink.cpp index 4093de2957..b06d5963ac 100644 --- a/src/gtk/hyperlink.cpp +++ b/src/gtk/hyperlink.cpp @@ -113,7 +113,7 @@ bool wxHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id, // wxWindowGTK will connect to the enter_notify and leave_notify GTK+ signals // 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)); } else diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 95636a79d5..e4bbf51aae 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -83,7 +83,7 @@ gtk_listbox_row_activated_callback(GtkTreeView *treeview, if (listbox->IsSelected(sel)) { GtkTreeEntry* entry = listbox->GtkGetEntry(sel); - + if (entry) { event.SetInt(sel); @@ -93,7 +93,7 @@ gtk_listbox_row_activated_callback(GtkTreeView *treeview, event.SetClientObject( (wxClientData*) gtk_tree_entry_get_userdata(entry) ); else if ( listbox->HasClientUntypedData() ) event.SetClientData( gtk_tree_entry_get_userdata(entry) ); - + g_object_unref (entry); } else @@ -148,9 +148,9 @@ static void gtk_listitem_changed_callback( GtkTreeSelection* selection, wxListBox *listbox ) { if (g_blockEventsOnDrag) return; - + if (listbox->m_blockEvent) return; - + wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, listbox->GetId() ); event.SetEventObject( listbox ); @@ -158,15 +158,15 @@ gtk_listitem_changed_callback( GtkTreeSelection* selection, wxListBox *listbox ) { wxArrayInt selections; listbox->GetSelections( selections ); - + if (selections.GetCount() == 0) { // indicate that this is a deselection event.SetExtraLong( 0 ); event.SetInt( -1 ); - + listbox->GetEventHandler()->ProcessEvent( event ); - + return; } else @@ -174,7 +174,7 @@ gtk_listitem_changed_callback( GtkTreeSelection* selection, wxListBox *listbox ) // indicate that this is a selection event.SetExtraLong( 1 ); event.SetInt( selections[0] ); - + listbox->GetEventHandler()->ProcessEvent( event ); } } @@ -186,9 +186,9 @@ gtk_listitem_changed_callback( GtkTreeSelection* selection, wxListBox *listbox ) // indicate that this is a deselection event.SetExtraLong( 0 ); event.SetInt( -1 ); - + listbox->GetEventHandler()->ProcessEvent( event ); - + return; } else @@ -406,7 +406,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, GtkTreeSelection* selection = gtk_tree_view_get_selection( m_treeview ); - + g_signal_connect_after (selection, "changed", G_CALLBACK (gtk_listitem_changed_callback), this); diff --git a/src/gtk/main.cpp b/src/gtk/main.cpp deleted file mode 100644 index 96d7e9e4b6..0000000000 --- a/src/gtk/main.cpp +++ /dev/null @@ -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. - diff --git a/src/gtk/mdi.cpp b/src/gtk/mdi.cpp index bcbaad2c53..cbc20739af 100644 --- a/src/gtk/mdi.cpp +++ b/src/gtk/mdi.cpp @@ -250,7 +250,7 @@ wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const gint i = gtk_notebook_get_current_page( notebook ); if (i < 0) return (wxMDIChildFrame*) NULL; - + GtkNotebookPage* page = (GtkNotebookPage*) (g_list_nth(notebook->children,i)->data); if (!page) return (wxMDIChildFrame*) NULL; @@ -259,7 +259,7 @@ wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const { if ( wxPendingDelete.Member(node->GetData()) ) return (wxMDIChildFrame*) NULL; - + wxMDIChildFrame *child_frame = wxDynamicCast( node->GetData(), wxMDIChildFrame ); if (!child_frame) @@ -267,7 +267,7 @@ wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const if (child_frame->m_page == page) return child_frame; - + node = node->GetNext(); } diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp index a0861aaf37..e2b0a4ef26 100644 --- a/src/gtk/msgdlg.cpp +++ b/src/gtk/msgdlg.cpp @@ -45,10 +45,10 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent, if (style & wxYES_NO) { - if (style & wxCANCEL) - buttons = GTK_BUTTONS_NONE; - else - buttons = GTK_BUTTONS_YES_NO; + if (style & wxCANCEL) + buttons = GTK_BUTTONS_NONE; + else + buttons = GTK_BUTTONS_YES_NO; } if (style & wxOK) @@ -84,14 +84,14 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent, if (style & wxYES_NO) { if (style & wxCANCEL) - { + { gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_NO, GTK_RESPONSE_NO); gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_YES, GTK_RESPONSE_YES); - } + } if (style & wxNO_DEFAULT) gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_NO); else diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index bf86abbf3b..172bc4b120 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -402,7 +402,7 @@ int wxNotebook::DoSetSelection( size_t page, int flags ) if ( !(flags & SetSelection_SendEvent) ) { // reconnect to signals - + g_signal_connect (m_widget, "switch_page", G_CALLBACK (gtk_notebook_page_changing_callback), this); @@ -658,7 +658,7 @@ bool wxNotebook::InsertPage( size_t position, /* show the label */ gtk_widget_show( GTK_WIDGET(nb_page->m_label) ); - + if (select && (m_pagesData.GetCount() > 1)) { SetSelection( position ); diff --git a/src/gtk/region.cpp b/src/gtk/region.cpp index c87e5a0504..964ae16316 100644 --- a/src/gtk/region.cpp +++ b/src/gtk/region.cpp @@ -459,7 +459,7 @@ wxRect wxRegionIterator::GetRect() const wxRegionIterator& wxRegionIterator::operator=(const wxRegionIterator& ri) { wxDELETEA(m_rects); - + m_current = ri.m_current; m_numRects = ri.m_numRects; if ( m_numRects ) diff --git a/src/gtk/renderer.cpp b/src/gtk/renderer.cpp index 8c6ce72a51..496908cc70 100644 --- a/src/gtk/renderer.cpp +++ b/src/gtk/renderer.cpp @@ -199,7 +199,7 @@ wxRendererGTK::DrawHeaderButton(wxWindow *win, int x_diff = 0; if (win->GetLayoutDirection() == wxLayout_RightToLeft) x_diff = rect.width; - + gtk_paint_box ( button->style, @@ -334,7 +334,7 @@ wxRendererGTK::DrawSplitterSash(wxWindow *win, rect.height = full_size; rect.width = w; } - + int x_diff = 0; if (win->GetLayoutDirection() == wxLayout_RightToLeft) x_diff = rect.width; @@ -540,7 +540,7 @@ wxRendererGTK::DrawItemSelectionRect(wxWindow *win, if (flags & wxCONTROL_CURRENT) { - gtk_paint_focus( win->m_widget->style, + gtk_paint_focus( win->m_widget->style, gdk_window, state, NULL, diff --git a/src/gtk/settings.cpp b/src/gtk/settings.cpp index cf6f7960e5..ff3abce216 100644 --- a/src/gtk/settings.cpp +++ b/src/gtk/settings.cpp @@ -516,7 +516,7 @@ int wxSystemSettingsNative::GetMetric( wxSystemMetric index, wxWindow* win ) // since that is what the API wants. But the values // are much bigger under GNOME than under Windows and // just seem to much in many cases to be useful. - // drag_threshold *= 2; + // drag_threshold *= 2; return drag_threshold; diff --git a/src/gtk/stattext.cpp b/src/gtk/stattext.cpp index 20b9b97418..6fe31c64c6 100644 --- a/src/gtk/stattext.cpp +++ b/src/gtk/stattext.cpp @@ -72,15 +72,15 @@ bool wxStaticText::Create(wxWindow *parent, justify = GTK_JUSTIFY_RIGHT; else // wxALIGN_LEFT is 0 justify = GTK_JUSTIFY_LEFT; - + if (GetLayoutDirection() == wxLayout_RightToLeft) - { + { if (justify == GTK_JUSTIFY_RIGHT) justify = GTK_JUSTIFY_LEFT; if (justify == GTK_JUSTIFY_LEFT) justify = GTK_JUSTIFY_RIGHT; } - + gtk_label_set_justify(GTK_LABEL(m_widget), justify); // GTK_JUSTIFY_LEFT is 0, RIGHT 1 and CENTER 2 diff --git a/src/gtk/tbargtk.cpp b/src/gtk/tbargtk.cpp index f1e0bcc9ad..8ba9d4ef1f 100644 --- a/src/gtk/tbargtk.cpp +++ b/src/gtk/tbargtk.cpp @@ -223,7 +223,7 @@ void gtktoolwidget_size_callback( GtkWidget *widget, { // this shouldn't happen... if (win->GetParent()->m_wxwindow) return; - + wxSize size = win->GetEffectiveMinSize(); if (size.y != alloc->height) { @@ -474,11 +474,11 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase) (const char *) NULL, posGtk ); - + // connect after in order to correct size_allocate events g_signal_connect_after (tool->GetControl()->m_widget, "size_allocate", G_CALLBACK (gtktoolwidget_size_callback), tool->GetControl()); - + break; } @@ -606,7 +606,7 @@ void wxToolBar::SetToolNormalBitmap( int id, const wxBitmap& bitmap ) tool->SetNormalBitmap(bitmap); tool->SetImage(tool->GetBitmap()); - } + } } void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap ) @@ -618,7 +618,7 @@ void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap ) tool->SetDisabledBitmap(bitmap); tool->SetImage(tool->GetBitmap()); - } + } } // ---------------------------------------------------------------------------- @@ -629,7 +629,7 @@ void wxToolBar::OnInternalIdle() { // Check if we have to show window now if (GtkShowFromOnIdle()) return; - + wxCursor cursor = m_cursor; if (g_globalCursor.Ok()) cursor = g_globalCursor; diff --git a/src/gtk/win_gtk.c b/src/gtk/win_gtk.c index dcc0e1defd..2b6944fb3e 100644 --- a/src/gtk/win_gtk.c +++ b/src/gtk/win_gtk.c @@ -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 ( (GTK_IS_PIZZA (pizza)), 0 ); - + if (!pizza->bin_window) return 0; - + border = pizza->container.border_width; - + return GTK_WIDGET(pizza)->allocation.width - border*2; } @@ -544,7 +544,7 @@ gtk_pizza_size_allocate (GtkWidget *widget, widget->allocation = *allocation; border = pizza->container.border_width; - + x = allocation->x + border; y = allocation->y + border; 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) { /* reverse horizontal placement */ - gint offset,border; - + gint offset,border; + offset = GTK_WIDGET(pizza)->allocation.width; border = pizza->container.border_width; 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); } diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index a9a67e6c68..fe96b82541 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -1683,9 +1683,9 @@ gtk_window_button_release_callback( GtkWidget *widget, event.SetId( win->GetId() ); bool ret = win->GTKProcessEvent(event); - + g_lastMouseEvent = NULL; - + return ret; } diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index 94901589da..8ef2b8b3f3 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -1354,7 +1354,7 @@ wxMask::wxMask(const wxMask &mask) SelectObject(destDC, (HBITMAP) m_maskBitmap); BitBlt(destDC, 0, 0, w, h, srcDC, 0, 0, SRCCOPY); - + SelectObject(srcDC, 0); DeleteDC(srcDC); SelectObject(destDC, 0); diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index 0fbae50603..783959794b 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -506,7 +506,7 @@ void wxChoice::DoSetSize(int x, int y, int sizeFlags) { int heightOrig = height; - + // 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 // is, of course, just the height of the permanently visible part of it diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 3c6fe8d103..fca1afd0ca 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -265,7 +265,7 @@ bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam) { if (SendMessage(GetHwnd(), CB_GETDROPPEDSTATE, 0, 0)) return false; - + wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); const int sel = GetSelection(); diff --git a/src/msw/crashrpt.cpp b/src/msw/crashrpt.cpp index 3d68e175d0..03bfe7f534 100644 --- a/src/msw/crashrpt.cpp +++ b/src/msw/crashrpt.cpp @@ -201,7 +201,7 @@ bool wxCrashReportImpl::Generate(int flags, EXCEPTION_POINTERS *ep) dumpFlags = (MINIDUMP_TYPE)(MiniDumpScanMemory #if _MSC_VER > 1300 |MiniDumpWithIndirectlyReferencedMemory -#endif +#endif ); } diff --git a/src/msw/glcanvas.cpp b/src/msw/glcanvas.cpp index 64f90c4ef2..39e37c4f84 100644 --- a/src/msw/glcanvas.cpp +++ b/src/msw/glcanvas.cpp @@ -549,9 +549,9 @@ void wxGLCanvas::OnSize(wxSizeEvent& WXUNUSED(event)) void wxGLCanvas::SetCurrent(const wxGLContext& RC) const { // 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 - // called for a shown window, so check it - wxASSERT_MSG( GetParent()->IsShown(), _T("can't make hidden GL canvas current") ); + // under wxGTK and documentation mentions that SetCurrent() can only be + // called for a shown window, so check it + wxASSERT_MSG( GetParent()->IsShown(), _T("can't make hidden GL canvas current") ); RC.SetCurrent(*this); } diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index ff3313993a..d41d1db4c3 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -178,7 +178,7 @@ public : // gets the component valuess of the matrix virtual void Get(wxDouble* a=NULL, wxDouble* b=NULL, wxDouble* c=NULL, wxDouble* d=NULL, wxDouble* tx=NULL, wxDouble* ty=NULL) const; - + // makes this the inverse matrix virtual void Invert(); diff --git a/src/msw/gsocket.cpp b/src/msw/gsocket.cpp index 0bbfea6275..924668cd1f 100644 --- a/src/msw/gsocket.cpp +++ b/src/msw/gsocket.cpp @@ -864,9 +864,9 @@ GSocketEventFlags GSocket::Select(GSocketEventFlags flags) result |= GSOCK_INPUT_FLAG; if (m_server && m_stream) - { - /* This is a TCP server socket that detected a connection. - While the INPUT_FLAG is also set, it doesn't matter on + { + /* This is a TCP server socket that detected a connection. + While the INPUT_FLAG is also set, it doesn't matter on this kind of sockets, as we can only Accept() from them. */ result |= GSOCK_CONNECTION_FLAG; m_detected |= GSOCK_CONNECTION_FLAG; diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 69b6cfa51f..9cd988f15d 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1780,10 +1780,10 @@ int WXDLLIMPEXP_CORE wxMSWGetColumnClicked(NMHDR *nmhdr, POINT *ptClick) // where did the click occur? #if defined(__WXWINCE__) && !defined(__HANDHELDPC__) && _WIN32_WCE < 400 - if (nmhdr->code == GN_CONTEXTMENU) + if (nmhdr->code == GN_CONTEXTMENU) { *ptClick = ((NMRGINFO*)nmhdr)->ptAction; - } + } else #endif //__WXWINCE__ if ( !::GetCursorPos(ptClick) ) diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 9a235b6071..3194257990 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -77,7 +77,7 @@ typedef struct tagMENUINFO } MENUINFO, FAR *LPMENUINFO; #endif -#if wxUSE_OWNER_DRAWN +#if wxUSE_OWNER_DRAWN #include "wx/dynlib.h" #endif @@ -451,14 +451,14 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos) !pItem->GetBackgroundColour().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 -#ifndef __DMC__ +#ifndef __DMC__ // DMC at march 2007 doesn't have HBITMAP hbmpItem tagMENUITEMINFOA /W // MIIM_BITMAP only works under WinME/2000+ WinStruct mii; if ( wxGetWinVersion() >= wxWinVersion_98 ) - { + { mii.fMask = MIIM_STRING | MIIM_DATA | MIIM_BITMAP; if ( pItem->IsCheckable() ) { diff --git a/src/msw/microwin.c b/src/msw/microwin.c index fbb20d0cd4..9b66f8aeb1 100644 --- a/src/msw/microwin.c +++ b/src/msw/microwin.c @@ -42,7 +42,7 @@ int GetScrollPosWX (HWND hWnd, int iSBar) } BOOL ScrollWindow(HWND hWnd, int xAmount, int yAmount, - CONST RECT* lpRect, CONST RECT* lpClipRect) + CONST RECT* lpRect, CONST RECT* lpClipRect) { /* TODO */ return FALSE; @@ -243,34 +243,34 @@ int GetObject(HGDIOBJ hObj, int sz, LPVOID logObj) GdGetFontInfo(((MWFONTOBJ*) hFont)->pfont, &fi); - /* FIXME many items are guessed for the time being*/ - logFont->lfHeight = fi.height; + /* FIXME many items are guessed for the time being*/ + logFont->lfHeight = fi.height; - /* reversed for kaffe port - logFont->tmAscent = fi.height - fi.baseline; - logFont->tmDescent= fi.baseline; - */ + /* reversed for kaffe port + logFont->tmAscent = fi.height - fi.baseline; + logFont->tmDescent= fi.baseline; + */ - logFont->lfWidth = fi.widths['x']; - logFont->lfWeight = FW_NORMAL; + logFont->lfWidth = fi.widths['x']; + logFont->lfWeight = FW_NORMAL; logFont->lfEscapement = 0; logFont->lfOrientation = 0; logFont->lfOutPrecision = OUT_OUTLINE_PRECIS; logFont->lfClipPrecision = CLIP_DEFAULT_PRECIS; logFont->lfQuality = DEFAULT_QUALITY; - logFont->lfItalic = 0; - logFont->lfUnderline = 0; - logFont->lfStrikeOut = 0; - /* note that win32 has the TMPF_FIXED_PITCH flags REVERSED...*/ - logFont->lfPitchAndFamily = fi.fixed? - FF_DONTCARE: (FF_DONTCARE | TMPF_FIXED_PITCH); - logFont->lfCharSet = OEM_CHARSET; - /* TODO I don't know how to get the font name. May - * test for different font classes. + logFont->lfItalic = 0; + logFont->lfUnderline = 0; + logFont->lfStrikeOut = 0; + /* note that win32 has the TMPF_FIXED_PITCH flags REVERSED...*/ + logFont->lfPitchAndFamily = fi.fixed? + FF_DONTCARE: (FF_DONTCARE | TMPF_FIXED_PITCH); + logFont->lfCharSet = OEM_CHARSET; + /* TODO I don't know how to get the font name. May + * test for different font classes. */ logFont->lfFaceName[0] = 0; #if 0 - strncpy(logFont->lfFaceName, ??, sizeof(logFont->lfFaceName)); + strncpy(logFont->lfFaceName, ??, sizeof(logFont->lfFaceName)); #endif return sz; } @@ -285,36 +285,36 @@ int GetObject(HGDIOBJ hObj, int sz, LPVOID logObj) HBITMAP WINAPI CreateCompatibleBitmap(HDC hdc, int nWidth, int nHeight) { - MWBITMAPOBJ * hbitmap; - int size; - int linelen; + MWBITMAPOBJ *hbitmap; + int size; + int linelen; - if(!hdc) - return NULL; + if(!hdc) + return NULL; - nWidth = MWMAX(nWidth, 1); - nHeight = MWMAX(nHeight, 1); + nWidth = MWMAX(nWidth, 1); + nHeight = MWMAX(nHeight, 1); - /* calc memory allocation size and linelen from width and height*/ - if(!GdCalcMemGCAlloc(hdc->psd, nWidth, nHeight, 0, 0, &size, &linelen)) - return NULL; + /* calc memory allocation size and linelen from width and height*/ + if(!GdCalcMemGCAlloc(hdc->psd, nWidth, nHeight, 0, 0, &size, &linelen)) + return NULL; - /* allocate gdi object*/ - hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size); - if(!hbitmap) - return NULL; - hbitmap->hdr.type = OBJ_BITMAP; - hbitmap->hdr.stockobj = FALSE; - hbitmap->width = nWidth; - hbitmap->height = nHeight; + /* allocate gdi object*/ + hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size); + if(!hbitmap) + return NULL; + hbitmap->hdr.type = OBJ_BITMAP; + hbitmap->hdr.stockobj = FALSE; + hbitmap->width = nWidth; + hbitmap->height = nHeight; - /* create compatible with hdc*/ - hbitmap->planes = hdc->psd->planes; - hbitmap->bpp = hdc->psd->bpp; - hbitmap->linelen = linelen; - hbitmap->size = size; + /* create compatible with hdc*/ + hbitmap->planes = hdc->psd->planes; + hbitmap->bpp = hdc->psd->bpp; + hbitmap->linelen = linelen; + hbitmap->size = size; - return (HBRUSH)hbitmap; + return (HBRUSH)hbitmap; } #endif @@ -325,41 +325,41 @@ CreateCompatibleBitmap(HDC hdc, int nWidth, int nHeight) HBITMAP WINAPI CreateBitmap( int nWidth, int nHeight, int nPlanes, int bPP, LPCVOID lpData) { - MWBITMAPOBJ * hbitmap; - int size; - int linelen; + MWBITMAPOBJ *hbitmap; + int size; + int linelen; - HDC hScreenDC; + HDC hScreenDC; - hScreenDC = GetDC(NULL); + hScreenDC = GetDC(NULL); - nWidth = MWMAX(nWidth, 1); - nHeight = MWMAX(nHeight, 1); + nWidth = MWMAX(nWidth, 1); + nHeight = MWMAX(nHeight, 1); - /* calc memory allocation size and linelen from width and height*/ - if(!GdCalcMemGCAlloc(hScreenDC->psd, nWidth, nHeight, nPlanes, bPP, &size, &linelen)) - { - ReleaseDC(NULL, hScreenDC); - return NULL; - } + /* calc memory allocation size and linelen from width and height*/ + if(!GdCalcMemGCAlloc(hScreenDC->psd, nWidth, nHeight, nPlanes, bPP, &size, &linelen)) + { ReleaseDC(NULL, hScreenDC); - - /* allocate gdi object*/ - hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size); - if(!hbitmap) - return NULL; - hbitmap->hdr.type = OBJ_BITMAP; - hbitmap->hdr.stockobj = FALSE; - hbitmap->width = nWidth; - hbitmap->height = nHeight; - - /* create with specified parameters */ - hbitmap->planes = nPlanes; - hbitmap->bpp = bPP; - hbitmap->linelen = linelen; - hbitmap->size = size; - - /* TODO: copy data */ - - return (HBRUSH)hbitmap; + return NULL; + } + ReleaseDC(NULL, hScreenDC); + + /* allocate gdi object*/ + hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size); + if(!hbitmap) + return NULL; + hbitmap->hdr.type = OBJ_BITMAP; + hbitmap->hdr.stockobj = FALSE; + hbitmap->width = nWidth; + hbitmap->height = nHeight; + + /* create with specified parameters */ + hbitmap->planes = nPlanes; + hbitmap->bpp = bPP; + hbitmap->linelen = linelen; + hbitmap->size = size; + + /* TODO: copy data */ + + return (HBRUSH)hbitmap; } diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 893dd211eb..5b5fa833fb 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -935,7 +935,7 @@ void wxNotebook::OnPaint(wxPaintEvent& WXUNUSED(event)) 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. const wxCoord ofs = dir == wxLayout_RightToLeft ? -1 : 0; dc.Blit(ofs, 0, rc.right, rc.bottom, &memdc, ofs, 0); diff --git a/src/msw/palette.cpp b/src/msw/palette.cpp index d72f0adc40..989ff48e22 100644 --- a/src/msw/palette.cpp +++ b/src/msw/palette.cpp @@ -63,7 +63,7 @@ bool wxPalette::FreeResource(bool WXUNUSED(force)) { DeleteObject((HPALETTE)M_PALETTEDATA->m_hPalette); } - + return true; } @@ -73,7 +73,7 @@ int wxPalette::GetColoursCount() const { return ::GetPaletteEntries((HPALETTE) M_PALETTEDATA->m_hPalette, 0, 0, NULL ); } - + return 0; } diff --git a/src/msw/printwin.cpp b/src/msw/printwin.cpp index 2eadf2547f..975a0936fd 100644 --- a/src/msw/printwin.cpp +++ b/src/msw/printwin.cpp @@ -42,7 +42,7 @@ #endif #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 @@ -368,7 +368,7 @@ void wxWindowsPrintPreview::DetermineScaling() int logPPIPrinterX; int logPPIPrinterY; - wxRect paperRect; + wxRect paperRect; if ( printerDC.Ok() ) { @@ -380,7 +380,7 @@ void wxWindowsPrintPreview::DetermineScaling() logPPIPrinterX = ::GetDeviceCaps(dc, LOGPIXELSX); logPPIPrinterY = ::GetDeviceCaps(dc, LOGPIXELSY); - paperRect = printerDC.GetPaperRect(); + paperRect = printerDC.GetPaperRect(); if ( logPPIPrinterX == 0 || logPPIPrinterY == 0 || @@ -400,7 +400,7 @@ void wxWindowsPrintPreview::DetermineScaling() logPPIPrinterX = 600; logPPIPrinterY = 600; - paperRect = wxRect(0, 0, printerXRes, printerYRes); + paperRect = wxRect(0, 0, printerXRes, printerYRes); m_isOk = false; } m_pageWidth = printerXRes; diff --git a/src/msw/renderer.cpp b/src/msw/renderer.cpp index 637639ccc4..b820b38bb8 100644 --- a/src/msw/renderer.cpp +++ b/src/msw/renderer.cpp @@ -125,7 +125,7 @@ public: wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE, wxHeaderButtonParams* params = NULL); virtual int GetHeaderButtonHeight(wxWindow *win); - + virtual void DrawTreeItemButton(wxWindow *win, wxDC& dc, const wxRect& rect, @@ -333,7 +333,7 @@ wxRendererXP::DrawHeaderButton(wxWindow *win, // 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 // and then clear those flags before calling DrawHeaderButtonContents. - + // Add any extras that are specified in flags and params return DrawHeaderButtonContents(win, dc, rect, flags, sortArrow, params); } @@ -347,10 +347,10 @@ wxRendererXP::GetHeaderButtonHeight(wxWindow *win) { return m_rendererNative.GetHeaderButtonHeight(win); } - + HRESULT hr; int value = -1; - + hr = wxUxThemeEngine::Get()->GetThemeMetric( hTheme, NULL, HP_HEADERITEM, diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index 4858bae02d..4b3f25570c 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -257,7 +257,7 @@ void wxSpinButton::SetValue(int val) } void wxSpinButton::NormalizeValue() -{ +{ SetValue( GetValue() ); } diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 39c865b8a0..6b10c338c6 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -1073,7 +1073,7 @@ bool wxToolBar::Realize() { // if not set yet, have one column m_maxRows = 1; - SetRows(m_nButtons); + SetRows(m_nButtons); } InvalidateBestSize(); @@ -1340,7 +1340,7 @@ void wxToolBar::SetToolNormalBitmap( int id, const wxBitmap& bitmap ) tool->SetNormalBitmap(bitmap); Realize(); - } + } } void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap ) @@ -1352,7 +1352,7 @@ void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap ) tool->SetDisabledBitmap(bitmap); Realize(); - } + } } // ---------------------------------------------------------------------------- diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 7d80f8dd6b..75167901ab 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -5779,7 +5779,7 @@ static inline bool wxIsKeyDown(WXWORD vk) switch (vk) { case VK_LBUTTON: - if (GetSystemMetrics(SM_SWAPBUTTON)) vk = VK_RBUTTON; + if (GetSystemMetrics(SM_SWAPBUTTON)) vk = VK_RBUTTON; break; case VK_RBUTTON: if (GetSystemMetrics(SM_SWAPBUTTON)) vk = VK_LBUTTON; -- 2.45.2