]> git.saurik.com Git - wxWidgets.git/commitdiff
Made various Motif fixes, wxListBox/wxChoice derive from wxControlWithItems,
authorJulian Smart <julian@anthemion.co.uk>
Mon, 8 Nov 1999 14:53:39 +0000 (14:53 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 8 Nov 1999 14:53:39 +0000 (14:53 +0000)
added release.txt

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

17 files changed:
distrib/msw/generic.rsp
distrib/msw/makefile.rsp
docs/readme.txt
docs/release.txt [new file with mode: 0644]
include/wx/generic/spinctlg.h
include/wx/motif/choice.h
include/wx/motif/listbox.h
samples/controls/controls.cpp
samples/html/helpview/helpview.cpp
samples/printing/printing.cpp
samples/printing/printing.h
src/common/prntbase.cpp
src/generic/helpwxht.cpp
src/makeprog.vc
src/motif/choice.cpp
src/motif/listbox.cpp
src/motif/menu.cpp

index 0beb8d0c1b6090c6e73b4922548fe32ebdacc858..81e4d3e7277e1a779a80b77955bd4e379251fbc1 100644 (file)
@@ -663,6 +663,8 @@ samples/internat/*.bmp
 samples/internat/*.mo
 samples/internat/fr/*.mo
 samples/internat/fr/*.po
+samples/internat/de/*.mo
+samples/internat/de/*.po
 
 samples/checklst/*.cpp
 samples/checklst/*.h
@@ -729,6 +731,10 @@ samples/image/*.bmp
 samples/image/*.xpm
 samples/image/*.xbm
 samples/image/*.png
+samples/image/*.pnm
+samples/image/*.pcx
+samples/image/*.jpg
+samples/image/*.gif
 samples/image/*.ico
 samples/image/*.txt
 
@@ -1024,15 +1030,3 @@ samples/menu/*.png
 samples/menu/*.ico
 samples/menu/*.txt
 
-samples/font/*.cpp
-samples/font/*.h
-samples/font/makefile*
-samples/font/*.rc
-samples/font/*.def
-samples/font/*.bmp
-samples/font/*.xpm
-samples/font/*.xbm
-samples/font/*.png
-samples/font/*.ico
-samples/font/*.txt
-
index 8f8404cd073aa36e08b9bef7f44ae5d187b3f771..187845785b3807d61712c9e53d74e2ddcbe319fd 100644 (file)
@@ -34,6 +34,7 @@ samples/printing/Makefile.in
 samples/proplist/Makefile.in
 samples/sashtest/Makefile.in
 samples/scroll/Makefile.in
+samples/scrollsub/Makefile.in
 samples/splitter/Makefile.in
 samples/text/Makefile.in
 samples/thread/Makefile.in
@@ -46,6 +47,9 @@ samples/wxpoem/Makefile.in
 samples/wxsocket/Makefile.in
 samples/nettest/Makefile.in
 samples/scrollsub/Makefile.in
+samples/font/Makefile.in
+samples/menu/Makefile.in
+samples/console/Makefile.in
 utils/glcanvas/motif/Makefile.in
 utils/Makefile.in
 utils/wxMMedia2/Makefile.in
@@ -76,4 +80,13 @@ samples/resource/Makefile.am
 samples/richedit/Makefile.am
 samples/tab/Makefile.am
 samples/taskbar/Makefile.am
+samples/scrollsub/Makefile.am
+samples/font/Makefile.am
+samples/menu/Makefile.am
+samples/drawing/Makefile.am
+samples/scroll/Makefile.am
+samples/scrollsub/Makefile.am
+samples/console/Makefile.am
+samples/wizard/Makefile.am
+utils/glcanvas/motif/Makefile.am
 src/msw/Makefile.am
index 35b57e4e97f7de911f5320824884f21adce094f0..cb0634e350b5c7fd0641bb3012f77e00d8ddb885 100644 (file)
@@ -32,13 +32,15 @@ wxWindows 2.1.11
   maintenance.
 - Ability to compile library in console (non-GUI) mode.
 - Integration of wxHTML widget and help controller into
-  wxWindows. wxHTML allows HTML viewing and printing.
+  wxWindows. wxHTML allows HTML viewing and printing (wxGTK
+  and wxMSW, partial support in wxMotif).
 - New classes wxChrono, wxDialUpManager, wxFontEnumerator,
   wxWizard, wxStaticLine, etc.
 - wxShowTip for showing 'startup tips' to the user.
 - wxSocket and wxThread classes rewritten.
 - New, consistent drag and drop API (not wxMotif).
-- Better-looking dialogs in wxGTK.
+- Better-looking dialogs in wxGTK; native message box used
+  in wxMotif.
 - wxSizers reimplemented and used to specify window layout
   for some generic dialogs.
 - New, more sophisticated wxGrid class (in beta). The old grid
@@ -167,9 +169,16 @@ commercial applications using wxWindows.
 Documentation
 -------------
 
-See docs/changes.txt for a detailed history of changes to wxWindows 2.
+See docs/release.txt for some notes about the current release.
+
+See docs/bugs.txt for a bug list: this file is new and will initially
+  be edited by hand, later generated from a web-based bug database.
+
 See docs/html/index.htm for an HTML index of the major documents.
 
+See docs/changes.txt for a detailed history of changes to wxWindows 2
+  (not up-to-date).
+
 The Windows help files are located in docs/winhelp.
 The PDF help files are located in docs/pdf.
 
diff --git a/docs/release.txt b/docs/release.txt
new file mode 100644 (file)
index 0000000..ab13ab2
--- /dev/null
@@ -0,0 +1,34 @@
+wxWindows Release Notes
+-----------------------
+
+2.1.11
+======
+
+- wxMenu no longer takes a wxFunction argument: either use
+  event handlers in the menu's host window or set WXWIN_COMPATIBILITY
+  to 1 in setup.h, and recompile.
+
+- wxMotif still lags behind other ports but is in much better
+  shape than the 2.0.1 distribution.
+
+- Clipboard/drag and drop is still not implemented in wxMotif.
+
+- The new wxGrid implementation is in beta, but the original
+  implementation can be restored by setting wxUSE_NEW_GRID
+  to 0 (in wxMSW) or passing --disable-newgrid to configure
+  (wxGTK/wxMSW). Pass --enable-newgrid to configure to enable
+  the new implementation.
+
+- wxHTML is partially working in wxMotif. The About sample
+  works, but the others exhibit refresh problems. So light
+  use of wxHTML is recommended on wxMotif.
+
+- The wxHTML helpview application crashes on exit if
+  using VC++ 6 in release mode and loading a large amount of
+  HTML (such as the wxWindows manual generated using Tex2RTF).
+  This may be a compiler problem and will be investigated
+  for 2.1.12.
+
+- wxHTML printing has spacing problems under Windows, and may not
+  work fully under Unix. Hopefully this will be resolved for 2.1.12.
+  
index 288758c6f0363fec677cdfc669faf97c90013034..02d26def7d2e8137f2b1cd895f013f4289a64a99 100644 (file)
@@ -44,11 +44,12 @@ public:
                 int min = 0, int max = 100, int initial = 0,
                 const wxString& name = _T("wxSpinCtrl"))
     {
-        SetValue(initial);
         SetRange(min, max);
 
-        return wxTextCtrl::Create(parent, id, value, pos, size, style,
+        bool val = wxTextCtrl::Create(parent, id, value, pos, size, style,
                                   wxDefaultValidator, name);
+        SetValue(initial);
+        return value;
     }
 
     // accessors
index 18f80ca5bd563376c0638806b91f3cd4d14c7da0..5171d41fe979e160073dc8d9afe082951f209ec8 100644 (file)
 #pragma interface "choice.h"
 #endif
 
-#include "wx/control.h"
+#include "wx/ctrlsub.h"
 
 WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr;
 
 // Choice item
-class WXDLLEXPORT wxChoice: public wxControl
+class WXDLLEXPORT wxChoice: public wxControlWithItems
 {
     DECLARE_DYNAMIC_CLASS(wxChoice)
 
@@ -48,6 +48,21 @@ public:
             const wxValidator& validator = wxDefaultValidator,
             const wxString& name = wxChoiceNameStr);
 
+    // Virtual functions required by wxControlWithItems.
+    // They are not all implemented yet :-(
+    virtual int GetCount() const;
+    virtual int DoAppend(const wxString& item);
+    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void DoSetItems(const wxArrayString& items, void **clientData);
+    virtual void DoSetFirstItem(int n);
+    virtual void DoSetItemClientData(int n, void* clientData);
+    virtual void* DoGetItemClientData(int n) const;
+    virtual void DoSetItemClientObject(int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(int n) const;
+    virtual void Select(int n);
+    virtual void SetString(int n, const wxString& s);
+
+    // Original API
     virtual void Append(const wxString& item);
     virtual void Delete(int n);
     virtual void Clear();
index d7585a547e6dd9ddeccc6d78672bda2dd0d050df..6f352ec72878209041543fa2a43dd2a6b98c96a9 100644 (file)
@@ -16,7 +16,7 @@
 #pragma interface "listbox.h"
 #endif
 
-#include "wx/control.h"
+#include "wx/ctrlsub.h"
 
 WXDLLEXPORT_DATA(extern const char*) wxListBoxNameStr;
 
@@ -26,7 +26,7 @@ class WXDLLEXPORT wxArrayInt;
 WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
 
 // List box item
-class WXDLLEXPORT wxListBox: public wxControl
+class WXDLLEXPORT wxListBox: public wxControlWithItems
 {
 DECLARE_DYNAMIC_CLASS(wxListBox)
 
@@ -54,6 +54,19 @@ public:
 
     ~wxListBox();
 
+    // Virtual functions required by wxControlWithItems.
+    // They are not all implemented yet :-(
+    virtual int GetCount() const;
+    virtual int DoAppend(const wxString& item);
+    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void DoSetItems(const wxArrayString& items, void **clientData);
+    virtual void DoSetFirstItem(int n);
+    virtual void DoSetItemClientData(int n, void* clientData);
+    virtual void* DoGetItemClientData(int n) const;
+    virtual void DoSetItemClientObject(int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(int n) const;
+    virtual void Select(int n);
+
     virtual void Append(const wxString& item);
     virtual void Append(const wxString& item, void *clientData);
     virtual void Set(int n, const wxString* choices, void **clientData = NULL);
index 79ffa750a23c38418a56e14313e43b9193e64c3a..395c4ebc9a172d49a5ebbb1b9443b92ddb09c852 100644 (file)
@@ -221,7 +221,8 @@ bool MyApp::OnInit()
 
     frame->SetIcon( wxICON(mondrian) );
 
-    wxMenu *file_menu = new wxMenu("",  wxMENU_TEAROFF );
+    wxMenu *file_menu = new wxMenu("",  wxMENU_TEAROFF);
+
     file_menu->Append(MINIMAL_ABOUT, "&About\tF1");
     file_menu->AppendSeparator();
     file_menu->Append(MINIMAL_QUIT, "E&xit\tAlt-X", "Quit controls sample");
@@ -476,8 +477,10 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
     m_choiceSorted = new wxChoice( panel, ID_CHOICE_SORTED, wxPoint(10,70), wxSize(120,-1),
                                    5, choices, wxCB_SORT );
 
+#ifndef __WXMOTIF__
     SetControlClientData("choice", m_choice);
     SetControlClientData("choice", m_choiceSorted);
+#endif
 
     m_choice->SetSelection(2);
     m_choice->SetBackgroundColour( "red" );
index feacd02b9971a8a8e7fb302c44a421278e08fb9e..5992be07a6be6fc905d05009af90b3108c18393d 100644 (file)
@@ -25,6 +25,7 @@
 #include <wx/image.h>
 #include <wx/wxhtml.h>
 #include <wx/fs_zip.h>
+#include <wx/log.h>
 
 // ----------------------------------------------------------------------------
 // private classes
@@ -56,6 +57,10 @@ IMPLEMENT_APP(MyApp)
 
 bool MyApp::OnInit()
 {
+#ifdef __WXMOTIF__
+    delete wxLog::SetActiveTarget(new wxLogStderr); // So dialog boxes aren't used
+#endif
+
     wxInitAllImageHandlers();
     wxFileSystem::AddHandler(new wxZipFSHandler);
 
@@ -72,6 +77,10 @@ bool MyApp::OnInit()
     for (int i = 1; i < argc; i++)
         help -> AddBook(argv[i]);
 
+#ifdef __WXMOTIF__
+    delete wxLog::SetActiveTarget(new wxLogGui);
+#endif
+
     help -> DisplayContents();
 
     return TRUE;
index 2c9a75dde16f3705553c58dae977bcf2dc84440d..04d721a4af9ca8c54915ef8b1f1ff6bb738013e2 100644 (file)
@@ -1,13 +1,13 @@
-/*
-* File:        printing.cc
-* Purpose:     Printing demo for wxWindows class library
-* Author:      Julian Smart
-* Created:     1995
-* Updated:     
-* Copyright:   (c) 1995, AIAI, University of Edinburgh
-*/
-
-/* static const char sccsid[] = "%W% %G%"; */
+/////////////////////////////////////////////////////////////////////////////
+// Name:        printing.cpp
+// Purpose:     Printing demo for wxWindows
+// Author:      Julian Smart
+// Modified by:
+// Created:     1995
+// RCS-ID:      $Id$
+// Copyright:   (c) Julian Smart
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
 #pragma implementation
@@ -290,6 +290,8 @@ void MyFrame::OnPrintAbout(wxCommandEvent& WXUNUSED(event))
 
 void MyFrame::Draw(wxDC& dc)
 {
+    dc.SetBackground(*wxWHITE_BRUSH);
+    dc.Clear();
     dc.SetFont(* wxGetApp().m_testFont);
     
     dc.SetBackgroundMode(wxTRANSPARENT);
index d9df02dfbbe7f11b20e39ebca7a0cbc8ac2a1c2a..13933bb91fa72c9ea2640df743ab8c131278d968 100644 (file)
@@ -1,13 +1,13 @@
-/*
- * File:       printing.h
- * Purpose:    Printing demo for wxWindows class library
- * Author:     Julian Smart
- * Created:    1995
- * Updated:    
- * Copyright:   (c) 1995, AIAI, University of Edinburgh
- */
-
-/* sccsid[] = "%W% %G%" */
+/////////////////////////////////////////////////////////////////////////////
+// Name:        printing.h
+// Purpose:     Printing demo for wxWindows
+// Author:      Julian Smart
+// Modified by:
+// Created:     1995
+// RCS-ID:      $Id$
+// Copyright:   (c) Julian Smart
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
 #pragma interface
index a71fcb47a70d0e6b3e6f601bcd7553968b086f66..ce52bc53fd21da2a389966a763f4c3222cc646ba 100644 (file)
@@ -384,14 +384,21 @@ void wxPreviewControlBar::CreateButtons()
             "120%", "150%", "200%"
         };
 
-        m_zoomControl = new wxChoice(this, wxID_PREVIEW_ZOOM,
-                                     wxPoint(x, y), wxSize(100, -1));
-                               
-        // Yes, this look stupid, but this is because gcc gives up otherwise.
         int n = WXSIZEOF(choices);
-// Someone is calling methods that do no exist in wxChoice!! So I'll just comment out for VA for now
-        for ( int i = 0; i < n; i++ )
-           m_zoomControl->Append(choices[i]);
+
+        wxString* strings = new wxString[n];
+        int i;
+        for (i = 0; i < n; i++ )
+           strings[i] = choices[i];
+
+        m_zoomControl = new wxChoice(this, wxID_PREVIEW_ZOOM,
+                                     wxPoint(x, y),
+                                     wxSize(100, -1),
+                                     n,
+                                     strings
+                                    );
+        delete[] strings;
+
         SetZoomControl(m_printPreview->GetZoom());
     }
 
index b16312f6ab07e1cc3109a67b5bcc7e1609bb4c7f..f4ca7a115e73df65cd1025d8a9eb4a8c7ca9cdb3 100644 (file)
@@ -1,6 +1,6 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        helpext.cpp
-// Purpose:     an external help controller for wxWindows
+// Name:        helpwxht.cpp
+// Purpose:     A help controller using the wxHTML classes
 // Author:      Karsten Ballueder
 // Modified by:
 // Created:     04/01/98
index d7c0d79be48b734ba103a022c6e73f065aab80cb..e938d7c78cb54751f747d056fb22c3f6bb2fc471 100644 (file)
@@ -11,7 +11,7 @@
 # info
 
 # Set WXDIR for your system
-WXDIR = j:\dev\wx2\wxWindows
+WXDIR = $(WXWIN)
 
 WXUSINGDLL=0
 
index 71981d44d2be7c6b5adde7f17eda235854e0fbd0..1647c35bc1bf3811010431f3194f00a204f79170 100644 (file)
@@ -477,3 +477,77 @@ void wxChoice::ChangeForegroundColour()
     for (i = 0; i < m_noStrings; i++)
         DoChangeForegroundColour(m_widgetList[i], m_foregroundColour);
 }
+
+
+// These implement functions needed by wxControlWithItems.
+// Unfortunately, they're not all implemented yet.
+
+int wxChoice::GetCount() const
+{
+    return Number();
+}
+
+int wxChoice::DoAppend(const wxString& item)
+{
+    Append(item);
+    return GetCount() - 1;
+}
+
+// Just appends, doesn't yet insert
+void wxChoice::DoInsertItems(const wxArrayString& items, int WXUNUSED(pos))
+{
+    size_t nItems = items.GetCount();
+
+    for ( size_t n = 0; n < nItems; n++ )
+    {
+        Append( items[n]);
+    }
+}
+
+void wxChoice::DoSetItems(const wxArrayString& items, void **WXUNUSED(clientData))
+{
+    Clear();
+    size_t nItems = items.GetCount();
+
+    for ( size_t n = 0; n < nItems; n++ )
+    {
+        Append(items[n]);
+    }
+}
+
+void wxChoice::DoSetFirstItem(int WXUNUSED(n))
+{
+    wxFAIL_MSG( wxT("wxChoice::DoSetFirstItem not implemented") );
+}
+
+void wxChoice::DoSetItemClientData(int WXUNUSED(n), void* WXUNUSED(clientData))
+{
+    wxFAIL_MSG( wxT("wxChoice::DoSetItemClientData not implemented") );
+}
+
+void* wxChoice::DoGetItemClientData(int WXUNUSED(n)) const
+{
+    wxFAIL_MSG( wxT("wxChoice::DoGetItemClientData not implemented") );
+    return (void*) NULL;
+}
+
+void wxChoice::DoSetItemClientObject(int WXUNUSED(n), wxClientData* WXUNUSED(clientData))
+{
+    wxFAIL_MSG( wxT("wxChoice::DoSetItemClientObject not implemented") );
+}
+
+wxClientData* wxChoice::DoGetItemClientObject(int WXUNUSED(n)) const
+{
+    wxFAIL_MSG( wxT("wxChoice::DoGetItemClientObject not implemented") );
+    return (wxClientData*) NULL;
+}
+
+void wxChoice::Select(int n)
+{
+    SetSelection(n);
+}
+
+void wxChoice::SetString(int WXUNUSED(n), const wxString& WXUNUSED(s))
+{
+    wxFAIL_MSG( wxT("wxChoice::SetString not implemented") );
+}
index 25fbfdf546a1bfc0b725b7ec56617e8539bfae9b..178a552e3874f1140601b06c3614304279e25489 100644 (file)
@@ -786,4 +786,71 @@ void wxListBox::ChangeForegroundColour()
     */
 }
 
+// These implement functions needed by wxControlWithItems.
+// Unfortunately, they're not all implemented yet.
 
+int wxListBox::GetCount() const
+{
+    return Number();
+}
+
+int wxListBox::DoAppend(const wxString& item)
+{
+    Append(item, (void*) NULL);
+    return GetCount() - 1;
+}
+
+// Just appends, doesn't yet insert
+void wxListBox::DoInsertItems(const wxArrayString& items, int WXUNUSED(pos))
+{
+    size_t nItems = items.GetCount();
+
+    for ( size_t n = 0; n < nItems; n++ )
+    {
+        Append( items[n], (void*) NULL);
+    }
+}
+
+void wxListBox::DoSetItems(const wxArrayString& items, void **clientData)
+{
+    size_t nItems = items.GetCount();
+    wxString* strings = new wxString[nItems];
+
+    for ( size_t n = 0; n < nItems; n++ )
+    {
+        strings[n] = items[n];
+    }
+    Set(nItems, strings, clientData);
+
+    delete[] strings;
+}
+
+void wxListBox::DoSetFirstItem(int WXUNUSED(n))
+{
+    wxFAIL_MSG( wxT("wxListBox::DoSetFirstItem not implemented") );
+}
+
+void wxListBox::DoSetItemClientData(int n, void* clientData)
+{
+    SetClientData(n, clientData);
+}
+
+void* wxListBox::DoGetItemClientData(int n) const
+{
+    return GetClientData(n);
+}
+
+void wxListBox::DoSetItemClientObject(int n, wxClientData* clientData)
+{
+    DoSetItemClientData(n, (void*) clientData);
+}
+
+wxClientData* wxListBox::DoGetItemClientObject(int n) const
+{
+    return (wxClientData*) DoGetItemClientData(n);
+}
+
+void wxListBox::Select(int n)
+{
+    SetSelection(n, TRUE);
+}
index 7fa4d9f93b1e5eb8c712ec1d3ddcc65a879df37a..9df03bef8dc74c55607e5bb3bafff1075611db16 100644 (file)
@@ -216,7 +216,8 @@ wxMenuBar::~wxMenuBar()
 
 void wxMenuBar::EnableTop(size_t WXUNUSED(pos), bool WXUNUSED(flag))
 {
-    wxFAIL_MSG("TODO");
+  //    wxFAIL_MSG("TODO");
+  wxLogWarning("wxMenuBar::EnableTop not yet implemented.");
 }
 
 void wxMenuBar::SetLabelTop(size_t pos, const wxString& label)
@@ -385,6 +386,9 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent)
             XtVaSetValues(GetWidget(menu),
                           XmNtearOffModel, XmTEAR_OFF_ENABLED,
                           NULL);
+            Widget tearOff = XmGetTearOffControl(GetWidget(menu));
+            wxDoChangeForegroundColour((Widget) tearOff, m_foregroundColour);
+            wxDoChangeBackgroundColour((Widget) tearOff, m_backgroundColour, TRUE);
 #endif
         }
     }