]> git.saurik.com Git - wxWidgets.git/commitdiff
-1->wxID_ANY, TRUE->true, FALSE->false and tabs replacements
authorWłodzimierz Skiba <abx@abx.art.pl>
Tue, 1 Jun 2004 18:27:09 +0000 (18:27 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Tue, 1 Jun 2004 18:27:09 +0000 (18:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

demos/dbbrowse/browsedb.cpp
demos/dbbrowse/dbbrowse.cpp
demos/dbbrowse/dbgrid.cpp
demos/dbbrowse/dbtree.cpp
demos/dbbrowse/dlguser.cpp
demos/dbbrowse/doc.cpp
demos/dbbrowse/doc.h
demos/dbbrowse/pgmctrl.cpp
demos/dbbrowse/std.h
demos/dbbrowse/tabpgwin.cpp
demos/dbbrowse/tabpgwin.h

index f5ee9c86f6f07348dcec31af465ddfd12ef895ec..b616eff639ec49beabcd7bbdc7506d40861d301f 100644 (file)
@@ -102,9 +102,9 @@ bool BrowserDB::Initialize(int Quiet)
     if (!OnStartDB(Quiet))
     {
         wxLogMessage(_("\n\n-E-> BrowserDB::OnStartDB(%s) : Failed ! "),ODBCSource.c_str());
     if (!OnStartDB(Quiet))
     {
         wxLogMessage(_("\n\n-E-> BrowserDB::OnStartDB(%s) : Failed ! "),ODBCSource.c_str());
-        return FALSE;
+        return false;
     }
     }
-    return TRUE;
+    return true;
 }  // BrowserDB:Initialize
 
 //----------------------------------------------------------------------------------------
 }  // BrowserDB:Initialize
 
 //----------------------------------------------------------------------------------------
@@ -117,7 +117,7 @@ bool BrowserDB::OnStartDB(int Quiet)
     {
         if (!Quiet)
             wxLogMessage(_("\n-I-> BrowserDB::OnStartDB() : DB is already open."));
     {
         if (!Quiet)
             wxLogMessage(_("\n-I-> BrowserDB::OnStartDB() : DB is already open."));
-        return TRUE;
+        return true;
     }
 
     DbConnectInf.AllocHenv();
     }
 
     DbConnectInf.AllocHenv();
@@ -133,14 +133,14 @@ bool BrowserDB::OnStartDB(int Quiet)
     p_Dlg->OnInit();
     p_Dlg->Fit();
     
     p_Dlg->OnInit();
     p_Dlg->Fit();
     
-    bool OK = FALSE;
+    bool OK = false;
     if (p_Dlg->ShowModal() == wxID_OK)
     {
         (pDoc->p_DSN+i_Which)->Usr = p_Dlg->s_User;
         (pDoc->p_DSN+i_Which)->Pas = p_Dlg->s_Password;
         UserName  = p_Dlg->s_User;
         Password  = p_Dlg->s_Password;
     if (p_Dlg->ShowModal() == wxID_OK)
     {
         (pDoc->p_DSN+i_Which)->Usr = p_Dlg->s_User;
         (pDoc->p_DSN+i_Which)->Pas = p_Dlg->s_Password;
         UserName  = p_Dlg->s_User;
         Password  = p_Dlg->s_Password;
-        OK = TRUE;
+        OK = true;
     }
     delete p_Dlg;
     if (OK)
     }
     delete p_Dlg;
     if (OK)
@@ -162,7 +162,7 @@ bool BrowserDB::OnStartDB(int Quiet)
                 wxLogMessage(_("-I-> BrowserDB::OnStartDB(%s) : End - Time needed : %ld ms"),ODBCSource.c_str(),sw.Time());
             }
             DbConnectInf.FreeHenv();
                 wxLogMessage(_("-I-> BrowserDB::OnStartDB(%s) : End - Time needed : %ld ms"),ODBCSource.c_str(),sw.Time());
             }
             DbConnectInf.FreeHenv();
-            return FALSE;
+            return false;
         }
         //--------------------------------------------------------------------------------------
         if (!Quiet)
         }
         //--------------------------------------------------------------------------------------
         if (!Quiet)
@@ -172,12 +172,12 @@ bool BrowserDB::OnStartDB(int Quiet)
             wxLogMessage(_("-I-> BrowserDB::OnGetDataSourceODBC() - DatabaseName(%s) ; DataSource(%s)"),Temp1.c_str(),Temp2.c_str());
             wxLogMessage(_("-I-> BrowserDB::OnStartDB(%s) : End - Time needed : %ld ms"),ODBCSource.c_str(),sw.Time());
         }
             wxLogMessage(_("-I-> BrowserDB::OnGetDataSourceODBC() - DatabaseName(%s) ; DataSource(%s)"),Temp1.c_str(),Temp2.c_str());
             wxLogMessage(_("-I-> BrowserDB::OnStartDB(%s) : End - Time needed : %ld ms"),ODBCSource.c_str(),sw.Time());
         }
-        return TRUE;
+        return true;
     }
     else
     {
         DbConnectInf.FreeHenv();
     }
     else
     {
         DbConnectInf.FreeHenv();
-        return FALSE;
+        return false;
     }
 }
 
     }
 }
 
@@ -197,7 +197,7 @@ bool BrowserDB::OnCloseDB(int Quiet)
     }
     if (!Quiet)
         wxLogMessage(_("\n-I-> BrowserDB::OnCloseDB() : End "));
     }
     if (!Quiet)
         wxLogMessage(_("\n-I-> BrowserDB::OnCloseDB() : End "));
-    return TRUE;
+    return true;
 }
 
 //----------------------------------------------------------------------------------------
 }
 
 //----------------------------------------------------------------------------------------
@@ -220,7 +220,7 @@ bool BrowserDB::OnGetNext(int Cols,int WXUNUSED(Quiet))
         wxLogMessage(Temp0);
         wxMessageBox(Temp0);
 #endif
         wxLogMessage(Temp0);
         wxMessageBox(Temp0);
 #endif
-        return FALSE;
+        return false;
     }
     else
     {
     }
     else
     {
@@ -328,7 +328,7 @@ bool BrowserDB::OnGetNext(int Cols,int WXUNUSED(Quiet))
                     wxLogMessage(_("-E-> BrowserDB::OnGetNext - DB_DATA_TYPE_?? (%d) in Col(%s)"),(cl_BrowserDB+i)->pColFor->i_dbDataType,Temp0.c_str());
                 }
                 else
                     wxLogMessage(_("-E-> BrowserDB::OnGetNext - DB_DATA_TYPE_?? (%d) in Col(%s)"),(cl_BrowserDB+i)->pColFor->i_dbDataType,Temp0.c_str());
                 }
                 else
-                    return TRUE;
+                    return true;
                 Temp0.Printf(_("-E-> unknown Format(%d) - sql(%d)"),(cl_BrowserDB+i)->pColFor->i_dbDataType,(cl_BrowserDB+i)->pColFor->i_sqlDataType);
                 wxStrcpy((cl_BrowserDB+i)->tableName,Temp0.c_str());
                 break;
                 Temp0.Printf(_("-E-> unknown Format(%d) - sql(%d)"),(cl_BrowserDB+i)->pColFor->i_dbDataType,(cl_BrowserDB+i)->pColFor->i_sqlDataType);
                 wxStrcpy((cl_BrowserDB+i)->tableName,Temp0.c_str());
                 break;
@@ -336,7 +336,7 @@ bool BrowserDB::OnGetNext(int Cols,int WXUNUSED(Quiet))
         }  // for
     }  // else
 
         }  // for
     }  // else
 
-    return TRUE;
+    return true;
 }
 
 //----------------------------------------------------------------------------------------
 }
 
 //----------------------------------------------------------------------------------------
@@ -354,7 +354,7 @@ bool BrowserDB::OnSelect(wxString tb_Name, int Quiet)
         Temp0 += GetExtendedDBErrorMsg(__TFILE__,__LINE__);
         wxLogMessage(Temp0);
         wxMessageBox(_T("-E-> BrowserDB::OnSelect - GetData()"));
         Temp0 += GetExtendedDBErrorMsg(__TFILE__,__LINE__);
         wxLogMessage(Temp0);
         wxMessageBox(_T("-E-> BrowserDB::OnSelect - GetData()"));
-        return FALSE;
+        return false;
     }
     //---------------------------------------------------------------------------------------
     while (db_BrowserDB->GetNext())
     }
     //---------------------------------------------------------------------------------------
     while (db_BrowserDB->GetNext())
@@ -367,16 +367,16 @@ bool BrowserDB::OnSelect(wxString tb_Name, int Quiet)
         Temp0.Printf(_("\n-E-> BrowserDB::OnSelect - ODBC-Error with ExecSql of >%s<.\n-E-> "),tb_Name.c_str());
         Temp0 += GetExtendedDBErrorMsg(__TFILE__,__LINE__);
         wxLogMessage(Temp0);
         Temp0.Printf(_("\n-E-> BrowserDB::OnSelect - ODBC-Error with ExecSql of >%s<.\n-E-> "),tb_Name.c_str());
         Temp0 += GetExtendedDBErrorMsg(__TFILE__,__LINE__);
         wxLogMessage(Temp0);
-        return FALSE;
+        return false;
     }
     //---------------------------------------------------------------------------------------
     }
     //---------------------------------------------------------------------------------------
-    // SetColDefs ( 0,"NAME",    DB_DATA_TYPE_VARCHAR,  Name,     SQL_C_CHAR,          sizeof(Name),    TRUE, TRUE);  // Primary index
+    // SetColDefs ( 0,"NAME",DB_DATA_TYPE_VARCHAR,Name,SQL_C_CHAR,sizeof(Name),true,true);  // Primary index
     //---------------------------------------------------------------------------------------
     if (!Quiet)
     {
         wxLogMessage(_("\n-I-> BrowserDB::OnSelect(%s) Records(%d): End - Time needed : %ld ms"),tb_Name.c_str(),i_Records,sw.Time());
     }
     //---------------------------------------------------------------------------------------
     if (!Quiet)
     {
         wxLogMessage(_("\n-I-> BrowserDB::OnSelect(%s) Records(%d): End - Time needed : %ld ms"),tb_Name.c_str(),i_Records,sw.Time());
     }
-    return TRUE;
+    return true;
 }
 
 //----------------------------------------------------------------------------------------
 }
 
 //----------------------------------------------------------------------------------------
@@ -391,13 +391,13 @@ bool BrowserDB::OnExecSql(wxString SQLStmt, int Quiet)
             wxLogMessage(Temp0);
         else
             wxMessageBox(_T("-E-> BrowserDB::OnExecSql - ExecSql()"));
             wxLogMessage(Temp0);
         else
             wxMessageBox(_T("-E-> BrowserDB::OnExecSql - ExecSql()"));
-        return FALSE;
+        return false;
     }
     if (!Quiet)
     {
         // wxLogMessage(_("\n-I-> BrowserDB::OnExecSql(%s) - End - Time needed : %ld ms"),SQLStmt.c_str(),sw.Time());
     }
     }
     if (!Quiet)
     {
         // wxLogMessage(_("\n-I-> BrowserDB::OnExecSql(%s) - End - Time needed : %ld ms"),SQLStmt.c_str(),sw.Time());
     }
-    return TRUE;
+    return true;
 }
 
 //----------------------------------------------------------------------------------------
 }
 
 //----------------------------------------------------------------------------------------
index a2021652d872fee313b01988b0d45126bba085a1..f30622aababe5841289c840d9692484725b5250b 100644 (file)
@@ -223,7 +223,7 @@ bool MainApp::OnInit(void)  // Does everything needed for a program start
     int width, height;
     frame->GetClientSize(&width, &height);
     //---------------------------------------------------------------------------------------
     int width, height;
     frame->GetClientSize(&width, &height);
     //---------------------------------------------------------------------------------------
-    frame->p_Splitter = new DocSplitterWindow(frame,-1);
+    frame->p_Splitter = new DocSplitterWindow(frame,wxID_ANY);
     // p_Splitter->SetCursor(wxCursor(wxCURSOR_PENCIL));
     frame->pDoc                       = new MainDoc();
     frame->pDoc->p_MainFrame          = frame;
     // p_Splitter->SetCursor(wxCursor(wxCURSOR_PENCIL));
     frame->pDoc                       = new MainDoc();
     frame->pDoc->p_MainFrame          = frame;
@@ -248,23 +248,23 @@ bool MainApp::OnInit(void)  // Does everything needed for a program start
     }
     frame->pDoc->p_Help = frame->p_Help;          // Save the information to the document
     //---------------------------------------------------------------------------------------
     }
     frame->pDoc->p_Help = frame->p_Help;          // Save the information to the document
     //---------------------------------------------------------------------------------------
-    frame->Show(TRUE);                            // Show the frame
+    frame->Show(true);                            // Show the frame
     SetTopWindow(frame);                          // At this point the frame can be seen
     //---------------------------------------------------------------------------------------
     // If you need a "Splash Screen" because of a long OnNewDocument, do it here
     if (!frame->pDoc->OnNewDocument())
     SetTopWindow(frame);                          // At this point the frame can be seen
     //---------------------------------------------------------------------------------------
     // If you need a "Splash Screen" because of a long OnNewDocument, do it here
     if (!frame->pDoc->OnNewDocument())
-        frame->Close(TRUE);
+        frame->Close(true);
     // Kill a "Splash Screen" because OnNewDocument, if you have one
     //---------------------------------------------------------------------------------------
     // Kill a "Splash Screen" because OnNewDocument, if you have one
     //---------------------------------------------------------------------------------------
-    p_ProgramCfg->Flush(TRUE);        // save the configuration
-    return TRUE;
+    p_ProgramCfg->Flush(true);        // save the configuration
+    return true;
 } // bool MainApp::OnInit(void)
 
 //----------------------------------------------------------------------------------------
 // My frame constructor
 //----------------------------------------------------------------------------------------
 MainFrame::MainFrame(wxFrame *frame, wxChar *title,  const wxPoint& pos, const wxSize& size):
 } // bool MainApp::OnInit(void)
 
 //----------------------------------------------------------------------------------------
 // My frame constructor
 //----------------------------------------------------------------------------------------
 MainFrame::MainFrame(wxFrame *frame, wxChar *title,  const wxPoint& pos, const wxSize& size):
-wxFrame(frame, -1, title,  pos, size)
+wxFrame(frame, wxID_ANY, title,  pos, size)
 {
     p_Splitter = NULL; pDoc = NULL; p_Help = NULL;    // Keep the Pointers clean !
     //--- Everything else is done in MainApp::OnInit() --------------------------------------
 {
     p_Splitter = NULL; pDoc = NULL; p_Help = NULL;    // Keep the Pointers clean !
     //--- Everything else is done in MainApp::OnInit() --------------------------------------
@@ -275,7 +275,7 @@ MainFrame::~MainFrame(void)
 {
     // Close the help frame; this will cause the config data to get written.
     if (p_Help->GetFrame()) // returns NULL if no help frame active
 {
     // Close the help frame; this will cause the config data to get written.
     if (p_Help->GetFrame()) // returns NULL if no help frame active
-        p_Help->GetFrame()->Close(TRUE);
+        p_Help->GetFrame()->Close(true);
     delete p_Help;  // Memory Leak
     p_Help = NULL;
     // save the control's values to the config
     delete p_Help;  // Memory Leak
     p_Help = NULL;
     // save the control's values to the config
@@ -294,7 +294,7 @@ MainFrame::~MainFrame(void)
     // Get() it doesn't try to create one if there is none (definitely not what
     // we want here!)
     // delete wxConfigBase::Set((wxConfigBase *) NULL);
     // Get() it doesn't try to create one if there is none (definitely not what
     // we want here!)
     // delete wxConfigBase::Set((wxConfigBase *) NULL);
-    p_ProgramCfg->Flush(TRUE);        // saves   Objekt
+    p_ProgramCfg->Flush(true);        // saves   Objekt
     if (pDoc)                         // If we have a Valid Document
         delete pDoc;                     // Cleanup (MainDoc::~MainDoc)
 } // MainFrame::~MainFrame(void)
     if (pDoc)                         // If we have a Valid Document
         delete pDoc;                     // Cleanup (MainDoc::~MainDoc)
 } // MainFrame::~MainFrame(void)
@@ -302,7 +302,7 @@ MainFrame::~MainFrame(void)
 //----------------------------------------------------------------------------------------
 void MainFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
 {
 //----------------------------------------------------------------------------------------
 void MainFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
 {
-    Close(TRUE);
+    Close(true);
 }
 
 //----------------------------------------------------------------------------------------
 }
 
 //----------------------------------------------------------------------------------------
index 638c82c8bb30e65ccf3c3da35cf0b4a38611cf71..409f79b4c0f41ed6dc153e98816ac02e56c0f646 100644 (file)
@@ -56,7 +56,7 @@ END_EVENT_TABLE()
 
 //----------------------------------------------------------------------------------------
 //           wxListCtrl(parent, id, pos, size, style)
 
 //----------------------------------------------------------------------------------------
 //           wxListCtrl(parent, id, pos, size, style)
-//           wxGrid(parent,-1,wxPoint( 0, 0 ), wxSize( 400, 300 ) );
+//           wxGrid(parent,wxID_ANY,wxPoint( 0, 0 ), wxSize( 400, 300 ) );
 //----------------------------------------------------------------------------------------
 // DBGrid
 //----------------------------------------------------------------------------------------
 //----------------------------------------------------------------------------------------
 // DBGrid
 //----------------------------------------------------------------------------------------
@@ -65,7 +65,7 @@ END_EVENT_TABLE()
 DBGrid::DBGrid(wxWindow *parent, const wxWindowID id,const wxPoint& pos,const wxSize& size, long style):
 wxGrid(parent, id, pos, size, style)
 {
 DBGrid::DBGrid(wxWindow *parent, const wxWindowID id,const wxPoint& pos,const wxSize& size, long style):
 wxGrid(parent, id, pos, size, style)
 {
-    b_EditModus = FALSE;
+    b_EditModus = false;
     //---------------------------------------------------------------------------------------
     popupMenu1 = new wxMenu(_T(""));
     popupMenu1->Append(GRID_EDIT, _("Edit Modus"));
     //---------------------------------------------------------------------------------------
     popupMenu1 = new wxMenu(_T(""));
     popupMenu1->Append(GRID_EDIT, _("Edit Modus"));
@@ -99,7 +99,7 @@ int  DBGrid::OnTableView(wxString Table)
             if (!wxStrcmp((ct_BrowserDB->pTableInf+x)->tableName,Table))      // is this our Table ?
             {    // Yes, the Data of this Table shall be put into the Grid
                 int ValidTable = x;                                              // Save the Tablenumber
             if (!wxStrcmp((ct_BrowserDB->pTableInf+x)->tableName,Table))      // is this our Table ?
             {    // Yes, the Data of this Table shall be put into the Grid
                 int ValidTable = x;                                              // Save the Tablenumber
-                (db_Br+i_Which)->OnSelect(Table,FALSE);                          // Select * from "table"
+                (db_Br+i_Which)->OnSelect(Table,false);                          // Select * from "table"
                 // Set the local Pointer to the Column Information we are going to use
                 (db_Br+i_Which)->cl_BrowserDB = (ct_BrowserDB->pTableInf+x)->pColInf;
                 if ((ct_BrowserDB->pTableInf+x)->pColInf)                        // Valid pointer (!= NULL) ?
                 // Set the local Pointer to the Column Information we are going to use
                 (db_Br+i_Which)->cl_BrowserDB = (ct_BrowserDB->pTableInf+x)->pColInf;
                 if ((ct_BrowserDB->pTableInf+x)->pColInf)                        // Valid pointer (!= NULL) ?
@@ -120,7 +120,7 @@ int  DBGrid::OnTableView(wxString Table)
                     for (z=0;z<(db_Br+i_Which)->i_Records;z++)                      // Loop through the Records
                     {
                         Temp0.Printf(_T("%06d"),z+1);  SetRowLabelValue(z,Temp0);          // Set Row Lable Value
                     for (z=0;z<(db_Br+i_Which)->i_Records;z++)                      // Loop through the Records
                     {
                         Temp0.Printf(_T("%06d"),z+1);  SetRowLabelValue(z,Temp0);          // Set Row Lable Value
-                        (db_Br+i_Which)->OnGetNext((ct_BrowserDB->pTableInf+ValidTable)->numCols,FALSE);
+                        (db_Br+i_Which)->OnGetNext((ct_BrowserDB->pTableInf+ValidTable)->numCols,false);
                         for (y=0;y<(ct_BrowserDB->pTableInf+ValidTable)->numCols;y++) // Loop through the Fields
                         { // BrowserDB::OnGetNext Formats the field Value into tablename
                             SetCellValue(z, y,((db_Br+i_Which)->cl_BrowserDB+y)->tableName);
                         for (y=0;y<(ct_BrowserDB->pTableInf+ValidTable)->numCols;y++) // Loop through the Fields
                         { // BrowserDB::OnGetNext Formats the field Value into tablename
                             SetCellValue(z, y,((db_Br+i_Which)->cl_BrowserDB+y)->tableName);
@@ -156,7 +156,7 @@ Weiter:
 //----------------------------------------------------------------------------------------
 void DBGrid::OnModusEdit(wxCommandEvent& WXUNUSED(event))
 {
 //----------------------------------------------------------------------------------------
 void DBGrid::OnModusEdit(wxCommandEvent& WXUNUSED(event))
 {
-    b_EditModus = TRUE;             // Needed by PopupMenu
+    b_EditModus = true;             // Needed by PopupMenu
     EnableEditing(b_EditModus);     // Activate in-place Editing
     UpdateDimensions();             // Redraw the Grid
     // wxLogMessage(_("-I-> DBGrid::OnModusEdit() - End"));
     EnableEditing(b_EditModus);     // Activate in-place Editing
     UpdateDimensions();             // Redraw the Grid
     // wxLogMessage(_("-I-> DBGrid::OnModusEdit() - End"));
@@ -165,7 +165,7 @@ void DBGrid::OnModusEdit(wxCommandEvent& WXUNUSED(event))
 //----------------------------------------------------------------------------------------
 void DBGrid::OnModusBrowse(wxCommandEvent& WXUNUSED(event))
 {
 //----------------------------------------------------------------------------------------
 void DBGrid::OnModusBrowse(wxCommandEvent& WXUNUSED(event))
 {
-    b_EditModus = FALSE;            // Needed by PopupMenu
+    b_EditModus = false;            // Needed by PopupMenu
     EnableEditing(b_EditModus);     // Deactivate in-place Editing
     UpdateDimensions();             // Redraw the Grid
     // wxLogMessage(_("-I-> DBGrid::OnModusBrowse() - End"));
     EnableEditing(b_EditModus);     // Deactivate in-place Editing
     UpdateDimensions();             // Redraw the Grid
     // wxLogMessage(_("-I-> DBGrid::OnModusBrowse() - End"));
index e2ee97810242461db1e55e1c00fbb93444792f24..072b9073b8492e5af14c2a988c03e688dabdeb70 100644 (file)
@@ -67,7 +67,7 @@ DBTree::DBTree(wxWindow *parent, const wxWindowID id,const wxPoint& pos, const w
 {
     const int image_size = 16;
     // Make an image list containing small icons
 {
     const int image_size = 16;
     // Make an image list containing small icons
-    p_imageListNormal = new wxImageList(image_size, image_size, TRUE);
+    p_imageListNormal = new wxImageList(image_size, image_size, true);
     // should correspond to TreeIc_xxx enum
 #if !defined(__WXMSW__)
 #include "bitmaps/logo.xpm"
     // should correspond to TreeIc_xxx enum
 #if !defined(__WXMSW__)
 #include "bitmaps/logo.xpm"
@@ -104,7 +104,7 @@ DBTree::~DBTree()
 
     //  delete (pDoc->db_Br+i_Which);
     // wxLogMessage("DBTree::~DBTree() - Vor  OnCloseDB()");
 
     //  delete (pDoc->db_Br+i_Which);
     // wxLogMessage("DBTree::~DBTree() - Vor  OnCloseDB()");
-    (pDoc->db_Br+i_Which)->OnCloseDB(FALSE);
+    (pDoc->db_Br+i_Which)->OnCloseDB(false);
     // wxLogMessage("DBTree::~DBTree() - Nach OnCloseDB()");
     (pDoc->db_Br+i_Which)->db_BrowserDB = NULL;
     (pDoc->db_Br+i_Which)->ct_BrowserDB = NULL;
     // wxLogMessage("DBTree::~DBTree() - Nach OnCloseDB()");
     (pDoc->db_Br+i_Which)->db_BrowserDB = NULL;
     (pDoc->db_Br+i_Which)->ct_BrowserDB = NULL;
@@ -128,11 +128,11 @@ int DBTree::OnPopulate()
     wxString SQL_TYPE, DB_TYPE;
     SetFont(* pDoc->ft_Doc);
     //---------------------------------------------------------------------------------------
     wxString SQL_TYPE, DB_TYPE;
     SetFont(* pDoc->ft_Doc);
     //---------------------------------------------------------------------------------------
-    if ((pDoc->db_Br+i_Which)->Initialize(FALSE))
+    if ((pDoc->db_Br+i_Which)->Initialize(false))
     {
         wxStopWatch sw;
         wxBeginBusyCursor();
     {
         wxStopWatch sw;
         wxBeginBusyCursor();
-        ct_BrowserDB = (pDoc->db_Br+i_Which)->OnGetCatalog(FALSE);
+        ct_BrowserDB = (pDoc->db_Br+i_Which)->OnGetCatalog(false);
         if (ct_BrowserDB)
         { // Use the wxDatabase Information
             Temp0.Printf(_T("%s - (%s) (%s)"), s_DSN.c_str(),ct_BrowserDB->catalog, ct_BrowserDB->schema);
         if (ct_BrowserDB)
         { // Use the wxDatabase Information
             Temp0.Printf(_T("%s - (%s) (%s)"), s_DSN.c_str(),ct_BrowserDB->catalog, ct_BrowserDB->schema);
@@ -149,7 +149,7 @@ int DBTree::OnPopulate()
                 {
                     Temp1.Printf(_T("TN(%s"),(ct_BrowserDB->pTableInf+x)->tableName);
                     //----
                 {
                     Temp1.Printf(_T("TN(%s"),(ct_BrowserDB->pTableInf+x)->tableName);
                     //----
-                    (ct_BrowserDB->pTableInf+x)->pColInf = (pDoc->db_Br+i_Which)->OnGetColumns((ct_BrowserDB->pTableInf+x)->tableName,(ct_BrowserDB->pTableInf+x)->numCols,FALSE);
+                    (ct_BrowserDB->pTableInf+x)->pColInf = (pDoc->db_Br+i_Which)->OnGetColumns((ct_BrowserDB->pTableInf+x)->tableName,(ct_BrowserDB->pTableInf+x)->numCols,false);
                     //----
                     if ((ct_BrowserDB->pTableInf+x)->pColInf)
                     {
                     //----
                     if ((ct_BrowserDB->pTableInf+x)->pColInf)
                     {
@@ -236,7 +236,7 @@ int DBTree::OnPopulate()
         Temp0.Printf(_("-I-> DBTree::OnPopulate() - %6d Tables have been read. - Time needed : %ld ms"),z,sw.Time());
         wxLogMessage(Temp0);
         pDoc->p_MainFrame->SetStatusText(Temp0, 0);
         Temp0.Printf(_("-I-> DBTree::OnPopulate() - %6d Tables have been read. - Time needed : %ld ms"),z,sw.Time());
         wxLogMessage(Temp0);
         pDoc->p_MainFrame->SetStatusText(Temp0, 0);
-    }       // if((pDoc->db_Br+i_Which)->Initialize(FALSE))
+    }       // if((pDoc->db_Br+i_Which)->Initialize(false))
     else
     {
         wxLogMessage(_("\n-E-> DBTree::OnPopulate() : A valid Pointer could not be created : Failed"));
     else
     {
         wxLogMessage(_("\n-E-> DBTree::OnPopulate() : A valid Pointer could not be created : Failed"));
index 8696ef530492415d28e7652a04a5400182ae7ec0..98b4c0d1baf55b6235094606aae90ae4423ec50a 100644 (file)
@@ -46,9 +46,9 @@ DlgUser::DlgUser(wxWindow *parent, MainDoc *p_Doc, const wxString& title) :
     SetBackgroundColour(_T("wheat"));
     pDoc = p_Doc;
     wxLayoutConstraints* layout;
     SetBackgroundColour(_T("wheat"));
     pDoc = p_Doc;
     wxLayoutConstraints* layout;
-    SetAutoLayout(TRUE);
+    SetAutoLayout(true);
     
     
-    m_Label1 = new wxStaticText(this, -1, _("User ID:"));
+    m_Label1 = new wxStaticText(this, wxID_ANY, _("User ID:"));
     m_Label1->SetFont(* pDoc->ft_Doc);
     layout = new wxLayoutConstraints;
     layout->left.SameAs(this, wxLeft, 10);
     m_Label1->SetFont(* pDoc->ft_Doc);
     layout = new wxLayoutConstraints;
     layout->left.SameAs(this, wxLeft, 10);
@@ -60,7 +60,7 @@ DlgUser::DlgUser(wxWindow *parent, MainDoc *p_Doc, const wxString& title) :
     int w;
     m_Label1->GetSize(&w, &chSize); 
     
     int w;
     m_Label1->GetSize(&w, &chSize); 
     
-    m_UserName = new wxTextCtrl(this, -1, _T(""));
+    m_UserName = new wxTextCtrl(this, wxID_ANY, _T(""));
     m_UserName->SetFont(* pDoc->ft_Doc);
     chSize = (int) (m_UserName->GetCharHeight()*ratio);
     
     m_UserName->SetFont(* pDoc->ft_Doc);
     chSize = (int) (m_UserName->GetCharHeight()*ratio);
     
@@ -73,7 +73,7 @@ DlgUser::DlgUser(wxWindow *parent, MainDoc *p_Doc, const wxString& title) :
     m_UserName->SetConstraints(layout);
     
     
     m_UserName->SetConstraints(layout);
     
     
-    m_Label2 = new wxStaticText(this, -1, _("Password:"));
+    m_Label2 = new wxStaticText(this, wxID_ANY, _("Password:"));
     m_Label2->SetFont(* pDoc->ft_Doc);
     layout = new wxLayoutConstraints;
     layout->left.SameAs(m_Label1, wxLeft);
     m_Label2->SetFont(* pDoc->ft_Doc);
     layout = new wxLayoutConstraints;
     layout->left.SameAs(m_Label1, wxLeft);
@@ -82,7 +82,7 @@ DlgUser::DlgUser(wxWindow *parent, MainDoc *p_Doc, const wxString& title) :
     layout->width.SameAs(m_Label1, wxWidth);
     m_Label2->SetConstraints(layout);
     
     layout->width.SameAs(m_Label1, wxWidth);
     m_Label2->SetConstraints(layout);
     
-    m_Password = new wxTextCtrl(this, -1, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD);
+    m_Password = new wxTextCtrl(this, wxID_ANY, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD);
     m_Password->SetFont(* pDoc->ft_Doc);
     layout = new wxLayoutConstraints;
     layout->left.SameAs(m_UserName, wxLeft);
     m_Password->SetFont(* pDoc->ft_Doc);
     layout = new wxLayoutConstraints;
     layout->left.SameAs(m_UserName, wxLeft);
@@ -136,7 +136,7 @@ END_EVENT_TABLE()
 //----------------------------------------------------------------------------------------
 void DlgUser::OnOk(wxCommandEvent& WXUNUSED(event) )
 {
 //----------------------------------------------------------------------------------------
 void DlgUser::OnOk(wxCommandEvent& WXUNUSED(event) )
 {
-    //canceled = FALSE;
+    //canceled = false;
     s_User    = m_UserName->GetValue();
     s_Password = m_Password->GetValue();
     EndModal(wxID_OK);
     s_User    = m_UserName->GetValue();
     s_Password = m_Password->GetValue();
     EndModal(wxID_OK);
@@ -145,7 +145,7 @@ void DlgUser::OnOk(wxCommandEvent& WXUNUSED(event) )
 //----------------------------------------------------------------------------------------
 //void DlgUser::OnCancel(wxCommandEvent& WXUNUSED(event) )
 // {
 //----------------------------------------------------------------------------------------
 //void DlgUser::OnCancel(wxCommandEvent& WXUNUSED(event) )
 // {
-//   canceled = TRUE;
+//   canceled = true;
 //   EndModal(wxID_CANCEL);
 // }
 //----------------------------------------------------------------------------------------
 //   EndModal(wxID_CANCEL);
 // }
 //----------------------------------------------------------------------------------------
index a9ccf11ac87684c48db8687f559f0ed93256eeec..b16d76bd0121389957a2352a8133a5924a574871 100644 (file)
@@ -63,8 +63,8 @@ MainDoc::MainDoc()
 //----------------------------------------------------------------------------------------
 MainDoc::~MainDoc()
 {
 //----------------------------------------------------------------------------------------
 MainDoc::~MainDoc()
 {
-    p_TabArea->Show(FALSE);    // Deactivate the Window
-    p_PageArea->Show(FALSE);    // Deactivate the Window
+    p_TabArea->Show(false);    // Deactivate the Window
+    p_PageArea->Show(false);    // Deactivate the Window
 
     // ----------------------------------------------------------
     // -E-> The Tree Controls take to long to close : Why ??
 
     // ----------------------------------------------------------
     // -E-> The Tree Controls take to long to close : Why ??
@@ -86,11 +86,11 @@ bool MainDoc::OnNewDocument()
     wxStopWatch sw;
     //---------------------------------------------------------------------------------------
     if (!OnInitView())
     wxStopWatch sw;
     //---------------------------------------------------------------------------------------
     if (!OnInitView())
-        return FALSE;
+        return false;
     p_PgmCtrl->OnPopulate();
     //---------------------------------------------------------------------------------------
     wxLogMessage(_("-I-> MainDoc::OnNewDocument() - End - Time needed : %ld ms"),sw.Time());
     p_PgmCtrl->OnPopulate();
     //---------------------------------------------------------------------------------------
     wxLogMessage(_("-I-> MainDoc::OnNewDocument() - End - Time needed : %ld ms"),sw.Time());
-    return TRUE;
+    return true;
 }
 
 //----------------------------------------------------------------------------------------
 }
 
 //----------------------------------------------------------------------------------------
@@ -102,7 +102,7 @@ bool MainDoc::OnInitView()
     // create "workplace" window
     //---------------------------------------------------------------------------------------
     p_TabArea = new wxTabbedWindow(); // Init the Pointer
     // create "workplace" window
     //---------------------------------------------------------------------------------------
     p_TabArea = new wxTabbedWindow(); // Init the Pointer
-    p_TabArea->Create(p_Splitter, -1);
+    p_TabArea->Create(p_Splitter, wxID_ANY);
     //---------------------------------------------------------------------------------------
     p_PgmCtrl = new PgmCtrl(p_TabArea, TREE_CTRL_PGM,wxDefaultPosition, wxDefaultSize,
         wxTR_HAS_BUTTONS | wxSUNKEN_BORDER);
     //---------------------------------------------------------------------------------------
     p_PgmCtrl = new PgmCtrl(p_TabArea, TREE_CTRL_PGM,wxDefaultPosition, wxDefaultSize,
         wxTR_HAS_BUTTONS | wxSUNKEN_BORDER);
@@ -119,9 +119,9 @@ bool MainDoc::OnInitView()
     // now create "output" window
     //---------------------------------------------------------------------------------------
     p_PageArea = new wxPagedWindow();  // Init the Pointer
     // now create "output" window
     //---------------------------------------------------------------------------------------
     p_PageArea = new wxPagedWindow();  // Init the Pointer
-    p_PageArea->Create(p_Splitter, -1);
+    p_PageArea->Create(p_Splitter, wxID_ANY);
     //---------------------------------------------------------------------------------------
     //---------------------------------------------------------------------------------------
-    p_LogWin = new wxTextCtrl(p_PageArea,-1,wxEmptyString,
+    p_LogWin = new wxTextCtrl(p_PageArea,wxID_ANY,wxEmptyString,
         wxDefaultPosition, wxDefaultSize,wxTE_MULTILINE );
     p_LogWin->SetFont(* ft_Doc);
     // Don't forget ! This is always : i_TabArt = 0 ; i_ViewNr = 1;
         wxDefaultPosition, wxDefaultSize,wxTE_MULTILINE );
     p_LogWin->SetFont(* ft_Doc);
     // Don't forget ! This is always : i_TabArt = 0 ; i_ViewNr = 1;
@@ -141,13 +141,13 @@ bool MainDoc::OnInitView()
     p_Splitter->SplitHorizontally(p_TabArea,p_PageArea,Sash);
     //---------------------------------------------------------------------------------------
     // if (!OnInitODBC())
     p_Splitter->SplitHorizontally(p_TabArea,p_PageArea,Sash);
     //---------------------------------------------------------------------------------------
     // if (!OnInitODBC())
-    //  return FALSE;
+    //  return false;
     OnInitODBC();
     //---------------------------------------------------------------------------------------
     Temp0.Printf(_("-I-> MainDoc::OnInitView() - End - %d DSN's found"),i_DSN);
     p_MainFrame->SetStatusText(Temp0, 0);
     wxLogMessage(Temp0);
     OnInitODBC();
     //---------------------------------------------------------------------------------------
     Temp0.Printf(_("-I-> MainDoc::OnInitView() - End - %d DSN's found"),i_DSN);
     p_MainFrame->SetStatusText(Temp0, 0);
     wxLogMessage(Temp0);
-    return TRUE;
+    return true;
 }
 
 //----------------------------------------------------------------------------------------
 }
 
 //----------------------------------------------------------------------------------------
@@ -163,7 +163,7 @@ bool MainDoc::OnInitODBC()
 
     if (!DbConnectInf.AllocHenv())
     {
 
     if (!DbConnectInf.AllocHenv())
     {
-        return FALSE;
+        return false;
     }
 
     //---------------------------------------------------------------------------------------
     }
 
     //---------------------------------------------------------------------------------------
@@ -225,10 +225,10 @@ bool MainDoc::OnInitODBC()
         message += _("           Program will exit!\n\n");
         message += _("                       Ciao");
         wxMessageBox( message,_("-E-> Fatal situation"));
         message += _("           Program will exit!\n\n");
         message += _("                       Ciao");
         wxMessageBox( message,_("-E-> Fatal situation"));
-        return FALSE;
+        return false;
     }
     //---------------------------------------------------------------------------------------
     }
     //---------------------------------------------------------------------------------------
-    return TRUE;
+    return true;
 }
 
 //----------------------------------------------------------------------------------------
 }
 
 //----------------------------------------------------------------------------------------
@@ -238,18 +238,18 @@ bool MainDoc::OnChosenDSN(int Which)
     //---------------------------------------------------------------------------------------
     if (p_DBTree != NULL)
     {
     //---------------------------------------------------------------------------------------
     if (p_DBTree != NULL)
     {
-        p_TabArea->Show(FALSE);    // Deactivate the Window
+        p_TabArea->Show(false);    // Deactivate the Window
         p_TabArea->RemoveTab(p_DBTree->i_ViewNr);
         p_TabArea->RemoveTab(p_DBTree->i_ViewNr);
-        p_TabArea->Show(TRUE);     // Activate the Window
+        p_TabArea->Show(true);     // Activate the Window
         OnChosenTbl(77,_T(""));
     }
     //-------------------------
         OnChosenTbl(77,_T(""));
     }
     //-------------------------
-    p_TabArea->Show(FALSE);    // Deactivate the Window
+    p_TabArea->Show(false);    // Deactivate the Window
     p_DBTree = new DBTree(p_TabArea, TREE_CTRL_DB,wxDefaultPosition, wxDefaultSize,
         wxTR_HAS_BUTTONS | wxSUNKEN_BORDER);
     p_TabArea->AddTab(p_DBTree,(p_DSN+Which)->Dsn,_T(" ? "));
     p_DBTree->i_ViewNr = p_TabArea->GetTabCount()-1;
     p_DBTree = new DBTree(p_TabArea, TREE_CTRL_DB,wxDefaultPosition, wxDefaultSize,
         wxTR_HAS_BUTTONS | wxSUNKEN_BORDER);
     p_TabArea->AddTab(p_DBTree,(p_DSN+Which)->Dsn,_T(" ? "));
     p_DBTree->i_ViewNr = p_TabArea->GetTabCount()-1;
-    p_TabArea->Show(TRUE);    // Deactivate the Window
+    p_TabArea->Show(true);    // Deactivate the Window
     p_DBTree->i_Which  = Which;
     p_DBTree->s_DSN    = (p_DSN+Which)->Dsn;
     p_DBTree->i_TabArt = 0;
     p_DBTree->i_Which  = Which;
     p_DBTree->s_DSN    = (p_DSN+Which)->Dsn;
     p_DBTree->i_TabArt = 0;
@@ -258,7 +258,7 @@ bool MainDoc::OnChosenDSN(int Which)
     p_TabArea->SetActiveTab(p_DBTree->i_ViewNr);
     //---------------------------------------------------------------------------------------
     // wxLogMessage("OnChosenDSN(%d) - End",Which);
     p_TabArea->SetActiveTab(p_DBTree->i_ViewNr);
     //---------------------------------------------------------------------------------------
     // wxLogMessage("OnChosenDSN(%d) - End",Which);
-    return TRUE;
+    return true;
 }
 
 //----------------------------------------------------------------------------------------
 }
 
 //----------------------------------------------------------------------------------------
@@ -270,25 +270,25 @@ bool MainDoc::OnChosenTbl(int Tab,wxString Table)
     {
         if (p_DBGrid->i_TabArt == 0)
         {
     {
         if (p_DBGrid->i_TabArt == 0)
         {
-            p_TabArea->Show(FALSE);    // Deactivate the Window
+            p_TabArea->Show(false);    // Deactivate the Window
             p_TabArea->RemoveTab(p_DBGrid->i_ViewNr);
             p_TabArea->RemoveTab(p_DBGrid->i_ViewNr);
-            p_TabArea->Show(TRUE);     // Activate the Window
+            p_TabArea->Show(true);     // Activate the Window
         }
         if (p_DBGrid->i_TabArt == 1)
         {
         }
         if (p_DBGrid->i_TabArt == 1)
         {
-            p_PageArea->Show(FALSE);   // Deactivate the Window
+            p_PageArea->Show(false);   // Deactivate the Window
             p_PageArea->RemoveTab(p_DBGrid->i_ViewNr);
             p_PageArea->RemoveTab(p_DBGrid->i_ViewNr);
-            p_PageArea->Show(TRUE);    // Activate the Window
+            p_PageArea->Show(true);    // Activate the Window
         }
         p_DBGrid = NULL;
         delete p_DBGrid;
     }
     if (Tab == 77)               // Delete only
         }
         p_DBGrid = NULL;
         delete p_DBGrid;
     }
     if (Tab == 77)               // Delete only
-        return TRUE;
+        return true;
     //-------------------------
     if (Tab == 0)  // Tabview
     {
     //-------------------------
     if (Tab == 0)  // Tabview
     {
-        p_TabArea->Show(FALSE);    // Deactivate the Window
+        p_TabArea->Show(false);    // Deactivate the Window
         p_DBGrid = new DBGrid(p_TabArea,GRID_CTRL_DB,wxDefaultPosition, wxDefaultSize,
             wxSUNKEN_BORDER);
         p_TabArea->AddTab(p_DBGrid, Table, _T(""));
         p_DBGrid = new DBGrid(p_TabArea,GRID_CTRL_DB,wxDefaultPosition, wxDefaultSize,
             wxSUNKEN_BORDER);
         p_TabArea->AddTab(p_DBGrid, Table, _T(""));
@@ -297,11 +297,11 @@ bool MainDoc::OnChosenTbl(int Tab,wxString Table)
         p_DBGrid->db_Br      = db_Br;
         p_DBGrid->OnTableView(Table);
         p_TabArea->SetActiveTab(p_DBGrid->i_ViewNr);
         p_DBGrid->db_Br      = db_Br;
         p_DBGrid->OnTableView(Table);
         p_TabArea->SetActiveTab(p_DBGrid->i_ViewNr);
-        p_TabArea->Show(TRUE);     // Activate the Window
+        p_TabArea->Show(true);     // Activate the Window
     }
     if (Tab == 1)  // Pageview
     {
     }
     if (Tab == 1)  // Pageview
     {
-        p_PageArea->Show(FALSE);   // Deactivate the Window
+        p_PageArea->Show(false);   // Deactivate the Window
         p_DBGrid = new DBGrid(p_PageArea,GRID_CTRL_DB,wxDefaultPosition, wxDefaultSize,
             wxSUNKEN_BORDER);
         p_PageArea->AddTab(p_DBGrid, Table, _T(""));
         p_DBGrid = new DBGrid(p_PageArea,GRID_CTRL_DB,wxDefaultPosition, wxDefaultSize,
             wxSUNKEN_BORDER);
         p_PageArea->AddTab(p_DBGrid, Table, _T(""));
@@ -309,13 +309,13 @@ bool MainDoc::OnChosenTbl(int Tab,wxString Table)
         p_DBGrid->pDoc       = this;
         p_DBGrid->db_Br      = db_Br;
         p_DBGrid->i_Which    = p_DBTree->i_Which;
         p_DBGrid->pDoc       = this;
         p_DBGrid->db_Br      = db_Br;
         p_DBGrid->i_Which    = p_DBTree->i_Which;
-        p_PageArea->Show(TRUE);    // Activate the Window
+        p_PageArea->Show(true);    // Activate the Window
         p_DBGrid->OnTableView(Table);
         p_PageArea->SetActiveTab(p_DBGrid->i_ViewNr);
     }
     p_DBGrid->i_TabArt = Tab;
     //--------------------------
         p_DBGrid->OnTableView(Table);
         p_PageArea->SetActiveTab(p_DBGrid->i_ViewNr);
     }
     p_DBGrid->i_TabArt = Tab;
     //--------------------------
-    return TRUE;;
+    return true;
 }
 
 //----------------------------------------------------------------------------------------
 }
 
 //----------------------------------------------------------------------------------------
index ce3141d677fec75da05faf099c6e87a65a47e202..86672c449ccc38f23ed6109a5c060291f411c5c8 100644 (file)
@@ -84,9 +84,9 @@ public:
     virtual bool OnSashPositionChange(int newSashPosition)
     {
         if ( !wxSplitterWindow::OnSashPositionChange(newSashPosition) )
     virtual bool OnSashPositionChange(int newSashPosition)
     {
         if ( !wxSplitterWindow::OnSashPositionChange(newSashPosition) )
-            return FALSE;
+            return false;
         pDoc->Sash = newSashPosition;
         pDoc->Sash = newSashPosition;
-        return TRUE;
+        return true;
     }
     DECLARE_EVENT_TABLE()
 };
     }
     DECLARE_EVENT_TABLE()
 };
index 786b0dea8f0b7e9b773daba11632729a736e71d5..c5893e9d5d9a5da1acb2c656ccd4df00426c5bcd 100644 (file)
@@ -72,7 +72,7 @@ PgmCtrl::PgmCtrl(wxWindow *parent, const wxWindowID id,const wxPoint& pos, const
 {
     const int image_size = 16;
     // Make an image list containing small icons
 {
     const int image_size = 16;
     // Make an image list containing small icons
-    p_imageListNormal = new wxImageList(image_size, image_size, TRUE);
+    p_imageListNormal = new wxImageList(image_size, image_size, true);
     // should correspond to TreeIc_xxx enum
     p_imageListNormal->Add(wxBitmap(wxBitmap(wxICON(aLogo)).ConvertToImage().Rescale(image_size, image_size)));
     p_imageListNormal->Add(wxBitmap(wxBitmap(wxICON(DsnClosed)).ConvertToImage().Rescale(image_size, image_size)));
     // should correspond to TreeIc_xxx enum
     p_imageListNormal->Add(wxBitmap(wxBitmap(wxICON(aLogo)).ConvertToImage().Rescale(image_size, image_size)));
     p_imageListNormal->Add(wxBitmap(wxBitmap(wxICON(DsnClosed)).ConvertToImage().Rescale(image_size, image_size)));
@@ -276,14 +276,14 @@ void PgmCtrl::OnUserPassword(wxCommandEvent& WXUNUSED(event))
             //--------------------
             // Temp0.Printf("i(%d) ; s_DSN(%s) ; s_User(%s) ; s_Password(%s)",i,p_Dlg.s_DSN,p_Dlg.s_User,p_Dlg.s_Password);
             // wxMessageBox(Temp0);
             //--------------------
             // Temp0.Printf("i(%d) ; s_DSN(%s) ; s_User(%s) ; s_Password(%s)",i,p_Dlg.s_DSN,p_Dlg.s_User,p_Dlg.s_Password);
             // wxMessageBox(Temp0);
-            bool OK = FALSE;
+            bool OK = false;
             if (p_Dlg->ShowModal() == wxID_OK)
             {
                 (pDoc->p_DSN+i)->Usr = p_Dlg->s_User;
                 (pDoc->p_DSN+i)->Pas = p_Dlg->s_Password;
                 (pDoc->db_Br+i)->UserName  = (pDoc->p_DSN+i)->Usr;
                 (pDoc->db_Br+i)->Password  = (pDoc->p_DSN+i)->Pas;
             if (p_Dlg->ShowModal() == wxID_OK)
             {
                 (pDoc->p_DSN+i)->Usr = p_Dlg->s_User;
                 (pDoc->p_DSN+i)->Pas = p_Dlg->s_Password;
                 (pDoc->db_Br+i)->UserName  = (pDoc->p_DSN+i)->Usr;
                 (pDoc->db_Br+i)->Password  = (pDoc->p_DSN+i)->Pas;
-                OK = TRUE;
+                OK = true;
             }
             delete p_Dlg;
             if (!OK)
             }
             delete p_Dlg;
             if (!OK)
index 7f15c825e6c8b1635e2f49da20eec8e77a1cd1ea..e27fecd2ff21fd88a80fb4b7f7fba451bc1a5d16 100644 (file)
@@ -3,10 +3,10 @@
 //---------------------------------------------------------------------------
 //-- all #includes that the whole Project needs. ----------------------------
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------
 //-- all #includes that the whole Project needs. ----------------------------
 //---------------------------------------------------------------------------
-#include <wx/config.h>      // to let wxWidgets choose a wxConfig class for your platform
-#include <wx/confbase.h>    // base config class
+
+#include <wx/config.h>
 #include <wx/dbtable.h>
 #include <wx/dbtable.h>
-#include <wx/generic/grid.h>
+#include <wx/grid.h>
 #include <wx/file.h>
 #include <wx/wxhtml.h>
 #include <wx/image.h>
 #include <wx/file.h>
 #include <wx/wxhtml.h>
 #include <wx/image.h>
 #include <wx/textctrl.h>
 #include <wx/toolbar.h>
 #include <wx/treectrl.h>
 #include <wx/textctrl.h>
 #include <wx/toolbar.h>
 #include <wx/treectrl.h>
+
 //---------------------------
 //---------------------------
-#include "tabpgwin.h"         // Original name : "controlarea.h"
-//---------------------------
+
+#include "tabpgwin.h"
 #include "dlguser.h"
 #include "browsedb.h"
 #include "dbtree.h"
 #include "dlguser.h"
 #include "browsedb.h"
 #include "dbtree.h"
@@ -28,4 +29,5 @@
 #include "pgmctrl.h"
 #include "doc.h"
 #include "dbbrowse.h"
 #include "pgmctrl.h"
 #include "doc.h"
 #include "dbbrowse.h"
+
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------
index 6de25f082496968fed34f05032028771dbb78952..b8cde259692029a46c164d489da7bca4ec2a31b0 100644 (file)
@@ -7,9 +7,9 @@
 //              - restruction of Variable declaration
 //              - to prevent Warnings under MingW32
 // Modified by: 19990909 : mj
 //              - restruction of Variable declaration
 //              - to prevent Warnings under MingW32
 // Modified by: 19990909 : mj
-//              - mNoVertScroll TRUE = no / FALSE = Original Code
+//              - mNoVertScroll true = no / false = Original Code
 //                the Original Code Paints a Vertical Scroll in wxPagedWindow
 //                the Original Code Paints a Vertical Scroll in wxPagedWindow
-//                which is not needed in this Version. Use TRUE for this.
+//                which is not needed in this Version. Use true for this.
 // Created:     07/09/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Aleksandras Gluchovas
 // Created:     07/09/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Aleksandras Gluchovas
@@ -182,13 +182,13 @@ void wxTabbedWindow::SizeTabs(int x,int y, int width, int height, bool WXUNUSED(
             //info.mpContent->GetEventHandler()->ProcessEvent( evt );
             
             info.mpContent->SetSize( x, y, width, height, 0 );
             //info.mpContent->GetEventHandler()->ProcessEvent( evt );
             
             info.mpContent->SetSize( x, y, width, height, 0 );
-            info.mpContent->Show(TRUE);
+            info.mpContent->Show(true);
             info.mpContent->Refresh();
             
         }
         else
         {
             info.mpContent->Refresh();
             
         }
         else
         {
-            info.mpContent->Show(FALSE);
+            info.mpContent->Show(false);
         }
         
         pTabNode = pTabNode->GetNext();
         }
         
         pTabNode = pTabNode->GetNext();
@@ -217,11 +217,11 @@ void wxTabbedWindow::AddTab( wxWindow*   pContent,
     
     
     if ( pContent->GetParent() == NULL )
     
     
     if ( pContent->GetParent() == NULL )
-        pContent->Create( this, -1 );
+        pContent->Create( this, wxID_ANY );
     
     mTabs.Append( (wxObject*)pTab );
     
     
     mTabs.Append( (wxObject*)pTab );
     
-    RecalcLayout(TRUE);
+    RecalcLayout(true);
     
     OnTabAdded( pTab );
 }
     
     OnTabAdded( pTab );
 }
@@ -239,10 +239,10 @@ void wxTabbedWindow::AddTab( wxWindow* pContent,
         pTab->mBitMap = *pImage;
     
     if ( pContent->GetParent() == NULL )
         pTab->mBitMap = *pImage;
     
     if ( pContent->GetParent() == NULL )
-        pContent->Create( this, -1 );
+        pContent->Create( this, wxID_ANY );
     
     mTabs.Append( (wxObject*)pTab );
     
     mTabs.Append( (wxObject*)pTab );
-    RecalcLayout(TRUE);
+    RecalcLayout(true);
     OnTabAdded( pTab );
 }
 
     OnTabAdded( pTab );
 }
 
@@ -282,7 +282,7 @@ wxWindow* wxTabbedWindow::GetActiveTab()
 void wxTabbedWindow::SetActiveTab( int tabNo )
 {
     mActiveTab = tabNo;
 void wxTabbedWindow::SetActiveTab( int tabNo )
 {
     mActiveTab = tabNo;
-    RecalcLayout(TRUE);
+    RecalcLayout(true);
     Refresh();
 }
 
     Refresh();
 }
 
@@ -490,7 +490,7 @@ void wxTabbedWindow::HideInactiveTabs( bool andRepaint )
         if ( tabNo != mActiveTab )
         {
             twTabInfo& tab = *((twTabInfo*)(pNode->GetData()));
         if ( tabNo != mActiveTab )
         {
             twTabInfo& tab = *((twTabInfo*)(pNode->GetData()));
-            tab.mpContent->Show(FALSE);
+            tab.mpContent->Show(false);
         }
         
         pNode = pNode->GetNext();
         }
         
         pNode = pNode->GetNext();
@@ -656,7 +656,7 @@ void wxTabbedWindow::OnPaint( wxPaintEvent& WXUNUSED(event) )
 void wxTabbedWindow::OnSize ( wxSizeEvent& WXUNUSED(event) )
 {
     SetBackgroundColour( wxColour( 192,192,192 ) );
 void wxTabbedWindow::OnSize ( wxSizeEvent& WXUNUSED(event) )
 {
     SetBackgroundColour( wxColour( 192,192,192 ) );
-    RecalcLayout(TRUE);
+    RecalcLayout(true);
 }
 
 //---------------------------------------------------------------------------
 }
 
 //---------------------------------------------------------------------------
@@ -704,21 +704,21 @@ END_EVENT_TABLE()
 //---------------------------------------------------------------------------
 wxPagedWindow::wxPagedWindow()
 
 //---------------------------------------------------------------------------
 wxPagedWindow::wxPagedWindow()
 
-:   mScrollEventInProgress( FALSE ),
+:   mScrollEventInProgress( false ),
     mTabTrianGap(4),
     mWhiteBrush( wxColour(255,255,255), wxSOLID ),
     mGrayBrush ( wxColour(192,192,192), wxSOLID ),
     mCurentRowOfs( 0 ),
     mAdjustableTitleRowLen( 300 ),
     mTabTrianGap(4),
     mWhiteBrush( wxColour(255,255,255), wxSOLID ),
     mGrayBrush ( wxColour(192,192,192), wxSOLID ),
     mCurentRowOfs( 0 ),
     mAdjustableTitleRowLen( 300 ),
-    mIsDragged    ( FALSE ),
+    mIsDragged    ( false ),
     mDagOrigin    ( 0 ),
     mDagOrigin    ( 0 ),
-    mCursorChanged( FALSE ),
+    mCursorChanged( false ),
     mResizeCursor ( wxCURSOR_SIZEWE ),
     mNormalCursor ( wxCURSOR_ARROW  )
 {
     mTitleVertGap = 2;
     mTitleHorizGap = 10;
     mResizeCursor ( wxCURSOR_SIZEWE ),
     mNormalCursor ( wxCURSOR_ARROW  )
 {
     mTitleVertGap = 2;
     mTitleHorizGap = 10;
-    mNoVertScroll = TRUE;       // Horizontale Scroll abschalten
+    mNoVertScroll = true;       // Horizontale Scroll abschalten
 }
 
 //---------------------------------------------------------------------------
 }
 
 //---------------------------------------------------------------------------
@@ -750,7 +750,7 @@ void wxPagedWindow::OnTabAdded( twTabInfo* WXUNUSED(pInfo) )
 {
     int units = GetWholeTabRowLen() / 20;
     
 {
     int units = GetWholeTabRowLen() / 20;
     
-    mpTabScroll->SetScrollbar( 0, 1, units, 1, FALSE );
+    mpTabScroll->SetScrollbar( 0, 1, units, 1, false );
 }
 
 //---------------------------------------------------------------------------
 }
 
 //---------------------------------------------------------------------------
@@ -964,18 +964,18 @@ void wxPagedWindow::RecalcLayout(bool andRepaint)
     if ( !mpTabScroll )
     {
         mpTabScroll   =
     if ( !mpTabScroll )
     {
         mpTabScroll   =
-            new wxScrollBar( this, -1, wxDefaultPosition, wxDefaultSize, wxSB_HORIZONTAL );
+            new wxScrollBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSB_HORIZONTAL );
         
         mpHorizScroll =
         
         mpHorizScroll =
-            new wxScrollBar( this, -1, wxDefaultPosition, wxDefaultSize, wxSB_HORIZONTAL );
+            new wxScrollBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSB_HORIZONTAL );
         if (!mNoVertScroll)       // Vertical Scroll (Original)
         if (!mNoVertScroll)       // Vertical Scroll (Original)
-            mpVertScroll = new wxScrollBar( this, -1, wxDefaultPosition, wxDefaultSize, wxSB_VERTICAL );
+            mpVertScroll = new wxScrollBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSB_VERTICAL );
     }
     
     {
         int units = GetWholeTabRowLen() / 20;
         
     }
     
     {
         int units = GetWholeTabRowLen() / 20;
         
-        mpTabScroll->SetScrollbar( 0, 1, units, 1, FALSE );
+        mpTabScroll->SetScrollbar( 0, 1, units, 1, false );
     }
     
     // resetup position of the active tab
     }
     
     // resetup position of the active tab
@@ -1080,7 +1080,7 @@ void wxPagedWindow::OnLButtonDown( wxMouseEvent& event )
 {
     if ( mCursorChanged )
     {
 {
     if ( mCursorChanged )
     {
-        mIsDragged = TRUE;
+        mIsDragged = true;
         mDagOrigin = event.m_x;
         
         mOriginalTitleRowLen = mAdjustableTitleRowLen;
         mDagOrigin = event.m_x;
         
         mOriginalTitleRowLen = mAdjustableTitleRowLen;
@@ -1098,8 +1098,8 @@ void wxPagedWindow::OnLButtonUp( wxMouseEvent& WXUNUSED(event) )
 {
     if ( mIsDragged )
     {
 {
     if ( mIsDragged )
     {
-        mIsDragged     = FALSE;
-        mCursorChanged = FALSE;
+        mIsDragged     = false;
+        mCursorChanged = false;
         SetCursor( mNormalCursor );
         
         ReleaseMouse();
         SetCursor( mNormalCursor );
         
         ReleaseMouse();
@@ -1126,7 +1126,7 @@ void wxPagedWindow::OnMouseMove( wxMouseEvent& event )
             {
                 SetCursor( mResizeCursor );
                 
             {
                 SetCursor( mResizeCursor );
                 
-                mCursorChanged = TRUE;
+                mCursorChanged = true;
             }
         }
         else
             }
         }
         else
@@ -1134,7 +1134,7 @@ void wxPagedWindow::OnMouseMove( wxMouseEvent& event )
             {
                 SetCursor( mNormalCursor );
                 
             {
                 SetCursor( mNormalCursor );
                 
-                mCursorChanged = FALSE;
+                mCursorChanged = false;
             }
     }
     else
             }
     }
     else
@@ -1149,7 +1149,7 @@ void wxPagedWindow::OnMouseMove( wxMouseEvent& event )
             wxWindowDC dc(this);
             DrawDecorations( dc );
             
             wxWindowDC dc(this);
             DrawDecorations( dc );
             
-            RecalcLayout(FALSE);
+            RecalcLayout(false);
             
             //Refresh();
         }
             
             //Refresh();
         }
@@ -1181,7 +1181,7 @@ void wxPagedWindow::OnScroll( wxScrollEvent& event )
     {
         if ( !mScrollEventInProgress )
         {
     {
         if ( !mScrollEventInProgress )
         {
-            mScrollEventInProgress = TRUE;
+            mScrollEventInProgress = true;
             
             GetActiveTab()->GetEventHandler()->ProcessEvent( event );
         }
             
             GetActiveTab()->GetEventHandler()->ProcessEvent( event );
         }
@@ -1190,7 +1190,7 @@ void wxPagedWindow::OnScroll( wxScrollEvent& event )
             // event bounced back to us, from here we
             // know that it has traveled the loop - thus it's processed!
             
             // event bounced back to us, from here we
             // know that it has traveled the loop - thus it's processed!
             
-            mScrollEventInProgress = FALSE;
+            mScrollEventInProgress = false;
         }
     }
 }  // wxPagedWindow::OnScroll()
         }
     }
 }  // wxPagedWindow::OnScroll()
index f6f63e74e12ea536a586f86cc692f4bfb325a806..00efb89929b3464bf1a676e882189f105b97bc57 100644 (file)
@@ -8,9 +8,9 @@
 //              - restruction of Variable declaration
 //              - to prevent Warnings under MingGW32
 // Modified by: 19990909 : mj
 //              - restruction of Variable declaration
 //              - to prevent Warnings under MingGW32
 // Modified by: 19990909 : mj
-//              - mNoVertScroll TRUE = no / FALSE = Original Code
+//              - mNoVertScroll true = no / false = Original Code
 //                the Original Code Paints a Vertical Scroll in wxPagedWindow
 //                the Original Code Paints a Vertical Scroll in wxPagedWindow
-//                which is not needed in this Version. Use TRUE for this.
+//                which is not needed in this Version. Use true for this.
 // Created:     07/09/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Aleksandras Gluchovas
 // Created:     07/09/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Aleksandras Gluchovas
@@ -68,7 +68,7 @@ public:
 
 public:
 
 
 public:
 
- // public properties (invoke ReclaclLayout(TRUE) to apply changes)
+ // public properties (invoke ReclaclLayout(true) to apply changes)
 
  int    mVertGap;         // default: 3
  int    mHorizGap;        // default: 5
 
  int    mVertGap;         // default: 3
  int    mHorizGap;        // default: 5
@@ -135,7 +135,7 @@ public:
 
  // should be invoked to redisplay window with changed properties
 
 
  // should be invoked to redisplay window with changed properties
 
- virtual void RecalcLayout( bool andRepaint = TRUE );
+ virtual void RecalcLayout( bool andRepaint = true );
 
  // event handlers
 
 
  // event handlers
 
@@ -180,7 +180,7 @@ public:
  int          mTitleRowStart;
  int          mResizeNailGap;
  int          mTitleRowLen;               // actual title row length
  int          mTitleRowStart;
  int          mResizeNailGap;
  int          mTitleRowLen;               // actual title row length
- int          mNoVertScroll;              // No Vertical Scroll  TRUE/FALSE
+ int          mNoVertScroll;              // No Vertical Scroll  true/false
 
  void DrawPaperBar( twTabInfo& tab, int x, int y,
                                     wxBrush& brush, wxPen& pen, wxDC& dc );
 
  void DrawPaperBar( twTabInfo& tab, int x, int y,
                                     wxBrush& brush, wxPen& pen, wxDC& dc );
@@ -222,7 +222,7 @@ public:
 
  virtual int HitTest( const wxPoint& pos );
 
 
  virtual int HitTest( const wxPoint& pos );
 
- virtual void RecalcLayout( bool andRepaint = TRUE );
+ virtual void RecalcLayout( bool andRepaint = true );
 
  // event handlers
 
 
  // event handlers