]> git.saurik.com Git - wxWidgets.git/commitdiff
patch from Dimitri fixing a few memory leaks and unTABbing the sources
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 17 Mar 2002 14:16:03 +0000 (14:16 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 17 Mar 2002 14:16:03 +0000 (14:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

62 files changed:
samples/db/dbtest.cpp
samples/db/dbtest.h
samples/db/listdb.cpp
samples/docview/doc.cpp
samples/docview/doc.h
samples/docview/docview.cpp
samples/docview/docview.h
samples/docview/view.cpp
samples/docview/view.h
samples/docvwmdi/doc.cpp
samples/docvwmdi/doc.h
samples/docvwmdi/docview.cpp
samples/docvwmdi/docview.h
samples/docvwmdi/view.cpp
samples/docvwmdi/view.h
samples/dragimag/dragimag.cpp
samples/erase/erase.cpp
samples/grid/grid.cpp
samples/html/help/help.cpp
samples/html/printing/printing.cpp
samples/image/image.cpp
samples/ipc/client.cpp
samples/ipc/client.h
samples/joytest/joytest.cpp
samples/joytest/joytest.h
samples/layout/layout.cpp
samples/layout/layout.h
samples/memcheck/memcheck.cpp
samples/mfc/mfctest.cpp
samples/mfc/mfctest.h
samples/minifram/minifram.h
samples/nativdlg/nativdlg.cpp
samples/nativdlg/nativdlg.h
samples/newgrid/griddemo.cpp
samples/oleauto/oleauto.cpp
samples/opengl/cube/cube.cpp
samples/opengl/cube/cube.h
samples/opengl/isosurf/isosurf.cpp
samples/opengl/isosurf/isosurf.h
samples/opengl/penguin/lw.cpp
samples/opengl/penguin/penguin.cpp
samples/opengl/penguin/penguin.h
samples/png/pngdemo.cpp
samples/png/pngdemo.h
samples/proplist/proplist.cpp
samples/proplist/proplist.h
samples/resource/resource.cpp
samples/resource/resource.h
samples/samples.dsw
samples/sashtest/sashtest.cpp
samples/sashtest/sashtest.h
samples/scrollsub/scrollsub.cpp
samples/statbar/statbar.cpp
samples/tab/tab.cpp
samples/tab/tab.h
samples/taskbar/tbtest.cpp
samples/taskbar/tbtest.h
samples/treelay/treelay.cpp
samples/treelay/treelay.h
samples/typetest/typetest.cpp
samples/widgets/combobox.cpp
samples/wizard/wizard.cpp

index 5b7ff2fa70fbfb0d0339c518e56a2d0693d8c8a2..3abb6ffb0c684e14d12cae410849285bb5cd94df 100644 (file)
@@ -2871,7 +2871,7 @@ END_EVENT_TABLE()
 
 DbGridFrame::DbGridFrame(wxWindow *parent)
     : wxFrame (parent, -1, wxT("Database Table"),
-                   wxDefaultPosition, wxSize(400, 325))
+               wxDefaultPosition, wxSize(400, 325))
 {
     initialized = FALSE;
 }
index 4e19c5a3db76b957f018269aff90d3ad075768da..d20fd3d9b5312aeef66e775a254d7486a5473dc6 100644 (file)
@@ -187,14 +187,14 @@ DECLARE_EVENT_TABLE()
 class DbGridFrame : public wxFrame
 {
 public:
-       bool     initialized;
+    bool     initialized;
 
-       DbGridFrame(wxWindow *parent);
+    DbGridFrame(wxWindow *parent);
 
-       void     OnCloseWindow(wxCloseEvent& event);
-       bool     Initialize();
+    void     OnCloseWindow(wxCloseEvent& event);
+    bool     Initialize();
 
-       DECLARE_EVENT_TABLE()
+    DECLARE_EVENT_TABLE()
 };
 
 #endif
index f60902a4e626ac6bea3f97a2e19ac829e8662cbf..ccf40bebb623b9fc23ddf68aed6840b6eb6b98ac 100644 (file)
@@ -190,7 +190,7 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, wxChar *windowTitle, wxChar *tableName,
     widgetPtrsSet = TRUE;
 
     // Query the lookup table and display the result set
-        lookup = new Clookup(tableName, colName, pDb, defDir);
+    lookup = new Clookup(tableName, colName, pDb, defDir);
     if (!lookup)
     {
         wxMessageBox(wxT("Error allocating memory for 'Clookup'object."),wxT("Error..."));
@@ -295,7 +295,7 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, wxChar *windowTitle, wxChar *tableName,
     widgetPtrsSet = TRUE;
 
     // Query the lookup table and display the result set
-        lookup2 = new Clookup2(tableName, dispCol1, dispCol2, pDb, defDir);
+    lookup2 = new Clookup2(tableName, dispCol1, dispCol2, pDb, defDir);
     if (!lookup2)
     {
         wxMessageBox(wxT("Error allocating memory for 'Clookup2' object."),wxT("Error..."));
index 725d39d68548b9436efe74b28289d279d2ecdc04..da03ec3214db5097b8a53c8338ab1ee48c90bd2c 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
index a843fc2f780d706db87d81230f09894e74f98336..fde6be752aba3c22d710be59edc81d3282f240a8 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
index 96661165e1ae29bf174afb951806ac6a9e59c80c..4282c81e64e5bd0da87dea452516ed7e6e33d9fb 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
index 473e8b526e27f71047db85d3ebf1809f43a6b732..d28a204e64fb38807f1cea0df523978c8edc9437 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
index 06e35d3a84dfb26d5ff582df091850d9a06aedb4..9c89122f40a12b430721b628a03c1f0df4a29feb 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
index 950d8b6dcdc048ac0c25b9b5fc81b102605701c8..2826393da119165ce826b5190c901c97350cb39c 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
index c5be85a308f636c368b3a5365c50d77aafe88e7a..5a327aefe3ccaac9ec543682df0421f0d7dff41b 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
@@ -163,8 +163,8 @@ wxSTD ostream& DoodleSegment::SaveObject(wxSTD ostream& stream)
     DoodleLine *line = (DoodleLine *)node->Data();
     stream << line->x1 << " " << 
                    line->y1 << " " << 
-                  line->x2 << " " << 
-                  line->y2 << "\n";
+           line->x2 << " " << 
+           line->y2 << "\n";
     node = node->Next();
   }
 
@@ -184,8 +184,8 @@ wxOutputStream &DoodleSegment::SaveObject(wxOutputStream& stream)
     DoodleLine *line = (DoodleLine *)node->Data();
     text_stream << line->x1 << " " << 
                    line->y1 << " " << 
-                  line->x2 << " " << 
-                  line->y2 << "\n";
+           line->x2 << " " << 
+           line->y2 << "\n";
     node = node->Next();
   }
 
@@ -204,8 +204,8 @@ wxSTD istream& DoodleSegment::LoadObject(wxSTD istream& stream)
     DoodleLine *line = new DoodleLine;
     stream >> line->x1 >> 
                    line->y1 >> 
-                  line->x2 >> 
-                  line->y2;
+           line->x2 >> 
+           line->y2;
     lines.Append(line);
   }
   
@@ -224,8 +224,8 @@ wxInputStream &DoodleSegment::LoadObject(wxInputStream& stream)
     DoodleLine *line = new DoodleLine;
     text_stream >> line->x1 >> 
                    line->y1 >> 
-                  line->x2 >> 
-                  line->y2;
+           line->x2 >> 
+           line->y2;
     lines.Append(line);
   }
   
index 9440f374e0460fde2df2cfe3a14ba73a777c85c5..54a233fed1c2ca0dd90b1c75ca9f92dc356f2516 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
index 900f20cfddc4e9e02290a1acfd5871159feceab0..ab2f34640fce0a2348ded0d985981882d6693271 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
index 937c6f0e543d8b6e553ca62a7ab3e2e16db9ad4b..3d0ad4274d3c85ddb937ea403150b486e2c9e673 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
index 5a41fff149c4c951edd78799b584cbd4e72400d3..d359871f4604a573311ddead609b1cbd9fc41f3a 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
index f44634985626e2d1372066ada3fd88b9280f11b5..11f2ff6aedb12a229614bf1ac85e4bb2c597b841 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
index 7f169d5d1deb8c33e83b2661fc00c12243072fd6..13a4f500855a8ad0350ffe138cbc821d16b2b050 100644 (file)
@@ -394,9 +394,9 @@ bool MyApp::OnInit()
     {
         wxString filename;
         filename.Printf(wxT("%s%d.png"), (const wxChar*)rootName, i);
-       /* For some reason under wxX11, the 2nd LoadFile in this loop fails, with
-          a BadMatch inside CreateFromImage (inside ConvertToBitmap). This happens even if you copy
-          the first file over the second file. */
+    /* For some reason under wxX11, the 2nd LoadFile in this loop fails, with
+       a BadMatch inside CreateFromImage (inside ConvertToBitmap). This happens even if you copy
+       the first file over the second file. */
         if (image.LoadFile(filename, wxBITMAP_TYPE_PNG))
         {
             DragShape* newShape = new DragShape(image.ConvertToBitmap());
index ec15d7978ea227ec6febaf1f13f84c583b945f04..9f159bbebcd3e0cc558fd27caad150e51b12be31 100644 (file)
@@ -195,13 +195,14 @@ void MyCanvas::OnPaint( wxPaintEvent &event )
     wxSize client_size = GetClientSize();
     wxLogDebug( "size %d %d client_size %d %d", size.x, size.y, client_size.x, client_size.y );
 #endif
-    
+
+    int i;
     dc.SetPen( *wxWHITE_PEN );
-    for (int i = 0; i < 20; i += 2)
+    for (i = 0; i < 20; i += 2)
        dc.DrawLine( i,i, i+100,i );
     
     dc.SetPen( *wxWHITE_PEN );
-    for (int i = 200; i < 220; i += 2)
+    for (i = 200; i < 220; i += 2)
        dc.DrawLine( i-200,i, i-100,i );
     
     wxRegion region( 110, 110, 80, 80 );
index 2e1d4544d23bab31a8df39d68fbf1d0a70cde7e3..3f37efaf5e11984f6f8f21cd4de2374dcc959988 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * File:       grid.cpp
- * Purpose:    wxGrid test
- * Author:     Julian Smart
- * Created:    1995
- * Updated:    
+ * File:    grid.cpp
+ * Purpose: wxGrid test
+ * Author:  Julian Smart
+ * Created: 1995
+ * Updated:
  * Copyright:   (c) 1995, AIAI, University of Edinburgh
  */
 
@@ -25,8 +25,10 @@ static const char sccsid[] = "%W% %G%";
 
 // Define a new application type
 class MyApp: public wxApp
-{ public:
-    bool OnInit(void);
+{
+public:
+    virtual bool OnInit(void);
+    virtual int OnExit();
 };
 
 
@@ -85,235 +87,258 @@ IMPLEMENT_APP(MyApp)
 bool MyApp::OnInit(void)
 {
 #ifdef __WXMSW__
-  cellBitmap1 = new wxBitmap("bitmap1");
-  cellBitmap2 = new wxBitmap("bitmap2");
+    cellBitmap1 = new wxBitmap("bitmap1");
+    cellBitmap2 = new wxBitmap("bitmap2");
 #endif
 
-  // Create the main frame window
-  MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "wxGrid Sample", wxPoint(50, 50), wxSize(450, 300));
-  
-  // Give it an icon
+    // Create the main frame window
+    MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "wxGrid Sample", wxPoint(50, 50), wxSize(450, 300));
+
+    // Give it an icon
 #ifdef __WXMSW__
-  frame->SetIcon(wxIcon("mondrian"));
+    frame->SetIcon(wxIcon("mondrian"));
 #endif
 
-  // Make a menubar
-  wxMenu *file_menu = new wxMenu;
-  file_menu->Append(GRID_QUIT, "E&xit");
-
-  wxMenu *settings_menu = new wxMenu;
-  settings_menu->Append(GRID_TOGGLE_EDITABLE, "&Toggle editable");
-  settings_menu->Append(GRID_TOGGLE_EDITINPLACE, "&Toggle edit in place");
-  settings_menu->Append(GRID_TOGGLE_ROW_LABEL, "Toggle ro&w label");
-  settings_menu->Append(GRID_TOGGLE_COL_LABEL, "Toggle co&l label");
-  settings_menu->Append(GRID_TOGGLE_DIVIDERS, "Toggle &dividers");
-  settings_menu->AppendSeparator();
-  settings_menu->Append(GRID_LEFT_CELL, "&Left cell alignment ");
-  settings_menu->Append(GRID_CENTRE_CELL, "&Centre cell alignment ");
-  settings_menu->Append(GRID_RIGHT_CELL, "&Right cell alignment ");
-  settings_menu->AppendSeparator();
-  settings_menu->Append(GRID_COLOUR_LABEL_BACKGROUND, "Choose a label &background colour");
-  settings_menu->Append(GRID_COLOUR_LABEL_TEXT, "Choose a label fore&ground colour");
-  settings_menu->Append(GRID_NORMAL_LABEL_COLOURING, "&Normal label colouring");
-  settings_menu->AppendSeparator();
-  settings_menu->Append(GRID_COLOUR_CELL_BACKGROUND, "Choo&se a cell &background colour");
-  settings_menu->Append(GRID_COLOUR_CELL_TEXT, "Choose &a cell foreground colour");
-  settings_menu->Append(GRID_NORMAL_CELL_COLOURING, "N&ormal cell colouring");
-
-  wxMenuBar *menu_bar = new wxMenuBar;
-  menu_bar->Append(file_menu, "&File");
-  menu_bar->Append(settings_menu, "&Settings");
-  frame->SetMenuBar(menu_bar);
-
-  // Make a grid
-  frame->grid = new wxGrid(frame, 0, 0, 400, 400);
-
-  frame->grid->CreateGrid(10, 8);
-  frame->grid->SetColumnWidth(3, 200);
-  frame->grid->SetRowHeight(4, 45);
-  frame->grid->SetCellValue("First cell", 0, 0);
-  frame->grid->SetCellValue("Another cell", 1, 1);
-  frame->grid->SetCellValue("Yet another cell", 2, 2);
-  frame->grid->SetCellTextFont(wxFont(10, wxROMAN, wxITALIC, wxNORMAL), 0, 0);
-  frame->grid->SetCellTextColour(*wxRED, 1, 1);
-  frame->grid->SetCellBackgroundColour(*wxCYAN, 2, 2);
-  if (cellBitmap1 && cellBitmap2)
-  {
-    frame->grid->SetCellAlignment(wxCENTRE, 5, 0);
-    frame->grid->SetCellAlignment(wxCENTRE, 6, 0);
-    frame->grid->SetCellBitmap(cellBitmap1, 5, 0);
-    frame->grid->SetCellBitmap(cellBitmap2, 6, 0);
-  }
-  
-  frame->grid->UpdateDimensions();
-  
-  // Show the frame
-  frame->Show(TRUE);
-
-  SetTopWindow(frame);
-  return TRUE;
+    // Make a menubar
+    wxMenu *file_menu = new wxMenu;
+    file_menu->Append(GRID_QUIT, "E&xit");
+
+    wxMenu *settings_menu = new wxMenu;
+    settings_menu->Append(GRID_TOGGLE_EDITABLE, "&Toggle editable");
+    settings_menu->Append(GRID_TOGGLE_EDITINPLACE, "&Toggle edit in place");
+    settings_menu->Append(GRID_TOGGLE_ROW_LABEL, "Toggle ro&w label");
+    settings_menu->Append(GRID_TOGGLE_COL_LABEL, "Toggle co&l label");
+    settings_menu->Append(GRID_TOGGLE_DIVIDERS, "Toggle &dividers");
+    settings_menu->AppendSeparator();
+    settings_menu->Append(GRID_LEFT_CELL, "&Left cell alignment ");
+    settings_menu->Append(GRID_CENTRE_CELL, "&Centre cell alignment ");
+    settings_menu->Append(GRID_RIGHT_CELL, "&Right cell alignment ");
+    settings_menu->AppendSeparator();
+    settings_menu->Append(GRID_COLOUR_LABEL_BACKGROUND, "Choose a label &background colour");
+    settings_menu->Append(GRID_COLOUR_LABEL_TEXT, "Choose a label fore&ground colour");
+    settings_menu->Append(GRID_NORMAL_LABEL_COLOURING, "&Normal label colouring");
+    settings_menu->AppendSeparator();
+    settings_menu->Append(GRID_COLOUR_CELL_BACKGROUND, "Choo&se a cell &background colour");
+    settings_menu->Append(GRID_COLOUR_CELL_TEXT, "Choose &a cell foreground colour");
+    settings_menu->Append(GRID_NORMAL_CELL_COLOURING, "N&ormal cell colouring");
+
+    wxMenuBar *menu_bar = new wxMenuBar;
+    menu_bar->Append(file_menu, "&File");
+    menu_bar->Append(settings_menu, "&Settings");
+    frame->SetMenuBar(menu_bar);
+
+    // Make a grid
+    frame->grid = new wxGrid(frame, 0, 0, 400, 400);
+
+    frame->grid->CreateGrid(10, 8);
+    frame->grid->SetColumnWidth(3, 200);
+    frame->grid->SetRowHeight(4, 45);
+    frame->grid->SetCellValue("First cell", 0, 0);
+    frame->grid->SetCellValue("Another cell", 1, 1);
+    frame->grid->SetCellValue("Yet another cell", 2, 2);
+    frame->grid->SetCellTextFont(wxFont(10, wxROMAN, wxITALIC, wxNORMAL), 0, 0);
+    frame->grid->SetCellTextColour(*wxRED, 1, 1);
+    frame->grid->SetCellBackgroundColour(*wxCYAN, 2, 2);
+    if (cellBitmap1 && cellBitmap2)
+    {
+        frame->grid->SetCellAlignment(wxCENTRE, 5, 0);
+        frame->grid->SetCellAlignment(wxCENTRE, 6, 0);
+        frame->grid->SetCellBitmap(cellBitmap1, 5, 0);
+        frame->grid->SetCellBitmap(cellBitmap2, 6, 0);
+    }
+
+    frame->grid->UpdateDimensions();
+
+    // Show the frame
+    frame->Show(TRUE);
+
+    SetTopWindow(frame);
+    return TRUE;
+}
+
+int MyApp::OnExit()
+{
+    if (cellBitmap1)
+    {
+        delete cellBitmap1;
+        cellBitmap1 = (wxBitmap *) NULL;
+    }
+
+    if (cellBitmap2)
+    {
+        delete cellBitmap2;
+        cellBitmap1 = (wxBitmap *) NULL;
+    }
+
+    // exit code is 0, everything is ok
+    return 0;
 }
 
+
 // My frame constructor
-MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size):
-  wxFrame(frame, -1, title, pos, size)
+MyFrame::MyFrame(wxFrame *frame, const wxString& title,
+                 const wxPoint& pos, const wxSize& size):
+    wxFrame(frame, -1, title, pos, size)
 {
-  grid = (wxGrid*) NULL;
+    grid = (wxGrid*) NULL;
 }
 
 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
-  EVT_MENU(GRID_TOGGLE_EDITABLE, MyFrame::ToggleEditable)
-  EVT_MENU(GRID_TOGGLE_EDITINPLACE, MyFrame::ToggleEditInPlace)
-  EVT_MENU(GRID_TOGGLE_ROW_LABEL, MyFrame::ToggleRowLabel)
-  EVT_MENU(GRID_TOGGLE_COL_LABEL, MyFrame::ToggleColLabel)
-  EVT_MENU(GRID_TOGGLE_DIVIDERS, MyFrame::ToggleDividers)
-  EVT_MENU(GRID_LEFT_CELL, MyFrame::LeftCell)
-  EVT_MENU(GRID_CENTRE_CELL, MyFrame::CentreCell)
-  EVT_MENU(GRID_RIGHT_CELL, MyFrame::RightCell)
-  EVT_MENU(GRID_COLOUR_LABEL_BACKGROUND, MyFrame::ColourLabelBackground)
-  EVT_MENU(GRID_COLOUR_LABEL_TEXT, MyFrame::ColourLabelText)
-  EVT_MENU(GRID_NORMAL_LABEL_COLOURING, MyFrame::NormalLabelColouring)
-  EVT_MENU(GRID_COLOUR_CELL_BACKGROUND, MyFrame::ColourCellBackground)
-  EVT_MENU(GRID_COLOUR_CELL_TEXT, MyFrame::ColourCellText)
-  EVT_MENU(GRID_NORMAL_CELL_COLOURING, MyFrame::NormalCellColouring)
-  EVT_MENU(GRID_QUIT, MyFrame::Quit)
+    EVT_MENU(GRID_TOGGLE_EDITABLE, MyFrame::ToggleEditable)
+    EVT_MENU(GRID_TOGGLE_EDITINPLACE, MyFrame::ToggleEditInPlace)
+    EVT_MENU(GRID_TOGGLE_ROW_LABEL, MyFrame::ToggleRowLabel)
+    EVT_MENU(GRID_TOGGLE_COL_LABEL, MyFrame::ToggleColLabel)
+    EVT_MENU(GRID_TOGGLE_DIVIDERS, MyFrame::ToggleDividers)
+    EVT_MENU(GRID_LEFT_CELL, MyFrame::LeftCell)
+    EVT_MENU(GRID_CENTRE_CELL, MyFrame::CentreCell)
+    EVT_MENU(GRID_RIGHT_CELL, MyFrame::RightCell)
+    EVT_MENU(GRID_COLOUR_LABEL_BACKGROUND, MyFrame::ColourLabelBackground)
+    EVT_MENU(GRID_COLOUR_LABEL_TEXT, MyFrame::ColourLabelText)
+    EVT_MENU(GRID_NORMAL_LABEL_COLOURING, MyFrame::NormalLabelColouring)
+    EVT_MENU(GRID_COLOUR_CELL_BACKGROUND, MyFrame::ColourCellBackground)
+    EVT_MENU(GRID_COLOUR_CELL_TEXT, MyFrame::ColourCellText)
+    EVT_MENU(GRID_NORMAL_CELL_COLOURING, MyFrame::NormalCellColouring)
+    EVT_MENU(GRID_QUIT, MyFrame::Quit)
 END_EVENT_TABLE()
 
 void MyFrame::ToggleEditable(wxCommandEvent& WXUNUSED(event))
 {
-      grid->SetEditable(!grid->GetEditable());
-      grid->Refresh();
+    grid->SetEditable(!grid->GetEditable());
+    grid->Refresh();
 }
 
 void MyFrame::ToggleEditInPlace(wxCommandEvent& WXUNUSED(event))
 {
-      grid->SetEditInPlace(!grid->GetEditInPlace());
-      grid->Refresh();
+    grid->SetEditInPlace(!grid->GetEditInPlace());
+    grid->Refresh();
 }
 
 void MyFrame::ToggleRowLabel(wxCommandEvent& WXUNUSED(event))
 {
-      if (grid->GetLabelSize(wxVERTICAL) > 0)
+    if (grid->GetLabelSize(wxVERTICAL) > 0)
         grid->SetLabelSize(wxVERTICAL, 0);
-      else
+    else
         grid->SetLabelSize(wxVERTICAL, 40);
-      grid->Refresh();
+
+    grid->Refresh();
 }
 
 void MyFrame::ToggleColLabel(wxCommandEvent& WXUNUSED(event))
 {
-      if (grid->GetLabelSize(wxHORIZONTAL) > 0)
+    if (grid->GetLabelSize(wxHORIZONTAL) > 0)
         grid->SetLabelSize(wxHORIZONTAL, 0);
-      else
+    else
         grid->SetLabelSize(wxHORIZONTAL, 20);
+
       grid->Refresh();
 }
 
 void MyFrame::ToggleDividers(wxCommandEvent& WXUNUSED(event))
 {
-      if (!grid->GetDividerPen().Ok())
+    if (!grid->GetDividerPen().Ok())
         grid->SetDividerPen(wxPen(wxT("LIGHT GREY"), 1, wxSOLID));
-      else
+    else
         grid->SetDividerPen(wxNullPen);
-      grid->Refresh();
+
+grid->Refresh();
 }
 
 void MyFrame::LeftCell(wxCommandEvent& WXUNUSED(event))
 {
-      grid->SetCellAlignment(wxLEFT);
-      grid->Refresh();
+    grid->SetCellAlignment(wxLEFT);
+    grid->Refresh();
 }
 
 void MyFrame::CentreCell(wxCommandEvent& WXUNUSED(event))
 {
-      grid->SetCellAlignment(wxCENTRE);
-      grid->Refresh();
+    grid->SetCellAlignment(wxCENTRE);
+    grid->Refresh();
 }
 
 void MyFrame::RightCell(wxCommandEvent& WXUNUSED(event))
 {
-      grid->SetCellAlignment(wxRIGHT);
-      grid->Refresh();
+    grid->SetCellAlignment(wxRIGHT);
+    grid->Refresh();
 }
 
 void MyFrame::ColourLabelBackground(wxCommandEvent& WXUNUSED(event))
 {
-      wxColourData data;
-      data.SetChooseFull(TRUE);
-      wxColourDialog dialog(this, &data);
-      if (dialog.ShowModal() != wxID_CANCEL)
-      {
+    wxColourData data;
+    data.SetChooseFull(TRUE);
+    wxColourDialog dialog(this, &data);
+    if (dialog.ShowModal() != wxID_CANCEL)
+    {
         wxColourData retData = dialog.GetColourData();
         wxColour col = retData.GetColour();
         grid->SetLabelBackgroundColour(col);
         grid->Refresh();
-      }
+    }
 }
 
 void MyFrame::ColourLabelText(wxCommandEvent& WXUNUSED(event))
 {
-      wxColourData data;
-      data.SetChooseFull(TRUE);
-      wxColourDialog dialog(this, &data);
-      if (dialog.ShowModal() != wxID_CANCEL)
-      {
+    wxColourData data;
+    data.SetChooseFull(TRUE);
+    wxColourDialog dialog(this, &data);
+    if (dialog.ShowModal() != wxID_CANCEL)
+    {
         wxColourData retData = dialog.GetColourData();
         wxColour col = retData.GetColour();
         grid->SetLabelTextColour(col);
         grid->Refresh();
-      }
+    }
 }
 
 void MyFrame::NormalLabelColouring(wxCommandEvent& WXUNUSED(event))
 {
-      grid->SetLabelBackgroundColour(*wxLIGHT_GREY);
-      grid->SetLabelTextColour(*wxBLACK);
-      grid->Refresh();
+    grid->SetLabelBackgroundColour(*wxLIGHT_GREY);
+    grid->SetLabelTextColour(*wxBLACK);
+    grid->Refresh();
 }
 
 void MyFrame::ColourCellBackground(wxCommandEvent& WXUNUSED(event))
 {
-      wxColourData data;
-      data.SetChooseFull(TRUE);
-      wxColourDialog dialog(this, &data);
-      if (dialog.ShowModal() != wxID_CANCEL)
-      {
+    wxColourData data;
+    data.SetChooseFull(TRUE);
+    wxColourDialog dialog(this, &data);
+    if (dialog.ShowModal() != wxID_CANCEL)
+    {
         wxColourData retData = dialog.GetColourData();
         wxColour col = retData.GetColour();
         grid->SetCellBackgroundColour(col);
         grid->Refresh();
-      }
+    }
 }
 
 void MyFrame::ColourCellText(wxCommandEvent& WXUNUSED(event))
 {
-      wxColourData data;
-      data.SetChooseFull(TRUE);
-      wxColourDialog dialog(this, &data);
-      if (dialog.ShowModal() != wxID_CANCEL)
-      {
+    wxColourData data;
+    data.SetChooseFull(TRUE);
+    wxColourDialog dialog(this, &data);
+    if (dialog.ShowModal() != wxID_CANCEL)
+    {
         wxColourData retData = dialog.GetColourData();
         wxColour col = retData.GetColour();
         grid->SetCellTextColour(col);
         grid->Refresh();
-      }
+    }
 }
 
 void MyFrame::NormalCellColouring(wxCommandEvent& WXUNUSED(event))
 {
-      grid->SetCellBackgroundColour(*wxWHITE);
-      grid->SetCellTextColour(*wxBLACK);
-      grid->Refresh();
+    grid->SetCellBackgroundColour(*wxWHITE);
+    grid->SetCellTextColour(*wxBLACK);
+    grid->Refresh();
 }
 
 void MyFrame::Quit(wxCommandEvent& WXUNUSED(event))
 {
-      this->Close(TRUE);
+    this->Close(TRUE);
 }
 
 // Ensure that the grid's edit control always has the focus.
 void MyFrame::OnActivate(wxActivateEvent& event)
 {
-  if (grid) grid->OnActivate(event.GetActive());
+    if (grid) grid->OnActivate(event.GetActive());
 }
 
index 0cde485388dd07b68081bd771ec164862e705b31..1c344c68f8057c8857e48d943bdc7ecc46216b07 100644 (file)
       ret = help.AddBook("helpfiles/testing.hhp");
 #endif
       if (! ret)
-         wxMessageBox("Failed adding book helpfiles/testing.hhp");
+        wxMessageBox("Failed adding book helpfiles/testing.hhp");
 #ifdef __WXMAC__
       ret = help.AddBook(":helpfiles:another.hhp");
 #else
       ret = help.AddBook("helpfiles/another.hhp");
 #endif
       if (! ret)
-         wxMessageBox("Failed adding book helpfiles/another.hhp");
+        wxMessageBox("Failed adding book helpfiles/another.hhp");
    }
 
 
index 4ccb47d74af7e84ec27957ba41ea632750dc51de..fe6db85c7560ac8e5ffc938e44fc3a5a7440bb1a 100644 (file)
@@ -44,9 +44,10 @@ class MyApp : public wxApp
 class MyFrame : public wxFrame
 {
     public:
-        // ctor(s)
+        // ctor and dtor
 
         MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
+        virtual ~MyFrame();
 
         // event handlers (these functions should _not_ be virtual)
         void OnQuit(wxCommandEvent& event);
@@ -185,12 +186,18 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
     m_Prn -> SetHeader(m_Name + "(@PAGENUM@/@PAGESCNT@)<hr>", wxPAGE_ALL);
 }
 
+// frame destructor
+MyFrame::~MyFrame()
+{
+    delete m_Prn;
+    m_Prn = (wxHtmlEasyPrinting *) NULL;
+}
+
 
 // event handlers
 
 void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
 {
-    delete m_Prn;    
     // TRUE is to force the frame to close
     Close(TRUE);
 }
@@ -234,7 +241,7 @@ void MyFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
     {
         m_Name = dialog.GetPath();
         m_Html -> LoadPage(m_Name);
-       m_Prn -> SetHeader(m_Name + "(@PAGENUM@/@PAGESCNT@)<hr>", wxPAGE_ALL);
+        m_Prn -> SetHeader(m_Name + "(@PAGENUM@/@PAGESCNT@)<hr>", wxPAGE_ALL);
     } 
 }
 
index 60dac7ff8d43ab43504cafc6d14a2427c334b8d5..d08a07585d4f430fdfd82f5a68183933ae320fda 100644 (file)
@@ -317,7 +317,8 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
 #if wxUSE_GIF
     image.Destroy();
 
-    if ( !image.LoadFile( dir + wxString("horse.gif")) )
+    if ( !image.LoadFile( dir + wxString("horse.gif")))
+    //if ( !image.LoadFile( wxString("\\slidbar.gif"), wxBITMAP_TYPE_GIF, -2) )
         wxLogError(wxT("Can't load GIF image"));
     else
         my_horse_gif = new wxBitmap( image );
@@ -430,6 +431,7 @@ MyCanvas::~MyCanvas()
     delete my_horse_ico32;
     delete my_horse_ico16;
     delete my_horse_ico;
+    delete my_horse_cur;
     delete my_smile_xbm;
     delete my_square;
     delete my_anti;
index a964af465d51ba0827c961bf0dbb80af5684ee98..a7255b2e4465a2d4a1af3d12eebd082295488c52 100644 (file)
@@ -60,7 +60,7 @@ char ipc_buffer[4000];
 wxListBox *the_list = NULL;
 
 MyConnection *the_connection = NULL;
-MyClient *my_client ;
+MyClient *my_client;
 
 // ============================================================================
 // implementation
@@ -121,11 +121,17 @@ int MyApp::OnExit()
     if (the_connection)
     {
         the_connection->Disconnect();
+        delete the_connection;
+        the_connection = NULL;
     }
 
     // will delete the connection too
+    // Update: Seems it didn't delete the_connection, because there's a leak.
+    // Deletion is now explicitly done a few lines up.
     delete my_client;
 
+
+
     return 0;
 }
 
@@ -207,11 +213,6 @@ MyConnection::MyConnection()
 {
 }
 
-MyConnection::~MyConnection()
-{
-    the_connection = NULL;
-}
-
 bool MyConnection::OnAdvise(const wxString& topic, const wxString& item, char *data, int size, wxIPCFormat format)
 {
     if (the_list)
index 8dcdc7dbe4f71d069c7077e8fe2d1971d672b0cf..aae6609c419e391d657e70a830845937b50df901 100644 (file)
@@ -38,7 +38,6 @@ class MyConnection: public wxConnection
 {
 public:
     MyConnection();
-    ~MyConnection();
 
     bool OnAdvise(const wxString& topic, const wxString& item, char *data, int size, wxIPCFormat format);
     bool OnDisconnect();
index a0737939281543fe2b38ade48e3cb38478b18a33..189314b3a8948c81c78ece5a2548066d809aebd9 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 // For compilers that support precompilation, includes "wx/wx.h".
@@ -94,7 +94,7 @@ bool MyApp::OnInit(void)
 }
 
 BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
-       EVT_JOYSTICK_EVENTS(MyCanvas::OnJoystickEvent)
+    EVT_JOYSTICK_EVENTS(MyCanvas::OnJoystickEvent)
 END_EVENT_TABLE()
 
 // Define a constructor for my canvas
index 18a8a75e3cc96da2c749b58ebc0563f1ac781c15..9a08f6f5e3ca9f9d60e019d288739058b743ed0c 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 // Define a new application
index 7eb0a1fad8b7841b968c29cd8d669f9f506ebf23..c3bfb5e58dd193b9733bba21df4e643cbc718d60 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 // For compilers that support precompilation, includes "wx/wx.h".
index dae135e135bfe7edcd1173d19a7cba3f76a43014..eba0332e1691e7642a77861f04201ab872fee627 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 // Define a new application
index 54712a16f489e8aee432b2033112783b929dcb17..750a8f1f695228524ff731c68b4b898984a815e5 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
index d50d963470b7da5eda60d5ef6bebc2537f7c6c75..7121cc136c5326514b4bc7dccc5a69dac722b512 100644 (file)
@@ -134,9 +134,9 @@ IMPLEMENT_APP(MyApp)
 //
 CMainWindow::CMainWindow()
 {
-       LoadAccelTable( "MainAccelTable" );
-       Create( NULL, "Hello Foundation Application",
-               WS_OVERLAPPEDWINDOW, rectDefault, NULL, "MainMenu" );
+    LoadAccelTable( "MainAccelTable" );
+    Create( NULL, "Hello Foundation Application",
+        WS_OVERLAPPEDWINDOW, rectDefault, NULL, "MainMenu" );
 }
 
 // OnPaint:
@@ -148,16 +148,16 @@ CMainWindow::CMainWindow()
 //
 void CMainWindow::OnPaint()
 {
-       CString s = "Hello, Windows!";
-       CPaintDC dc( this );
-       CRect rect;
-
-       GetClientRect( rect );
-       dc.SetTextAlign( TA_BASELINE | TA_CENTER );
-       dc.SetTextColor( ::GetSysColor( COLOR_WINDOWTEXT ) );
-       dc.SetBkMode(TRANSPARENT);
-       dc.TextOut( ( rect.right / 2 ), ( rect.bottom / 2 ),
-                               s, s.GetLength() );
+    CString s = "Hello, Windows!";
+    CPaintDC dc( this );
+    CRect rect;
+
+    GetClientRect( rect );
+    dc.SetTextAlign( TA_BASELINE | TA_CENTER );
+    dc.SetTextColor( ::GetSysColor( COLOR_WINDOWTEXT ) );
+    dc.SetBkMode(TRANSPARENT);
+    dc.TextOut( ( rect.right / 2 ), ( rect.bottom / 2 ),
+                s, s.GetLength() );
 }
 
 // OnAbout:
@@ -170,8 +170,8 @@ void CMainWindow::OnPaint()
 //
 void CMainWindow::OnAbout()
 {
-       CDialog about( "AboutBox", this );
-       about.DoModal();
+    CDialog about( "AboutBox", this );
+    about.DoModal();
 }
 
 void CMainWindow::OnTest()
@@ -190,11 +190,11 @@ void CMainWindow::OnTest()
 // receive no arguments and are void of return type, e.g., "void OnAbout()".
 //
 BEGIN_MESSAGE_MAP( CMainWindow, CFrameWnd )
-       //{{AFX_MSG_MAP( CMainWindow )
-       ON_WM_PAINT()
-       ON_COMMAND( IDM_ABOUT, OnAbout )
-       ON_COMMAND( IDM_TEST, OnTest )
-       //}}AFX_MSG_MAP
+    //{{AFX_MSG_MAP( CMainWindow )
+    ON_WM_PAINT()
+    ON_COMMAND( IDM_ABOUT, OnAbout )
+    ON_COMMAND( IDM_TEST, OnTest )
+    //}}AFX_MSG_MAP
 END_MESSAGE_MAP()
 
 /////////////////////////////////////////////////////////////////////////////
@@ -209,16 +209,16 @@ END_MESSAGE_MAP()
 //
 BOOL CTheApp::InitInstance()
 {
-       TRACE( "HELLO WORLD\n" );
+    TRACE( "HELLO WORLD\n" );
 
-       SetDialogBkColor();     // hook gray dialogs (was default in MFC V1)
+    SetDialogBkColor();     // hook gray dialogs (was default in MFC V1)
 
     wxEntry((WXHINSTANCE) m_hInstance, (WXHINSTANCE) m_hPrevInstance, m_lpCmdLine, m_nCmdShow, FALSE);
 
 /*
-       m_pMainWnd = new CMainWindow();
-       m_pMainWnd->ShowWindow( m_nCmdShow );
-       m_pMainWnd->UpdateWindow();
+    m_pMainWnd = new CMainWindow();
+    m_pMainWnd->ShowWindow( m_nCmdShow );
+    m_pMainWnd->UpdateWindow();
 */
 
     if (wxTheApp && wxTheApp->GetTopWindow())
@@ -226,7 +226,7 @@ BOOL CTheApp::InitInstance()
         m_pMainWnd = new CDummyWindow((HWND) wxTheApp->GetTopWindow()->GetHWND());
     }
 
-       return TRUE;
+    return TRUE;
 }
 
 int CTheApp::ExitInstance()
index 038a08cad26361e0ec5445d3475660a5869d24cb..f95a27c03c49bf2cfadc39925e390250a6792694 100644 (file)
 class CMainWindow : public CFrameWnd
 {
 public:
-       CMainWindow();
+    CMainWindow();
 
-       //{{AFX_MSG( CMainWindow )
-       afx_msg void OnPaint();
-       afx_msg void OnAbout();
-       afx_msg void OnTest();
-       //}}AFX_MSG
+    //{{AFX_MSG( CMainWindow )
+    afx_msg void OnPaint();
+    afx_msg void OnAbout();
+    afx_msg void OnTest();
+    //}}AFX_MSG
 
-       DECLARE_MESSAGE_MAP()
+    DECLARE_MESSAGE_MAP()
 };
 
 // A dummy CWnd pointing to a wxWindow's HWND
@@ -52,7 +52,7 @@ class CDummyWindow: public CWnd
 class CTheApp : public CWinApp
 {
 public:
-       BOOL InitInstance();
+    BOOL InitInstance();
     int ExitInstance();
 
     // Override this to provide wxWindows message loop
index d71035f3d54a820bddac15461b9622289f85e605..ea3c215c516f202e0e6ee837553c2761946b625d 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     23/07/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Robert Roebling
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #include "wx/minifram.h"
index 6d16c488af55e3db7ae3beff7d5449a87d37b84b..764f619784993b6fcae8571b33aa2761a634a22b 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
@@ -76,8 +76,8 @@ bool MyApp::OnInit(void)
 }
 
 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
-       EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit)
-       EVT_MENU(RESOURCE_TEST1, MyFrame::OnTest1)
+    EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit)
+    EVT_MENU(RESOURCE_TEST1, MyFrame::OnTest1)
 END_EVENT_TABLE()
 
 // Define my frame constructor
@@ -89,7 +89,7 @@ MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, c
 
 void MyFrame::OnQuit(wxCommandEvent& event)
 {
-       Close(TRUE);
+    Close(TRUE);
 }
 
 void MyFrame::OnTest1(wxCommandEvent& event)
@@ -109,8 +109,8 @@ void MyFrame::OnTest1(wxCommandEvent& event)
 }
 
 BEGIN_EVENT_TABLE(MyDialog, wxDialog)
-       EVT_BUTTON(wxID_OK, MyDialog::OnOk)
-       EVT_BUTTON(wxID_CANCEL, MyDialog::OnCancel)
+    EVT_BUTTON(wxID_OK, MyDialog::OnOk)
+    EVT_BUTTON(wxID_CANCEL, MyDialog::OnCancel)
 END_EVENT_TABLE()
 
 
index 5bc20575c2a149b56b1914b9fb906aba4fe9ccac..f82f2e1b4b8e0932d2d4a9021f4a7ee0deae0784 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
index 28c51cd7f1cfa16baa6cc8b3835cfb16d8dff04c..c93a563918eb60f231fd72d20bf240eb32092e65 100644 (file)
 
 #ifndef WX_PRECOMP
     #include "wx/wx.h"
-    #include "wx/colordlg.h"
-    #include "wx/fontdlg.h"
 #endif
 
+#include "wx/colordlg.h"
+#include "wx/fontdlg.h"
+
 #include "wx/grid.h"
 #include "wx/generic/gridctrl.h"
 
@@ -599,8 +600,8 @@ void GridFrame::DeleteSelectedRows( wxCommandEvent& WXUNUSED(ev) )
         for ( int n = 0; n < grid->GetNumberRows(); )
             if ( grid->IsInSelection( n , 0 ) )
                 grid->DeleteRows( n, 1 );
-           else
-               n++;
+        else
+            n++;
         grid->EndBatch();
     }
 }
@@ -614,8 +615,8 @@ void GridFrame::DeleteSelectedCols( wxCommandEvent& WXUNUSED(ev) )
         for ( int n = 0; n < grid->GetNumberCols(); )
             if ( grid->IsInSelection( 0 , n ) )
                 grid->DeleteCols( n, 1 );
-           else
-               n++;
+        else
+            n++;
         grid->EndBatch();
     }
 }
@@ -823,14 +824,13 @@ void GridFrame::OnEditorShown( wxGridEvent& ev )
 
     if ( (ev.GetCol() == 4) &&
          (ev.GetRow() == 0) &&
-        (wxMessageBox(_T("Are you sure you wish to edit this cell"),
-                      _T("Checking"),wxYES_NO) == wxNO ) ) {
+     (wxMessageBox(_T("Are you sure you wish to edit this cell"),
+                   _T("Checking"),wxYES_NO) == wxNO ) ) {
 
-        ev.Veto();
-        return;
+     ev.Veto();
+     return;
     }
-                     
-       
+
     wxLogMessage( wxT("Cell editor shown.") );
 
     ev.Skip();
@@ -841,11 +841,11 @@ void GridFrame::OnEditorHidden( wxGridEvent& ev )
    
     if ( (ev.GetCol() == 4) &&
          (ev.GetRow() == 0) &&
-        (wxMessageBox(_T("Are you sure you wish to finish editing this cell"),
-                      _T("Checking"),wxYES_NO) == wxNO ) ) {
+     (wxMessageBox(_T("Are you sure you wish to finish editing this cell"),
+                   _T("Checking"),wxYES_NO) == wxNO ) ) {
 
-        ev.Veto();
-        return;
+        ev.Veto();
+        return;
     }
 
     wxLogMessage( wxT("Cell editor hidden.") );
index d50c7ecd4be619430a08d5d008fa46d12c66d9ba..0eb92386294f86bc3e1b9e257e643eded5bfc192 100644 (file)
@@ -201,26 +201,26 @@ void MyFrame::OnTest(wxCommandEvent& WXUNUSED(event))
 {
     wxMessageBox("Please ensure Excel is running, then press OK.\nThe active cell should then say 'wxWindows automation test!' in bold.");
 
-       wxAutomationObject excelObject, rangeObject;
-       if (!excelObject.GetInstance("Excel.Application"))
-       {
+    wxAutomationObject excelObject, rangeObject;
+    if (!excelObject.GetInstance("Excel.Application"))
+    {
         if (!excelObject.CreateInstance("Excel.Application"))
         {
-                   wxMessageBox("Could not create Excel object.");
-                   return;
+            wxMessageBox("Could not create Excel object.");
+            return;
         }
-       }
-       if (!excelObject.PutProperty("ActiveCell.Value", "wxWindows automation test!"))
-       {
-               wxMessageBox("Could not set active cell value.");
-               return;
-       }
+    }
+    if (!excelObject.PutProperty("ActiveCell.Value", "wxWindows automation test!"))
+    {
+        wxMessageBox("Could not set active cell value.");
+        return;
+    }
 #ifdef HAVE_BOOL
-       if (!excelObject.PutProperty("ActiveCell.Font.Bold", wxVariant((bool) TRUE)) )
-       {
-               wxMessageBox("Could not put Bold property to active cell.");
-               return;
-       }
+    if (!excelObject.PutProperty("ActiveCell.Font.Bold", wxVariant((bool) TRUE)) )
+    {
+        wxMessageBox("Could not put Bold property to active cell.");
+        return;
+    }
 #endif
 }
 
index a617a4c7562dc950cd1de902c2a77cb0b65ff80d..02bf45444a8cda4a5a95715f764ec53719b1c766 100644 (file)
@@ -279,8 +279,8 @@ void TestGLCanvas::OnSize(wxSizeEvent& event)
     wxGLCanvas::OnSize(event);
 
     // set GL viewport (not called by wxGLCanvas::OnSize on all platforms...)
-               int w, h;
-               GetClientSize(&w, &h);
+    int w, h;
+    GetClientSize(&w, &h);
 #ifndef __WXMOTIF__
     if (GetContext())
 #endif
@@ -385,7 +385,7 @@ void TestGLCanvas::OnKeyDown( wxKeyEvent& event )
         Action( m_Key, m_LastTime-m_StartTime, currTime-m_StartTime );
 
 #if defined(__WXMAC__) && !defined(__DARWIN__)
-        m_LastRedraw = currTime;       // wxStopWatch() doesn't work on Mac...
+        m_LastRedraw = currTime;    // wxStopWatch() doesn't work on Mac...
 #else
         m_LastRedraw = wxStopWatch(&m_secbase) - m_gsynct;
 #endif
index be348b54275bb00c61bad33997c66e5550a9f33d..c01b89e1c3ae63c10a372a29c721e457e37e2ebc 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_CUBE_H_
index fbb0a5e75219301d6533b8bdecdde3f9fd8ae360..895c3d44e3ad623a29f98c334f73860bddde2343 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
@@ -91,8 +91,8 @@ static void read_surface( char *filename )
    numverts = 0;
    while (!feof(f) && numverts<MAXVERTS) {
       fscanf( f, "%f %f %f  %f %f %f",
-             &verts[numverts][0], &verts[numverts][1], &verts[numverts][2],
-             &norms[numverts][0], &norms[numverts][1], &norms[numverts][2] );
+          &verts[numverts][0], &verts[numverts][1], &verts[numverts][2],
+          &norms[numverts][0], &norms[numverts][1], &norms[numverts][2] );
       numverts++;
    }
    numverts--;
@@ -263,12 +263,12 @@ bool MyApp::OnInit(void)
   int *gl_attrib = NULL;
 #else
   int gl_attrib[20] = { WX_GL_RGBA, WX_GL_MIN_RED, 1, WX_GL_MIN_GREEN, 1,
-                       WX_GL_MIN_BLUE, 1, WX_GL_DEPTH_SIZE, 1,
-                       WX_GL_DOUBLEBUFFER,
+            WX_GL_MIN_BLUE, 1, WX_GL_DEPTH_SIZE, 1,
+            WX_GL_DOUBLEBUFFER,
 #  ifdef __WXMAC__
-                       GL_NONE };
+            GL_NONE };
 #  else
-                       None };
+            None };
 #  endif
 #endif
 
@@ -366,13 +366,13 @@ void TestGLCanvas::OnSize(wxSizeEvent& event)
     wxGLCanvas::OnSize(event);
     
     // set GL viewport (not called by wxGLCanvas::OnSize on all platforms...)
-               int w, h;
-               GetClientSize(&w, &h);
+    int w, h;
+    GetClientSize(&w, &h);
 #ifndef __WXMOTIF__
     if (GetContext())
 #endif
     {
-    SetCurrent();
+        SetCurrent();
         glViewport(0, 0, (GLint) w, (GLint) h);
     }
 }
@@ -381,39 +381,39 @@ void TestGLCanvas::OnChar(wxKeyEvent& event)
 {
     switch(event.KeyCode()) {
     case WXK_ESCAPE:
-       exit(0);
+    exit(0);
     case WXK_LEFT:
-       yrot -= 15.0;
-       break;
+    yrot -= 15.0;
+    break;
     case WXK_RIGHT:
-       yrot += 15.0;
-       break;
+    yrot += 15.0;
+    break;
     case WXK_UP:
-       xrot += 15.0;
-       break;
+    xrot += 15.0;
+    break;
     case WXK_DOWN:
-       xrot -= 15.0;
-       break;
+    xrot -= 15.0;
+    break;
     case 's': case 'S':
-       smooth = !smooth;
-       if (smooth) {
-           glShadeModel(GL_SMOOTH);
-       } else {
-           glShadeModel(GL_FLAT);
-       }
-       break;
+    smooth = !smooth;
+    if (smooth) {
+        glShadeModel(GL_SMOOTH);
+    } else {
+        glShadeModel(GL_FLAT);
+    }
+    break;
     case 'l': case 'L':
-       lighting = !lighting;
-       if (lighting) {
-           glEnable(GL_LIGHTING);
-       } else {
-           glDisable(GL_LIGHTING);
-       }
-       break;
+    lighting = !lighting;
+    if (lighting) {
+        glEnable(GL_LIGHTING);
+    } else {
+        glDisable(GL_LIGHTING);
+    }
+    break;
      default:
       {
         event.Skip();
-       return;
+    return;
       }
     }
 
@@ -427,17 +427,17 @@ void TestGLCanvas::OnMouseEvent(wxMouseEvent& event)
 
     //printf("%f %f %d\n", event.GetX(), event.GetY(), (int)event.LeftIsDown());
     if(event.LeftIsDown()) {
-       if(!dragging) {
-           dragging = 1;
-       } else {
-           yrot += (event.GetX() - last_x)*1.0;
-           xrot += (event.GetY() - last_y)*1.0;
-           Refresh(FALSE);
-       }
-       last_x = event.GetX();
-       last_y = event.GetY();
+    if(!dragging) {
+        dragging = 1;
+    } else {
+        yrot += (event.GetX() - last_x)*1.0;
+        xrot += (event.GetY() - last_y)*1.0;
+        Refresh(FALSE);
+    }
+    last_x = event.GetX();
+    last_y = event.GetY();
     } else
-       dragging = 0;
+    dragging = 0;
 }
 
 void TestGLCanvas::OnEraseBackground(wxEraseEvent& event)
index e84098c56b33a0c25f282322128464ca76e26257..e404def144b2da70b33e6e8fc17c1f719efb1da8 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_ISOSURF_H_
index 487359bbba208bf5da91161e98deb3b6d29f7ebd..7d83324bbd8d5e05d852b603df2d00cf2b884711 100644 (file)
@@ -45,9 +45,9 @@
 #endif
 
 #define MK_ID(a,b,c,d) ((((wxUint32)(a))<<24)| \
-                       (((wxUint32)(b))<<16)| \
-                       (((wxUint32)(c))<< 8)| \
-                       (((wxUint32)(d))    ))
+            (((wxUint32)(b))<<16)| \
+            (((wxUint32)(c))<< 8)| \
+            (((wxUint32)(d))    ))
 
 #define ID_FORM MK_ID('F','O','R','M')
 #define ID_LWOB MK_ID('L','W','O','B')
@@ -212,9 +212,9 @@ static void read_pols(FILE *f, int nbytes, lwObject *lwo)
       det_cnt = read_short(f);
       nbytes -= 2;
       while (det_cnt-- > 0) {
-       int cnt = read_short(f);
-       fseek(f, cnt*2+2, SEEK_CUR);
-       nbytes -= cnt*2+2;
+    int cnt = read_short(f);
+    fseek(f, cnt*2+2, SEEK_CUR);
+    nbytes -= cnt*2+2;
       }
     }
     face->material -= 1;
@@ -380,13 +380,13 @@ void lw_object_show(const lwObject *lw_object)
       prev_index_cnt = face->index_cnt;
       switch (face->index_cnt) {
       case 3:
-       glBegin(GL_TRIANGLES);
-       break;
+    glBegin(GL_TRIANGLES);
+    break;
       case 4:
-       glBegin(GL_QUADS);
-       break;
+    glBegin(GL_QUADS);
+    break;
       default:
-       glBegin(GL_POLYGON);
+    glBegin(GL_POLYGON);
       }
     }
 
@@ -394,8 +394,8 @@ void lw_object_show(const lwObject *lw_object)
     if (prev_material != face->material) {
       prev_material = face->material;
       glColor3f(lw_object->material[face->material].r,
-               lw_object->material[face->material].g,
-               lw_object->material[face->material].b);
+        lw_object->material[face->material].g,
+        lw_object->material[face->material].b);
     }
 
     /* update normal if necessary */
index 1b09d9530ca8b1302c14d562088558a0f7b772cc..12a70d4de1de8bd1ddd688e1a7c60e514b55cef3 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Robert Roebling
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
@@ -159,8 +159,8 @@ void TestGLCanvas::OnSize(wxSizeEvent& event)
     wxGLCanvas::OnSize(event);
     
     // set GL viewport (not called by wxGLCanvas::OnSize on all platforms...)
-               int w, h;
-               GetClientSize(&w, &h);
+    int w, h;
+    GetClientSize(&w, &h);
 #ifndef __WXMOTIF__
     if (GetContext())
 #endif
@@ -203,17 +203,17 @@ void TestGLCanvas::OnMouse( wxMouseEvent& event )
         /* drag in progress, simulate trackball */
         float spin_quat[4];
         trackball(spin_quat,
-             (2.0*info.beginx -       sz.x) / sz.x,
-             (     sz.y - 2.0*info.beginy) / sz.y,
-             (     2.0*event.GetX() - sz.x) / sz.x,
-             (    sz.y - 2.0*event.GetY()) / sz.y);
-             
+          (2.0*info.beginx -       sz.x) / sz.x,
+          (     sz.y - 2.0*info.beginy) / sz.y,
+          (     2.0*event.GetX() - sz.x) / sz.x,
+          (    sz.y - 2.0*event.GetY()) / sz.y);
+          
         add_quats( spin_quat, info.quat, info.quat );
-       
+
         /* orientation has changed, redraw mesh */
-       Refresh(FALSE);
+    Refresh(FALSE);
     }
-    
+
     info.beginx = event.GetX();
     info.beginy = event.GetY();
 }
index 5c71de8ed711b0e6ae67631eea20bdb69734eae3..a8e8550e65c06d233516f98c802f0006996009ea 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Robert Roebling
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_PENGUIN_H_
index 0d88f11699226c48808d27b709e503b60085f0a7..186d3c90ac752fb56b46f8b81388c82c692307da 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
@@ -87,6 +87,16 @@ MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, cons
   canvas = (MyCanvas *) NULL;
 }
 
+// frame destructor
+MyFrame::~MyFrame()
+{
+    if (g_TestBitmap)
+    {
+        delete g_TestBitmap;
+        g_TestBitmap = (wxBitmap *) NULL;
+    }
+}
+
 void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
 {
     Close(TRUE);
@@ -128,16 +138,17 @@ void MyFrame::OnSaveFile(wxCommandEvent& WXUNUSED(event))
 
 void MyFrame::OnLoadFile(wxCommandEvent& WXUNUSED(event))
 {
-       // Show file selector.
-       wxString f = wxFileSelector(wxT("Open Image"), (const wxChar *) NULL,
+    // Show file selector.
+    wxString f = wxFileSelector(wxT("Open Image"), (const wxChar *) NULL,
                                     (const wxChar *) NULL, wxT("png"),
                                     wxT("PNG files (*.png)|*.png"));
 
-       if (f == "")
-         return;
+    if (f == "")
+        return;
 
     if ( g_TestBitmap )
         delete g_TestBitmap;
+
     g_TestBitmap = new wxBitmap(f, wxBITMAP_TYPE_PNG);
     if (!g_TestBitmap->Ok())
     {
index e250aa69d281733576b9ff85ceaa7e539c136450..c664e1a14566298347f030f97922674460260256 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     01/02/97
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
@@ -31,6 +31,7 @@ class MyFrame: public wxFrame
   public:
     MyCanvas *canvas;
     MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size);
+    virtual ~MyFrame();
 
     void OnActivate(bool) {}
     void OnLoadFile(wxCommandEvent& event);
index af8c22b74e377bfe491f45a195ab99fa08f90834..b64a165092fc0a8c0f555b442743ea62b838b8f2 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
@@ -152,214 +152,219 @@ void MyApp::RegisterValidators(void)
 
 void MyApp::PropertyListTest(bool useDialog)
 {
-  if (m_childWindow)
-    return;
-
-  wxPropertySheet *sheet = new wxPropertySheet;
-
-  sheet->AddProperty(new wxProperty("fred", 1.0, "real"));
-  sheet->AddProperty(new wxProperty("tough choice", (bool)TRUE, "bool"));
-  sheet->AddProperty(new wxProperty("ian", (long)45, "integer", new wxIntegerListValidator(-50, 50)));
-  sheet->AddProperty(new wxProperty("bill", 25.0, "real", new wxRealListValidator(0.0, 100.0)));
-  sheet->AddProperty(new wxProperty("julian", "one", "string"));
-  sheet->AddProperty(new wxProperty("bitmap", "none", "string", new wxFilenameListValidator("Select a bitmap file", "*.bmp")));
-  wxStringList *strings = new wxStringList(wxT("one"), wxT("two"), wxT("three"), NULL);
-  sheet->AddProperty(new wxProperty("constrained", "one", "string", new wxStringListValidator(strings)));
-
-  wxStringList *strings2 = new wxStringList(wxT("earth"), wxT("fire"), wxT("wind"), wxT("water"), NULL);
-  sheet->AddProperty(new wxProperty("string list", strings2, "stringlist"));
-
-  wxPropertyListView *view =
-    new wxPropertyListView(NULL,
-     wxPROP_BUTTON_OK | wxPROP_BUTTON_CANCEL |
-     wxPROP_BUTTON_CHECK_CROSS|wxPROP_DYNAMIC_VALUE_FIELD|wxPROP_PULLDOWN|wxPROP_SHOWVALUES);
-
-  wxDialog *propDialog = NULL;
-  wxPropertyListFrame *propFrame = NULL;
-  if (useDialog)
-  {
-    propDialog = new PropListDialog(view, NULL, "Property Sheet Test",
-               wxPoint(-1, -1), wxSize(400, 500), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODELESS);
-    m_childWindow = propDialog;
-  }
-  else
-  {
-    propFrame = new PropListFrame(view, NULL, "Property Sheet Test", wxPoint(-1, -1), wxSize(400, 500));
-    m_childWindow = propFrame;
-  }
-  
-  view->AddRegistry(&myListValidatorRegistry);
-
-  if (useDialog)
-  {
-    view->ShowView(sheet, (wxPanel *)propDialog);
-    propDialog->Centre(wxBOTH);
-    propDialog->Show(TRUE);
-  }
-  else
-  {
-    propFrame->Initialize();
-    view->ShowView(sheet, propFrame->GetPropertyPanel());
-
-    propFrame->Centre(wxBOTH);
-    propFrame->Show(TRUE);
-  }
+    if (m_childWindow)
+        return;
+
+    wxPropertySheet *sheet = new wxPropertySheet;
+
+    sheet->AddProperty(new wxProperty("fred", 1.0, "real"));
+    sheet->AddProperty(new wxProperty("tough choice", (bool)TRUE, "bool"));
+    sheet->AddProperty(new wxProperty("ian", (long)45, "integer", new wxIntegerListValidator(-50, 50)));
+    sheet->AddProperty(new wxProperty("bill", 25.0, "real", new wxRealListValidator(0.0, 100.0)));
+    sheet->AddProperty(new wxProperty("julian", "one", "string"));
+    sheet->AddProperty(new wxProperty("bitmap", "none", "string", new wxFilenameListValidator("Select a bitmap file", "*.bmp")));
+    wxStringList *strings = new wxStringList(wxT("one"), wxT("two"), wxT("three"), NULL);
+    sheet->AddProperty(new wxProperty("constrained", "one", "string", new wxStringListValidator(strings)));
+
+    wxStringList *strings2 = new wxStringList(wxT("earth"), wxT("fire"), wxT("wind"), wxT("water"), NULL);
+    sheet->AddProperty(new wxProperty("string list", strings2, "stringlist"));
+
+    wxPropertyListView *view = new wxPropertyListView
+        (
+            NULL,
+            wxPROP_BUTTON_OK | wxPROP_BUTTON_CANCEL | wxPROP_BUTTON_CHECK_CROSS
+            |wxPROP_DYNAMIC_VALUE_FIELD|wxPROP_PULLDOWN|wxPROP_SHOWVALUES
+        );
+
+    wxDialog *propDialog = NULL;
+    wxPropertyListFrame *propFrame = NULL;
+    if (useDialog)
+    {
+        propDialog = new PropListDialog(view, NULL, "Property Sheet Test",
+        wxPoint(-1, -1), wxSize(400, 500), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODELESS);
+        m_childWindow = propDialog;
+    }
+    else
+    {
+        propFrame = new PropListFrame(view, NULL, "Property Sheet Test", wxPoint(-1, -1), wxSize(400, 500));
+        m_childWindow = propFrame;
+    }
+
+    view->AddRegistry(&myListValidatorRegistry);
+
+    if (useDialog)
+    {
+        view->ShowView(sheet, (wxPanel *)propDialog);
+        propDialog->Centre(wxBOTH);
+        propDialog->Show(TRUE);
+    }
+    else
+    {
+        propFrame->Initialize();
+        view->ShowView(sheet, propFrame->GetPropertyPanel());
+
+        propFrame->Centre(wxBOTH);
+        propFrame->Show(TRUE);
+    }
 }
 
 void MyApp::PropertyFormTest(bool useDialog)
 {
-  if (m_childWindow)
-    return;
-
-  wxPropertySheet *sheet = new wxPropertySheet;
-
-  sheet->AddProperty(new wxProperty("fred", 25.0, "real", new wxRealFormValidator(0.0, 100.0)));
-  sheet->AddProperty(new wxProperty("tough choice", (bool)TRUE, "bool"));
-  sheet->AddProperty(new wxProperty("ian", (long)45, "integer", new wxIntegerFormValidator(-50, 50)));
-  sheet->AddProperty(new wxProperty("julian", "one", "string"));
-  wxStringList *strings = new wxStringList(wxT("one"), wxT("two"), wxT("three"), NULL);
-  sheet->AddProperty(new wxProperty("constrained", "one", "string", new wxStringFormValidator(strings)));
-
-  wxPropertyFormView *view = new wxPropertyFormView(NULL);
-
-  wxDialog *propDialog = NULL;
-  wxPropertyFormFrame *propFrame = NULL;
-  if (useDialog)
-  {
-    propDialog = new PropFormDialog(view, NULL, "Property Form Test",
-         wxPoint(-1, -1), wxSize(380, 250), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL);
-    m_childWindow = propDialog;
-  }
-  else
-  {
-    propFrame = new PropFormFrame(view, NULL, "Property Form Test", wxPoint(-1,
-         -1), wxSize(380, 250));
-    propFrame->Initialize();
-    m_childWindow = propFrame;
-  }
-
-  // BCC32 does not like ?:
-  wxWindow *panel ;
-  if ( propDialog )
-  {
-    panel = propDialog ;
-  }
-  else
-  {
-    panel = propFrame->GetPropertyPanel() ;
-  }
-    
-  wxLayoutConstraints* c;
+    if (m_childWindow)
+        return;
+
+    wxPropertySheet *sheet = new wxPropertySheet;
+
+    sheet->AddProperty(new wxProperty("fred", 25.0, "real", new wxRealFormValidator(0.0, 100.0)));
+    sheet->AddProperty(new wxProperty("tough choice", (bool)TRUE, "bool"));
+    sheet->AddProperty(new wxProperty("ian", (long)45, "integer", new wxIntegerFormValidator(-50, 50)));
+    sheet->AddProperty(new wxProperty("julian", "one", "string"));
+    wxStringList *strings = new wxStringList(wxT("one"), wxT("two"), wxT("three"), NULL);
+    sheet->AddProperty(new wxProperty("constrained", "one", "string", new wxStringFormValidator(strings)));
+
+    wxPropertyFormView *view = new wxPropertyFormView(NULL);
+
+    wxDialog *propDialog = NULL;
+    wxPropertyFormFrame *propFrame = NULL;
+
+    if (useDialog)
+    {
+        propDialog = new PropFormDialog(view, NULL, "Property Form Test",
+        wxPoint(-1, -1), wxSize(380, 250), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL);
+        m_childWindow = propDialog;
+    }
+    else
+    {
+        propFrame = new PropFormFrame(view, NULL, "Property Form Test",
+            wxPoint(-1, -1), wxSize(380, 250));
+        propFrame->Initialize();
+        m_childWindow = propFrame;
+    }
+
+    // BCC32 does not like ?:
+    wxWindow *panel ;
+    if ( propDialog )
+    {
+        panel = propDialog;
+    }
+    else
+    {
+        panel = propFrame->GetPropertyPanel() ;
+    }
+
+    wxLayoutConstraints* c;
 
 #if 0
-  if (!propDialog)
-  {
-    c = new wxLayoutConstraints;
-    c->left.SameAs(m_childWindow, wxLeft, 4);
-    c->right.SameAs(m_childWindow, wxRight, 4);
-    c->top.SameAs(m_childWindow, wxTop, 4);
-    c->bottom.SameAs(m_childWindow, wxBottom, 40);
+    if (!propDialog)
+    {
+        c = new wxLayoutConstraints;
+        c->left.SameAs(m_childWindow, wxLeft, 4);
+        c->right.SameAs(m_childWindow, wxRight, 4);
+        c->top.SameAs(m_childWindow, wxTop, 4);
+        c->bottom.SameAs(m_childWindow, wxBottom, 40);
 
-    panel->SetConstraints(c);
-  }
+        panel->SetConstraints(c);
+    }
 #endif
  
-  // Add items to the panel
-  wxButton *okButton = new wxButton(panel, wxID_OK, "OK", wxPoint(-1, -1),
-    wxSize(80, 26), 0, wxDefaultValidator, "ok");
-  wxButton *cancelButton = new wxButton(panel, wxID_CANCEL, "Cancel",  wxPoint(-1, -1),
-    wxSize(80, 26), 0, wxDefaultValidator, "cancel");
-  wxButton *updateButton = new wxButton(panel, wxID_PROP_UPDATE, "Update",  wxPoint(-1, -1),
-    wxSize(80, 26), 0, wxDefaultValidator, "update");
-  wxButton *revertButton = new wxButton(panel, wxID_PROP_REVERT, "Revert",  wxPoint(-1, -1),
-    wxSize(80, 26), 0, wxDefaultValidator, "revert");
-
-  c = new wxLayoutConstraints;
-  c->right.SameAs(panel, wxRight, 4);
-  c->bottom.SameAs(panel, wxBottom, 4);
-  c->height.AsIs();
-  c->width.AsIs();
-  revertButton->SetConstraints(c);
-  c = new wxLayoutConstraints;
-  c->right.SameAs(revertButton, wxLeft, 4);
-  c->bottom.SameAs(panel, wxBottom, 4);
-  c->height.AsIs();
-  c->width.AsIs();
-  updateButton->SetConstraints(c);
-
-  c = new wxLayoutConstraints;
-  c->right.SameAs(updateButton, wxLeft, 4);
-  c->bottom.SameAs(panel, wxBottom, 4);
-  c->height.AsIs();
-  c->width.AsIs();
-  cancelButton->SetConstraints(c);
-
-  c = new wxLayoutConstraints;
-  c->right.SameAs(cancelButton, wxLeft, 4);
-  c->bottom.SameAs(panel, wxBottom, 4);
-  c->height.AsIs();
-  c->width.AsIs();
-  okButton->SetConstraints(c);
-
-  // The name of this text item matches the "fred" property
-  wxTextCtrl *text = new wxTextCtrl(panel, -1, "Fred", wxPoint(-1, -1), wxSize(
+    // Add items to the panel
+    wxButton *okButton = new wxButton(panel, wxID_OK, "OK", wxPoint(-1, -1),
+        wxSize(80, 26), 0, wxDefaultValidator, "ok");
+    wxButton *cancelButton = new wxButton(panel, wxID_CANCEL, "Cancel",  wxPoint(-1, -1),
+        wxSize(80, 26), 0, wxDefaultValidator, "cancel");
+    wxButton *updateButton = new wxButton(panel, wxID_PROP_UPDATE, "Update",  wxPoint(-1, -1),
+        wxSize(80, 26), 0, wxDefaultValidator, "update");
+    wxButton *revertButton = new wxButton(panel, wxID_PROP_REVERT, "Revert",  wxPoint(-1, -1),
+        wxSize(80, 26), 0, wxDefaultValidator, "revert");
+
+    c = new wxLayoutConstraints;
+    c->right.SameAs(panel, wxRight, 4);
+    c->bottom.SameAs(panel, wxBottom, 4);
+    c->height.AsIs();
+    c->width.AsIs();
+    revertButton->SetConstraints(c);
+
+    c = new wxLayoutConstraints;
+    c->right.SameAs(revertButton, wxLeft, 4);
+    c->bottom.SameAs(panel, wxBottom, 4);
+    c->height.AsIs();
+    c->width.AsIs();
+    updateButton->SetConstraints(c);
+
+    c = new wxLayoutConstraints;
+    c->right.SameAs(updateButton, wxLeft, 4);
+    c->bottom.SameAs(panel, wxBottom, 4);
+    c->height.AsIs();
+    c->width.AsIs();
+    cancelButton->SetConstraints(c);
+
+    c = new wxLayoutConstraints;
+    c->right.SameAs(cancelButton, wxLeft, 4);
+    c->bottom.SameAs(panel, wxBottom, 4);
+    c->height.AsIs();
+    c->width.AsIs();
+    okButton->SetConstraints(c);
+
+    // The name of this text item matches the "fred" property
+    wxTextCtrl *text = new wxTextCtrl(panel, -1, "Fred", wxPoint(-1, -1), wxSize(
     200, -1), 0, wxDefaultValidator, "fred");
-  
-  c = new wxLayoutConstraints;
-  c->left.SameAs(panel, wxLeft, 4);
-  c->top.SameAs(panel, wxTop, 4);
-  c->height.AsIs();
-  c->width.AsIs();
-  text->SetConstraints(c);
-
-  wxCheckBox *checkBox = new wxCheckBox(panel, -1, "Yes or no", wxPoint(-1, -1),
-    wxSize(-1, -1), 0, wxDefaultValidator, "tough choice");
-
-  c = new wxLayoutConstraints;
-  c->left.SameAs(text, wxRight, 20);
-  c->top.SameAs(panel, wxTop, 4);
-  c->height.AsIs();
-  c->width.AsIs();
-  checkBox->SetConstraints(c);
-  
+
+    c = new wxLayoutConstraints;
+    c->left.SameAs(panel, wxLeft, 4);
+    c->top.SameAs(panel, wxTop, 4);
+    c->height.AsIs();
+    c->width.AsIs();
+    text->SetConstraints(c);
+
+    wxCheckBox *checkBox = new wxCheckBox(panel, -1, "Yes or no", wxPoint(-1, -1),
+        wxSize(-1, -1), 0, wxDefaultValidator, "tough choice");
+
+    c = new wxLayoutConstraints;
+    c->left.SameAs(text, wxRight, 20);
+    c->top.SameAs(panel, wxTop, 4);
+    c->height.AsIs();
+    c->width.AsIs();
+    checkBox->SetConstraints(c);
+
   wxSlider *slider = new wxSlider(panel, -1, -50, 50, 150, wxPoint(-1, -1),
     wxSize(200,10), 0, wxDefaultValidator, "ian");
 
-  c = new wxLayoutConstraints;
-  c->left.SameAs(panel, wxLeft, 4);
-  c->top.SameAs(text, wxBottom, 10);
-  c->height.AsIs();
-  c->width.AsIs();
-  slider->SetConstraints(c);
-
-  wxListBox *listBox = new wxListBox(panel, -1, wxPoint(-1, -1), wxSize(200, 100),
-    0, NULL, 0, wxDefaultValidator, "constrained");
-
-  c = new wxLayoutConstraints;
-  c->left.SameAs(panel, wxLeft, 4);
-  c->top.SameAs(slider, wxBottom, 10);
-  c->height.AsIs();
-  c->width.AsIs();
-  listBox->SetConstraints(c);
-
-  view->AddRegistry(&myFormValidatorRegistry);
-
-  panel->SetAutoLayout(TRUE);
-
-  view->ShowView(sheet, panel);
-  view->AssociateNames();
-  view->TransferToDialog();
-
-  if (useDialog) {
-    propDialog->Layout();
-    propDialog->Centre(wxBOTH);
-    propDialog->Show(TRUE);
-  } else {
-    // panel->Layout();
-    propFrame->Centre(wxBOTH);
-    propFrame->Show(TRUE);
-  }
+    c = new wxLayoutConstraints;
+    c->left.SameAs(panel, wxLeft, 4);
+    c->top.SameAs(text, wxBottom, 10);
+    c->height.AsIs();
+    c->width.AsIs();
+    slider->SetConstraints(c);
+
+    wxListBox *listBox = new wxListBox(panel, -1, wxPoint(-1, -1),
+        wxSize(200, 100), 0, NULL, 0, wxDefaultValidator, "constrained");
+
+    c = new wxLayoutConstraints;
+    c->left.SameAs(panel, wxLeft, 4);
+    c->top.SameAs(slider, wxBottom, 10);
+    c->height.AsIs();
+    c->width.AsIs();
+    listBox->SetConstraints(c);
+
+    view->AddRegistry(&myFormValidatorRegistry);
+
+    panel->SetAutoLayout(TRUE);
+
+    view->ShowView(sheet, panel);
+    view->AssociateNames();
+    view->TransferToDialog();
+
+    if (useDialog) {
+        propDialog->Layout();
+        propDialog->Centre(wxBOTH);
+        propDialog->Show(TRUE);
+    }
+    else
+    {
+        // panel->Layout();
+        propFrame->Centre(wxBOTH);
+        propFrame->Show(TRUE);
+    }
 }
 
 BEGIN_EVENT_TABLE(PropListFrame, wxPropertyListFrame)
index deabd5c5fd079923d2eb2851f8bb023e0e3c1fa7..eb50e3f8158839118e2de007fa55f0c7a43a27b7 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
index ab0405be9bfeb7b407b047b4685903ea08e44e9b..807c387fa13dcb1e93be5b2f2e834428e3535b86 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
@@ -120,7 +120,7 @@ MyApp::~MyApp()
 }
 
 BEGIN_EVENT_TABLE(MyPanel, wxPanel)
-       EVT_LEFT_DOWN( MyPanel::OnClick)
+    EVT_LEFT_DOWN( MyPanel::OnClick)
 END_EVENT_TABLE()
 
 MyPanel::MyPanel( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, 
@@ -138,9 +138,9 @@ void MyPanel::OnClick( wxMouseEvent &WXUNUSED(event2) )
 
 
 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
-       EVT_MENU(RESOURCE_ABOUT, MyFrame::OnAbout)
-       EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit)
-       EVT_MENU(RESOURCE_TESTDIALOG, MyFrame::OnTestDialog)
+    EVT_MENU(RESOURCE_ABOUT, MyFrame::OnAbout)
+    EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit)
+    EVT_MENU(RESOURCE_TESTDIALOG, MyFrame::OnTestDialog)
 END_EVENT_TABLE()
 
 // Define my frame constructor
@@ -159,7 +159,7 @@ void MyFrame::OnAbout( wxCommandEvent& WXUNUSED(event) )
 
 void MyFrame::OnQuit( wxCommandEvent& WXUNUSED(event) )
 {
-       Close(TRUE);
+    Close(TRUE);
 }
 
 void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event) )
@@ -176,8 +176,8 @@ void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event) )
 }
 
 BEGIN_EVENT_TABLE(MyDialog, wxDialog)
-  //   EVT_BUTTON(RESOURCE_OK, MyDialog::OnOk)
-       EVT_BUTTON(ID_BUTTON109, MyDialog::OnCancel)
+    //EVT_BUTTON(RESOURCE_OK, MyDialog::OnOk)
+    EVT_BUTTON(ID_BUTTON109, MyDialog::OnCancel)
 END_EVENT_TABLE()
 
 
index 5975b871c73e5daaa1947ed3d51f882c7fbca749..5ffccc779d6ed2f3a35af0f299562b26d655fe5f 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
index ac23b0a0c6d00c88e5f3dec2dcb8fe7a73e97d42..69d3efb6e91e1e75b1567837975937664594edf1 100644 (file)
@@ -831,7 +831,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "treectrl"=.\treectrl\treectrl.dsp - Package Owner=<4>
+Project: "treetest"=.\treectrl\treetest.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
index 5cfc8bda7ce45370b7ff76af8fbeddb1a535666d..f59fae02a05873d0476903c41f2bdffb638eb4c8 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 // For compilers that support precompilation, includes "wx/wx.h".
@@ -94,7 +94,7 @@ END_EVENT_TABLE()
 
 // Define my frame constructor
 MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size,
-       const long style):
+    const long style):
   wxMDIParentFrame(parent, id, title, pos, size, style)
 {
   // Create some dummy layout windows
@@ -273,7 +273,7 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event))
 }
 
 BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
-       EVT_MOUSE_EVENTS(MyCanvas::OnEvent)
+    EVT_MOUSE_EVENTS(MyCanvas::OnEvent)
 END_EVENT_TABLE()
 
 // Define a constructor for my canvas
index 02ff483b54323fa12de0cc4248a8b17179c9a3d5..11c644f8a98d3e8529087db39e9885680873ea15 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #include "wx/toolbar.h"
index c7ce613e4ef8505047bbe6666c20aafec5929413..3d16d9e91dab40aac2b02f1ccb51e2623d049a8c 100644 (file)
@@ -306,12 +306,12 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
         (0-scroll_x < size_x) && (0-scroll_y < size_y))
     {
         // Has the region on screen been exposed?
-           if (IsExposed(0,0,100,25))
-           {
-               wxLogMessage( wxT("Redraw first cell") );
+        if (IsExposed(0,0,100,25))
+        {
+            wxLogMessage( wxT("Redraw first cell") );
             dc.DrawRectangle( 0, 0, 100, 25 );
-               dc.DrawText( "First Cell", 5, 5 );
-           }
+            dc.DrawText( "First Cell", 5, 5 );
+        }
     }
 
 
@@ -321,12 +321,12 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
         (200-scroll_x < size_x) && (0-scroll_y < size_y))
     {
         // Has the region on screen been exposed?
-           if (IsExposed(200,0,100,25))
-           {
-               wxLogMessage( wxT("Redraw second cell") );
+        if (IsExposed(200,0,100,25))
+        {
+            wxLogMessage( wxT("Redraw second cell") );
             dc.DrawRectangle( 200, 0, 100, 25 );
-               dc.DrawText( "Second Cell", 205, 5 );
-           }
+            dc.DrawText( "Second Cell", 205, 5 );
+        }
     }
 
 }
index 436c6dd44ec69bba7a3e1232b0662af0406e2f60..2b9924d343edfc62d913e9bcb294c138d33db803 100644 (file)
@@ -413,7 +413,7 @@ void MyFrame::OnSetStatusFields(wxCommandEvent& WXUNUSED(event))
 
 void MyFrame::OnUpdateStatusBarToggle(wxUpdateUIEvent& event)
 {
-       event.Check(GetStatusBar() != 0);
+    event.Check(GetStatusBar() != 0);
 }
 
 void MyFrame::OnStatusBarToggle(wxCommandEvent& WXUNUSED(event))
index c581ac1760d25889b79a797d9ef658a737437459..055ebf099dd812ba6797478660d359c1d3572c0d 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     01/02/97
 // RCS-ID:      $Id$
 // Copyright:   (c)
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // For compilers that support precompilation, includes "wx.h".
index 0763ffe8b4d31f8cec0af84c51b8f3456477b7d5..8fcadf7b9953e1f3d8e81be7cb1b056d78c0f50d 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     01/02/97
 // RCS-ID:      $Id$
 // Copyright:   (c)
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Define a new application
index 2fcadd54c41c9646da75b079ad30ada7ef43af40..eab3c3f1ab5e294a44d9ae4861d8127a8005cdb3 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     01/02/97
 // RCS-ID:      $Id$
 // Copyright:   (c)
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // For compilers that support precompilation, includes "wx.h".
index 454e66ef23836e393b4af548456b62ccc71c32b6..64e141f546464b1afd7ad2f5be17cab3067ab73f 100644 (file)
@@ -6,13 +6,13 @@
 // Created:     01/02/97
 // RCS-ID:      $Id$
 // Copyright:   (c)
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 class MyTaskBarIcon: public wxTaskBarIcon
 {
 public:
-       MyTaskBarIcon() {};
+    MyTaskBarIcon() {};
 
     virtual void OnMouseMove(wxEvent&);
     virtual void OnLButtonDown(wxEvent&);
index 02e00da18c5494f659ba5ea0f43ede5b92aaaaa8..41d2671a9c8de7ca5b2b5348a02bc822a5fc601f 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "treelay.h"
 
-wxTreeLayoutStored *myTree = NULL;
+wxTreeLayoutStored *myTree = (wxTreeLayoutStored *) NULL;
 
 // A macro needed for some compilers (AIX) that need 'main' to be defined
 // in the application itself.
@@ -85,6 +85,17 @@ bool MyApp::OnInit()
   return TRUE;
 }
 
+int MyApp::OnExit()
+{
+    if (myTree)
+    {
+        delete myTree;
+        myTree = (wxTreeLayoutStored *) NULL;
+    }
+
+    return 0;
+}
+
 void MyApp::TreeTest(wxTreeLayoutStored& tree, wxDC& dc)
 {
   tree.Initialize(200);
index d920ecc1beecf0b95179bc8904f746b7ec5dcfd7..2b1a29236897bb953b3b6e4dd2744b4b0aefa675 100644 (file)
@@ -12,8 +12,9 @@
 // Define a new application
 class MyApp: public wxApp
 {
-  public:
-    bool OnInit();
+public:
+    virtual bool OnInit();
+    virtual int OnExit();
     void TreeTest(wxTreeLayoutStored& tree, wxDC& dc);
 };
 
index 98ee15d0963f5ec8679b3466945f413e2495508c..75e68a09bbbcb2bc080de2ce29aaacdab74222f2 100644 (file)
@@ -436,7 +436,7 @@ void MyApp::DoStreamDemo3(wxCommandEvent& WXUNUSED(event))
             case wxSTREAM_READ_ERROR:   textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break;
             case wxSTREAM_WRITE_ERROR:  textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break;
             default: textCtrl.WriteText( "Huh?\n" ); break;
-           }
+        }
     }
     textCtrl.WriteText( "\n" );
     
index b4a4ecc9610e6d6e6dc8dc6e64d81451a280bfd6..e79c7e7d894e3a2af5d422ecb6d348938b6aac63 100644 (file)
@@ -457,7 +457,7 @@ void ComboboxWidgetsPage::OnUpdateUIDeleteButton(wxUpdateUIEvent& event)
     {
       unsigned long n;
       event.Enable(m_textDelete->GetValue().ToULong(&n) &&
-                (n < (unsigned)m_combobox->GetCount()));
+        (n < (unsigned)m_combobox->GetCount()));
     }
 }
 
@@ -482,8 +482,8 @@ void ComboboxWidgetsPage::OnUpdateUIAddSeveral(wxUpdateUIEvent& event)
 void ComboboxWidgetsPage::OnComboText(wxCommandEvent& event)
 {
     if (!m_combobox)
-       return;
-    
+        return;
+
     wxString s = event.GetString();
 
     wxASSERT_MSG( s == m_combobox->GetValue(),
index f4586a11d80e14516e28749b9dffdc9acf7ad2d9..50e1a1ce22e68d37d3cb5db1fa983dee21eecbea 100644 (file)
@@ -303,9 +303,9 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
 void MyFrame::OnRunWizard(wxCommandEvent& WXUNUSED(event))
 {
     wxWizard *wizard = new wxWizard(this, -1,
-                                       "Absolutely Useless Wizard",
-                                       wxBITMAP(wiztest));
-    
+                    "Absolutely Useless Wizard",
+                    wxBITMAP(wiztest));
+
     // a wizard page may be either an object of predefined class
     wxWizardPageSimple *page1 = new wxWizardPageSimple(wizard);
     wxStaticText *text = new wxStaticText(page1, -1,