Made various Motif fixes, wxListBox/wxChoice derive from wxControlWithItems,
added release.txt git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -663,6 +663,8 @@ samples/internat/*.bmp
|
|||||||
samples/internat/*.mo
|
samples/internat/*.mo
|
||||||
samples/internat/fr/*.mo
|
samples/internat/fr/*.mo
|
||||||
samples/internat/fr/*.po
|
samples/internat/fr/*.po
|
||||||
|
samples/internat/de/*.mo
|
||||||
|
samples/internat/de/*.po
|
||||||
|
|
||||||
samples/checklst/*.cpp
|
samples/checklst/*.cpp
|
||||||
samples/checklst/*.h
|
samples/checklst/*.h
|
||||||
@@ -729,6 +731,10 @@ samples/image/*.bmp
|
|||||||
samples/image/*.xpm
|
samples/image/*.xpm
|
||||||
samples/image/*.xbm
|
samples/image/*.xbm
|
||||||
samples/image/*.png
|
samples/image/*.png
|
||||||
|
samples/image/*.pnm
|
||||||
|
samples/image/*.pcx
|
||||||
|
samples/image/*.jpg
|
||||||
|
samples/image/*.gif
|
||||||
samples/image/*.ico
|
samples/image/*.ico
|
||||||
samples/image/*.txt
|
samples/image/*.txt
|
||||||
|
|
||||||
@@ -1024,15 +1030,3 @@ samples/menu/*.png
|
|||||||
samples/menu/*.ico
|
samples/menu/*.ico
|
||||||
samples/menu/*.txt
|
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
|
|
||||||
|
|
||||||
|
@@ -34,6 +34,7 @@ samples/printing/Makefile.in
|
|||||||
samples/proplist/Makefile.in
|
samples/proplist/Makefile.in
|
||||||
samples/sashtest/Makefile.in
|
samples/sashtest/Makefile.in
|
||||||
samples/scroll/Makefile.in
|
samples/scroll/Makefile.in
|
||||||
|
samples/scrollsub/Makefile.in
|
||||||
samples/splitter/Makefile.in
|
samples/splitter/Makefile.in
|
||||||
samples/text/Makefile.in
|
samples/text/Makefile.in
|
||||||
samples/thread/Makefile.in
|
samples/thread/Makefile.in
|
||||||
@@ -46,6 +47,9 @@ samples/wxpoem/Makefile.in
|
|||||||
samples/wxsocket/Makefile.in
|
samples/wxsocket/Makefile.in
|
||||||
samples/nettest/Makefile.in
|
samples/nettest/Makefile.in
|
||||||
samples/scrollsub/Makefile.in
|
samples/scrollsub/Makefile.in
|
||||||
|
samples/font/Makefile.in
|
||||||
|
samples/menu/Makefile.in
|
||||||
|
samples/console/Makefile.in
|
||||||
utils/glcanvas/motif/Makefile.in
|
utils/glcanvas/motif/Makefile.in
|
||||||
utils/Makefile.in
|
utils/Makefile.in
|
||||||
utils/wxMMedia2/Makefile.in
|
utils/wxMMedia2/Makefile.in
|
||||||
@@ -76,4 +80,13 @@ samples/resource/Makefile.am
|
|||||||
samples/richedit/Makefile.am
|
samples/richedit/Makefile.am
|
||||||
samples/tab/Makefile.am
|
samples/tab/Makefile.am
|
||||||
samples/taskbar/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
|
src/msw/Makefile.am
|
||||||
|
@@ -32,13 +32,15 @@ wxWindows 2.1.11
|
|||||||
maintenance.
|
maintenance.
|
||||||
- Ability to compile library in console (non-GUI) mode.
|
- Ability to compile library in console (non-GUI) mode.
|
||||||
- Integration of wxHTML widget and help controller into
|
- 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,
|
- New classes wxChrono, wxDialUpManager, wxFontEnumerator,
|
||||||
wxWizard, wxStaticLine, etc.
|
wxWizard, wxStaticLine, etc.
|
||||||
- wxShowTip for showing 'startup tips' to the user.
|
- wxShowTip for showing 'startup tips' to the user.
|
||||||
- wxSocket and wxThread classes rewritten.
|
- wxSocket and wxThread classes rewritten.
|
||||||
- New, consistent drag and drop API (not wxMotif).
|
- 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
|
- wxSizers reimplemented and used to specify window layout
|
||||||
for some generic dialogs.
|
for some generic dialogs.
|
||||||
- New, more sophisticated wxGrid class (in beta). The old grid
|
- New, more sophisticated wxGrid class (in beta). The old grid
|
||||||
@@ -167,9 +169,16 @@ commercial applications using wxWindows.
|
|||||||
Documentation
|
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/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 Windows help files are located in docs/winhelp.
|
||||||
The PDF help files are located in docs/pdf.
|
The PDF help files are located in docs/pdf.
|
||||||
|
|
||||||
|
34
docs/release.txt
Normal file
34
docs/release.txt
Normal file
@@ -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.
|
||||||
|
|
@@ -44,11 +44,12 @@ public:
|
|||||||
int min = 0, int max = 100, int initial = 0,
|
int min = 0, int max = 100, int initial = 0,
|
||||||
const wxString& name = _T("wxSpinCtrl"))
|
const wxString& name = _T("wxSpinCtrl"))
|
||||||
{
|
{
|
||||||
SetValue(initial);
|
|
||||||
SetRange(min, max);
|
SetRange(min, max);
|
||||||
|
|
||||||
return wxTextCtrl::Create(parent, id, value, pos, size, style,
|
bool val = wxTextCtrl::Create(parent, id, value, pos, size, style,
|
||||||
wxDefaultValidator, name);
|
wxDefaultValidator, name);
|
||||||
|
SetValue(initial);
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
|
@@ -16,12 +16,12 @@
|
|||||||
#pragma interface "choice.h"
|
#pragma interface "choice.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/control.h"
|
#include "wx/ctrlsub.h"
|
||||||
|
|
||||||
WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr;
|
WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr;
|
||||||
|
|
||||||
// Choice item
|
// Choice item
|
||||||
class WXDLLEXPORT wxChoice: public wxControl
|
class WXDLLEXPORT wxChoice: public wxControlWithItems
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxChoice)
|
DECLARE_DYNAMIC_CLASS(wxChoice)
|
||||||
|
|
||||||
@@ -48,6 +48,21 @@ public:
|
|||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxChoiceNameStr);
|
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 Append(const wxString& item);
|
||||||
virtual void Delete(int n);
|
virtual void Delete(int n);
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
#pragma interface "listbox.h"
|
#pragma interface "listbox.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/control.h"
|
#include "wx/ctrlsub.h"
|
||||||
|
|
||||||
WXDLLEXPORT_DATA(extern const char*) wxListBoxNameStr;
|
WXDLLEXPORT_DATA(extern const char*) wxListBoxNameStr;
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ class WXDLLEXPORT wxArrayInt;
|
|||||||
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||||
|
|
||||||
// List box item
|
// List box item
|
||||||
class WXDLLEXPORT wxListBox: public wxControl
|
class WXDLLEXPORT wxListBox: public wxControlWithItems
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxListBox)
|
DECLARE_DYNAMIC_CLASS(wxListBox)
|
||||||
|
|
||||||
@@ -54,6 +54,19 @@ public:
|
|||||||
|
|
||||||
~wxListBox();
|
~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);
|
||||||
virtual void Append(const wxString& item, void *clientData);
|
virtual void Append(const wxString& item, void *clientData);
|
||||||
virtual void Set(int n, const wxString* choices, void **clientData = NULL);
|
virtual void Set(int n, const wxString* choices, void **clientData = NULL);
|
||||||
|
@@ -221,7 +221,8 @@ bool MyApp::OnInit()
|
|||||||
|
|
||||||
frame->SetIcon( wxICON(mondrian) );
|
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->Append(MINIMAL_ABOUT, "&About\tF1");
|
||||||
file_menu->AppendSeparator();
|
file_menu->AppendSeparator();
|
||||||
file_menu->Append(MINIMAL_QUIT, "E&xit\tAlt-X", "Quit controls sample");
|
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),
|
m_choiceSorted = new wxChoice( panel, ID_CHOICE_SORTED, wxPoint(10,70), wxSize(120,-1),
|
||||||
5, choices, wxCB_SORT );
|
5, choices, wxCB_SORT );
|
||||||
|
|
||||||
|
#ifndef __WXMOTIF__
|
||||||
SetControlClientData("choice", m_choice);
|
SetControlClientData("choice", m_choice);
|
||||||
SetControlClientData("choice", m_choiceSorted);
|
SetControlClientData("choice", m_choiceSorted);
|
||||||
|
#endif
|
||||||
|
|
||||||
m_choice->SetSelection(2);
|
m_choice->SetSelection(2);
|
||||||
m_choice->SetBackgroundColour( "red" );
|
m_choice->SetBackgroundColour( "red" );
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
#include <wx/image.h>
|
#include <wx/image.h>
|
||||||
#include <wx/wxhtml.h>
|
#include <wx/wxhtml.h>
|
||||||
#include <wx/fs_zip.h>
|
#include <wx/fs_zip.h>
|
||||||
|
#include <wx/log.h>
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// private classes
|
// private classes
|
||||||
@@ -56,6 +57,10 @@ IMPLEMENT_APP(MyApp)
|
|||||||
|
|
||||||
bool MyApp::OnInit()
|
bool MyApp::OnInit()
|
||||||
{
|
{
|
||||||
|
#ifdef __WXMOTIF__
|
||||||
|
delete wxLog::SetActiveTarget(new wxLogStderr); // So dialog boxes aren't used
|
||||||
|
#endif
|
||||||
|
|
||||||
wxInitAllImageHandlers();
|
wxInitAllImageHandlers();
|
||||||
wxFileSystem::AddHandler(new wxZipFSHandler);
|
wxFileSystem::AddHandler(new wxZipFSHandler);
|
||||||
|
|
||||||
@@ -72,6 +77,10 @@ bool MyApp::OnInit()
|
|||||||
for (int i = 1; i < argc; i++)
|
for (int i = 1; i < argc; i++)
|
||||||
help -> AddBook(argv[i]);
|
help -> AddBook(argv[i]);
|
||||||
|
|
||||||
|
#ifdef __WXMOTIF__
|
||||||
|
delete wxLog::SetActiveTarget(new wxLogGui);
|
||||||
|
#endif
|
||||||
|
|
||||||
help -> DisplayContents();
|
help -> DisplayContents();
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
/*
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
* File: printing.cc
|
// Name: printing.cpp
|
||||||
* Purpose: Printing demo for wxWindows class library
|
// Purpose: Printing demo for wxWindows
|
||||||
* Author: Julian Smart
|
// Author: Julian Smart
|
||||||
* Created: 1995
|
// Modified by:
|
||||||
* Updated:
|
// Created: 1995
|
||||||
* Copyright: (c) 1995, AIAI, University of Edinburgh
|
// RCS-ID: $Id$
|
||||||
*/
|
// Copyright: (c) Julian Smart
|
||||||
|
// Licence: wxWindows licence
|
||||||
/* static const char sccsid[] = "%W% %G%"; */
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
@@ -290,6 +290,8 @@ void MyFrame::OnPrintAbout(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
void MyFrame::Draw(wxDC& dc)
|
void MyFrame::Draw(wxDC& dc)
|
||||||
{
|
{
|
||||||
|
dc.SetBackground(*wxWHITE_BRUSH);
|
||||||
|
dc.Clear();
|
||||||
dc.SetFont(* wxGetApp().m_testFont);
|
dc.SetFont(* wxGetApp().m_testFont);
|
||||||
|
|
||||||
dc.SetBackgroundMode(wxTRANSPARENT);
|
dc.SetBackgroundMode(wxTRANSPARENT);
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
/*
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
* File: printing.h
|
// Name: printing.h
|
||||||
* Purpose: Printing demo for wxWindows class library
|
// Purpose: Printing demo for wxWindows
|
||||||
* Author: Julian Smart
|
// Author: Julian Smart
|
||||||
* Created: 1995
|
// Modified by:
|
||||||
* Updated:
|
// Created: 1995
|
||||||
* Copyright: (c) 1995, AIAI, University of Edinburgh
|
// RCS-ID: $Id$
|
||||||
*/
|
// Copyright: (c) Julian Smart
|
||||||
|
// Licence: wxWindows licence
|
||||||
/* sccsid[] = "%W% %G%" */
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma interface
|
#pragma interface
|
||||||
|
@@ -384,14 +384,21 @@ void wxPreviewControlBar::CreateButtons()
|
|||||||
"120%", "150%", "200%"
|
"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);
|
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++ )
|
wxString* strings = new wxString[n];
|
||||||
m_zoomControl->Append(choices[i]);
|
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());
|
SetZoomControl(m_printPreview->GetZoom());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: helpext.cpp
|
// Name: helpwxht.cpp
|
||||||
// Purpose: an external help controller for wxWindows
|
// Purpose: A help controller using the wxHTML classes
|
||||||
// Author: Karsten Ballueder
|
// Author: Karsten Ballueder
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 04/01/98
|
// Created: 04/01/98
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
# info
|
# info
|
||||||
|
|
||||||
# Set WXDIR for your system
|
# Set WXDIR for your system
|
||||||
WXDIR = j:\dev\wx2\wxWindows
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
WXUSINGDLL=0
|
WXUSINGDLL=0
|
||||||
|
|
||||||
|
@@ -477,3 +477,77 @@ void wxChoice::ChangeForegroundColour()
|
|||||||
for (i = 0; i < m_noStrings; i++)
|
for (i = 0; i < m_noStrings; i++)
|
||||||
DoChangeForegroundColour(m_widgetList[i], m_foregroundColour);
|
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") );
|
||||||
|
}
|
||||||
|
@@ -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);
|
||||||
|
}
|
||||||
|
@@ -216,7 +216,8 @@ wxMenuBar::~wxMenuBar()
|
|||||||
|
|
||||||
void wxMenuBar::EnableTop(size_t WXUNUSED(pos), bool WXUNUSED(flag))
|
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)
|
void wxMenuBar::SetLabelTop(size_t pos, const wxString& label)
|
||||||
@@ -385,6 +386,9 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent)
|
|||||||
XtVaSetValues(GetWidget(menu),
|
XtVaSetValues(GetWidget(menu),
|
||||||
XmNtearOffModel, XmTEAR_OFF_ENABLED,
|
XmNtearOffModel, XmTEAR_OFF_ENABLED,
|
||||||
NULL);
|
NULL);
|
||||||
|
Widget tearOff = XmGetTearOffControl(GetWidget(menu));
|
||||||
|
wxDoChangeForegroundColour((Widget) tearOff, m_foregroundColour);
|
||||||
|
wxDoChangeBackgroundColour((Widget) tearOff, m_backgroundColour, TRUE);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user