]> git.saurik.com Git - wxWidgets.git/commitdiff
removing Makefile.ams (and minor additions/fixes to the samples)
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 8 Nov 1999 15:06:41 +0000 (15:06 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 8 Nov 1999 15:06:41 +0000 (15:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

18 files changed:
Makefile.in
samples/controls/controls.cpp
samples/grid/Makefile.am [deleted file]
samples/help/Makefile.am [deleted file]
samples/help/Makefile.in [new file with mode: 0644]
samples/help/demo.cpp
samples/joytest/Makefile.am [deleted file]
samples/memcheck/Makefile.am [deleted file]
samples/menu/menu.cpp
samples/mfc/Makefile.am [deleted file]
samples/nativdlg/Makefile.am [deleted file]
samples/oleauto/Makefile.am [deleted file]
samples/ownerdrw/Makefile.am [deleted file]
samples/regtest/Makefile.am [deleted file]
samples/richedit/Makefile.am [deleted file]
samples/tab/Makefile.am [deleted file]
samples/taskbar/Makefile.am [deleted file]
samples/text/text.cpp

index da64a1abcfef8d9942191f1f4e0ce27cf93e0ffa..b3b5d62abc32abb7fc5cd61ce826f2732932422a 100644 (file)
@@ -566,7 +566,8 @@ MSW_HEADERS = \
                msw/xpmhand.h
 
 UNIX_HEADERS = \
-               unix/execute.h
+               unix/execute.h \
+               unix/fontutil.h
 
 GENERIC_HEADERS = \
                generic/caret.h \
index 395c4ebc9a172d49a5ebbb1b9443b92ddb09c852..a12beef3b610a7809a1863db80e0f1973e87db20 100644 (file)
@@ -210,10 +210,19 @@ enum
 
 bool MyApp::OnInit()
 {
+    // parse the cmd line
+    int x = 50,
+        y = 50;
+    if ( argc == 2 )
+    {
+        wxSscanf(argv[1], "%d", &x);
+        wxSscanf(argv[2], "%d", &y);
+    }
+
     // Create the main frame window
     MyFrame *frame = new MyFrame((wxFrame *) NULL,
             "Controls wxWindows App",
-            50, 50, 530, 420);
+            x, y, 530, 420);
 
     // Give it an icon
     // The wxICON() macros loads an icon from a resource under Windows
@@ -705,6 +714,8 @@ void MyPanel::OnChangeColour(wxCommandEvent& WXUNUSED(event))
 
 void MyPanel::OnListBox( wxCommandEvent &event )
 {
+    GetParent()->Move(100, 100);
+
     wxListBox *listbox = event.GetId() == ID_LISTBOX ? m_listbox
                                                      : m_listboxSorted;
 
diff --git a/samples/grid/Makefile.am b/samples/grid/Makefile.am
deleted file mode 100644 (file)
index 3631656..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-AUTOMAKE_OPTIONS = 1.3 no-dependencies
-
-SUFFIXES = .cpp
-
-DEFS = @DEFS@ $(TOOLKIT_DEF) $(WXDEBUG_DEFINE)
-
-noinst_PROGRAMS = test
-
-test_SOURCES = test.cpp
diff --git a/samples/help/Makefile.am b/samples/help/Makefile.am
deleted file mode 100644 (file)
index aa599b3..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-AUTOMAKE_OPTIONS = 1.3 no-dependencies
-
-SUFFIXES = .cpp
-
-DEFS = @DEFS@ $(TOOLKIT_DEF) $(WXDEBUG_DEFINE)
-
-noinst_PROGRAMS = demo
-
-demo_SOURCES = demo.cpp
diff --git a/samples/help/Makefile.in b/samples/help/Makefile.in
new file mode 100644 (file)
index 0000000..553a32f
--- /dev/null
@@ -0,0 +1,24 @@
+#
+# File:                makefile.unx
+# Author:      Julian Smart
+# Created:     1998
+# Updated:     
+# Copyright:   (c) 1998 Julian Smart
+#
+# "%W% %G%"
+#
+# Makefile for toolbar example (UNIX).
+
+top_srcdir = @top_srcdir@
+top_builddir = ../..
+program_dir = samples/help
+
+PROGRAM=help
+
+OBJECTS=demo.o
+
+DATAFILES=doc
+
+include ../../src/makeprog.env
+
+
index a2233f7fa715f76ad6daa879bc73508f88f0c6ef..e138ef8a616c42b1039adb21a4617e577bacc4cb 100644 (file)
@@ -71,6 +71,8 @@ public:
     // ctor(s)
     MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
 
+    wxHelpController& GetHelpController() { return m_help; }
+
     // event handlers (these functions should _not_ be virtual)
     void OnQuit(wxCommandEvent& event);
     void OnHelp(wxCommandEvent& event);
@@ -147,9 +149,17 @@ bool MyApp::OnInit()
     frame->Show(TRUE);
     SetTopWindow(frame);
 
-    // success: wxApp::OnRun() will be called which will enter the main message
-    // loop and the application will run. If we returned FALSE here, the
-    // application would exit immediately.
+
+    // initialise the help system: this means that we'll use doc.hlp file under
+    // Windows and that the HTML docs are in the subdirectory doc for platforms
+    // using HTML help
+    if ( !frame->GetHelpController().Initialize("doc") )
+    {
+        wxLogError("Cannot initialize the help system, aborting.");
+
+        return FALSE;
+    }
+
     return TRUE;
 }
 
@@ -174,7 +184,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
     menuFile->AppendSeparator();
     menuFile->Append(HelpDemo_Help_Search, "&Search help...");
 #ifndef __WXMSW__
-#ifndef wxUSE_HTML
+#if !wxUSE_HTML
     menuFile->AppendSeparator();
     menuFile->Append(HelpDemo_Help_KDE, "Use &KDE");
     menuFile->Append(HelpDemo_Help_GNOME, "Use &GNOME");
@@ -203,11 +213,6 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
 
     // and a static control whose parent is the panel
     (void)new wxStaticText(panel, -1, "Hello, world!", wxPoint(10, 10));
-
-    // initialise the help system: this means that we'll use doc.hlp file under
-    // Windows and that the HTML docs are in the subdirectory doc for platforms
-    // using HTML help
-    m_help.Initialize("doc");
 }
 
 
diff --git a/samples/joytest/Makefile.am b/samples/joytest/Makefile.am
deleted file mode 100644 (file)
index 00da0b6..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-SUFFIXES = .cpp
-
-DEFS = @DEFS@ $(TOOLKIT_DEF) $(WXDEBUG_DEFINE)
-
-noinst_PROGRAMS = joytest
-
-joytest_SOURCES = joytest.cpp
diff --git a/samples/memcheck/Makefile.am b/samples/memcheck/Makefile.am
deleted file mode 100644 (file)
index 5658a0f..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-AUTOMAKE_OPTIONS = 1.3 no-dependencies
-
-SUFFIXES = .cpp
-
-DEFS = @DEFS@ $(TOOLKIT_DEF) $(WXDEBUG_DEFINE)
-
-noinst_PROGRAMS = memcheck
-
-memcheck_SOURCES = memcheck.cpp
index 3dae64323a73cf154ee2a33c27f28bcc5fdc6533..b4fa149155cd2f8ca796f9fd7f9897218f8d08cb 100644 (file)
@@ -556,7 +556,7 @@ void MyFrame::OnRightDown(wxMouseEvent &event )
     menu.AppendSeparator();
     menu.Append(Menu_File_Quit, "E&xit");
 
-    menu.Delete(Menu_Popup_ToBeDeleted);
+    //menu.Delete(Menu_Popup_ToBeDeleted);
     menu.Check(Menu_Popup_ToBeChecked, TRUE);
     menu.Enable(Menu_Popup_ToBeGreyed, FALSE);
 
diff --git a/samples/mfc/Makefile.am b/samples/mfc/Makefile.am
deleted file mode 100644 (file)
index d02a556..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-SUFFIXES = .cpp
-
-DEFS = @DEFS@ $(TOOLKIT_DEF) $(WXDEBUG_DEFINE)
-
-noinst_PROGRAMS = mfctest
-
-mfctest_SOURCES = mfctest.cpp
diff --git a/samples/nativdlg/Makefile.am b/samples/nativdlg/Makefile.am
deleted file mode 100644 (file)
index b057d63..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-SUFFIXES = .cpp
-
-DEFS = @DEFS@ $(TOOLKIT_DEF) $(WXDEBUG_DEFINE)
-
-noinst_PROGRAMS = nativdlg
-
-nativdlg_SOURCES = nativdlg.cpp
diff --git a/samples/oleauto/Makefile.am b/samples/oleauto/Makefile.am
deleted file mode 100644 (file)
index 536e8eb..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-SUFFIXES = .cpp
-
-DEFS = @DEFS@ $(TOOLKIT_DEF) $(WXDEBUG_DEFINE)
-
-noinst_PROGRAMS = oleauto
-
-oleauto_SOURCES = oleauto.cpp
diff --git a/samples/ownerdrw/Makefile.am b/samples/ownerdrw/Makefile.am
deleted file mode 100644 (file)
index ec41d2e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-SUFFIXES = .cpp
-
-DEFS = @DEFS@ $(TOOLKIT_DEF) $(WXDEBUG_DEFINE)
-
-noinst_PROGRAMS = ownerdrw
-
-ownerdrw_SOURCES = ownerdrw.cpp
diff --git a/samples/regtest/Makefile.am b/samples/regtest/Makefile.am
deleted file mode 100644 (file)
index 4502b0b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-SUFFIXES = .cpp
-
-DEFS = @DEFS@ $(TOOLKIT_DEF) $(WXDEBUG_DEFINE)
-
-noinst_PROGRAMS = regtest
-
-regtest_SOURCES = regtest.cpp
diff --git a/samples/richedit/Makefile.am b/samples/richedit/Makefile.am
deleted file mode 100644 (file)
index 46e100d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-SUFFIXES = .cpp
-
-DEFS = @DEFS@ $(TOOLKIT_DEF) $(WXDEBUG_DEFINE)
-
-noinst_PROGRAMS = wxLayout
-
-wxLayout_SOURCES = wxLayout.cpp kbList.cpp wxllist.cpp wxlparser.cpp wxlwindow.cpp
diff --git a/samples/tab/Makefile.am b/samples/tab/Makefile.am
deleted file mode 100644 (file)
index d53aac5..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-SUFFIXES = .cpp
-
-DEFS = @DEFS@ $(TOOLKIT_DEF) $(WXDEBUG_DEFINE)
-
-noinst_PROGRAMS = test
-
-test_SOURCES = test.cpp
diff --git a/samples/taskbar/Makefile.am b/samples/taskbar/Makefile.am
deleted file mode 100644 (file)
index 99b7a95..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-SUFFIXES = .cpp
-
-DEFS = @DEFS@ $(TOOLKIT_DEF) $(WXDEBUG_DEFINE)
-
-noinst_PROGRAMS = tbtest
-
-tbtest_SOURCES = tbtest.cpp
index ee6a8387ef9740f6d70e97637be0c1330eb55097..19c5af35a5f45f2306b6270471b7e9dc7f78d195 100644 (file)
@@ -126,6 +126,7 @@ public:
     void OnMoveToEndOfEntry( wxCommandEvent &event )
         { m_panel->DoMoveToEndOfEntry(); }
 
+    void OnLogClear(wxCommandEvent& event);
     void OnFileLoad(wxCommandEvent& event);
 
     void OnIdle( wxIdleEvent& event );
@@ -151,6 +152,7 @@ enum
     TEXT_QUIT = 100,
     TEXT_ABOUT,
     TEXT_LOAD,
+    TEXT_CLEAR,
 
     // clipboard menu
     TEXT_CLIPBOARD_COPY = 200,
@@ -173,6 +175,8 @@ bool MyApp::OnInit()
     frame->SetSizeHints( 500, 400 );
 
     wxMenu *file_menu = new wxMenu;
+    file_menu->Append(TEXT_CLEAR, "&Clear the log\tCtrl-C",
+                      "Clear the log window contents");
     file_menu->Append(TEXT_LOAD, "&Load file\tCtrl-O",
                       "Load the sample file into text control");
     file_menu->AppendSeparator();
@@ -601,6 +605,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
     EVT_MENU(TEXT_QUIT,   MyFrame::OnQuit)
     EVT_MENU(TEXT_ABOUT,  MyFrame::OnAbout)
     EVT_MENU(TEXT_LOAD,   MyFrame::OnFileLoad)
+    EVT_MENU(TEXT_CLEAR,  MyFrame::OnLogClear)
 
 #if wxUSE_TOOLTIPS
     EVT_MENU(TEXT_TOOLTIPS_SETDELAY,  MyFrame::OnSetTooltipDelay)
@@ -633,6 +638,9 @@ void MyFrame::OnQuit (wxCommandEvent& WXUNUSED(event) )
 
 void MyFrame::OnAbout( wxCommandEvent& WXUNUSED(event) )
 {
+    SetSize(40, 40, 200, 200);
+    return;
+
     wxBeginBusyCursor();
 
     wxMessageDialog dialog(this,
@@ -683,6 +691,11 @@ void MyFrame::OnToggleTooltips(wxCommandEvent& event)
 }
 #endif // tooltips
 
+void MyFrame::OnLogClear(wxCommandEvent& WXUNUSED(event))
+{
+    m_panel->m_log->Clear();
+}
+
 void MyFrame::OnFileLoad(wxCommandEvent& event)
 {
     if ( m_panel->m_multitext->LoadFile("text.rc") )