docs/todo.txt
docs/licence.txt
docs/symbols.txt
+docs/bugs.txt
docs/*.html
src/*.inc
wxMotif:
--------
+- wxNotebook and property list frame do not appear properly when
+ first shown.
+ Workaround: resize the window (manually or programmatically) to
+ make the window appear.
+ This also happens with other windows, e.g. the sizer
+ dialog in the layout sample.
+
+- wxSashWindow borders aren't repainted properly if the sashtest
+ sample is exposed (after being under another window).
+
+- If a popup wxMenu is destroyed after its parent window has been
+ destroyed, we get the message "Object XXX does not have windowed
+ ancestor".
+ Workaround: delete the menu before deleting the window on which it
+ was popped up.
+ Possible fix: call menu->DestroyMenu() before deleting the window,
+ if the window knows about the menu that was last popped up (hard
+ to know this with confidence).
+
+- In wxGrid, cell highlight is not drawn/erased properly.
+
+- Setting the size of a hidden window may show that window.
+
General:
--------
wxWindows 2.0 Change Log
------------------------
+Beta 2, ??? 1998
+--------------------------
+
+wxGTK:
+
+wxMSW:
+
+- 16-bit BC++ compilation/linking works albeit without the resource system.
+
+wxMotif:
+
+- Cured wxScreenDC origin problem so e.g. sash window sash is drawn at
+ the right place.
+- Cured some widget table clashes.
+- Added thread support (Robert).
+- wxPoem sample now works.
+
+General:
+
+- Rearranged documentation a bit.
+- Sash window uses area of first frame/dialog to paint over when drawing
+ the dragged sash, not just the sash window itself (it clipped to the right
+ or below).
+- Made resource sample use the correct Cancel button id.
+- Moved wxProp to main library (generic directory), created proplist
+ sample.
+- Added bombs and fractal samples.
+
+Beta 1, December 24th 1998
+--------------------------
+
+wxGTK:
+
+- Various
+
+wxMSW, wxMotif: not in sync with this release.
+
+
Alpha 18, December 29th 1998
----------------------------
Destructor, destroying the menu.
+Note: under Motif, a popup menu must have a valid parent (the window
+it was last popped up on) when being destroyed. Therefore, make sure
+you delete or re-use the popup menu {\it before} destroying the
+parent window. Re-use in this context means popping up the menu on
+a different window from last time, which causes an implicit destruction
+and recreation of internal data structures.
+
\membersection{wxMenu::Append}\label{wxmenuappend}
\func{void}{Append}{\param{int}{ id}, \param{const wxString\& }{ item}, \param{const wxString\& }{helpString = ""},\rtfsp
I'd prefer you to fix the problem and send the fix to me :-) or at
least let me know about it.
+- Thread support is switched off by default in setup.h (wxUSE_THREADS)
+ because standard Unices often do not have the necessary thread library
+ installed. Please see ../docs/gtk/install.txt for more details on this.
+ For Linux, the problem is expected to go away with future
+ distributions of the operating system.
+
- If you have trouble compiling the file y_tab.c, or have strange
linking errors, check whether you're using a C or C++ compiler for this file.
You should specify a C compiler in the CCLEX variable in src/make.env.
#define wxUSE_TIMEDATE 1
// Use time and date
+
+#define wxUSE_THREADS 0
+ // Use threads
+
/*
* Finer detail
*
{
Create(parent, id, label, pos, size, style, name);
}
+ ~wxStaticBox();
bool Create(wxWindow *parent, wxWindowID id,
const wxString& label,
wxMenu *menu2 = new wxMenu;
menu2->Append(IDM_RESTART, "&Restart"); // , "Clear the play field");
menu2->AppendSeparator();
- menu2->Append(IDM_EASY, "&Easy", (char*)NULL, TRUE); // "10x10 play field", TRUE);
- menu2->Append(IDM_MEDIUM, "&Medium", (char*)NULL, TRUE); // "15x15 play field", TRUE);
- menu2->Append(IDM_DIFFICULT, "&Difficult", (char*)NULL, TRUE); // "25x20 play field", TRUE);
+ menu2->Append(IDM_EASY, "&Easy", wxEmptyString, TRUE); // "10x10 play field", TRUE);
+ menu2->Append(IDM_MEDIUM, "&Medium", wxEmptyString, TRUE); // "15x15 play field", TRUE);
+ menu2->Append(IDM_DIFFICULT, "&Difficult", wxEmptyString, TRUE); // "25x20 play field", TRUE);
menuBar1->Append(menu2, "&Game");
SetMenuBar(menuBar1);
menuBar=menuBar1;
#
# File: makefile.unx
# Author: Julian Smart
-# Created: 1993
+# Created: 1998
# Updated:
-# Copyright: (c) 1993, AIAI, University of Edinburgh
+# Copyright: (c) 1998 Julian Smart
#
# "%W% %G%"
#
-# Makefile for docview example (UNIX).
+# Makefile for docvwmdi example (UNIX).
-WXDIR = ../..
+PROGRAM=docview
-# All common UNIX compiler flags and options are now in
-# this central makefile.
-include $(WXDIR)/src/make.env
+OBJECTS=$(PROGRAM).o doc.o view.o
-OBJECTS = $(OBJDIR)/docview.$(OBJSUFF) $(OBJDIR)/view.$(OBJSUFF) $(OBJDIR)/doc.$(OBJSUFF)
-
-.SUFFIXES:
-
-all: $(OBJDIR) wx$(GUISUFFIX) docview$(GUISUFFIX)
-
-wx_motif:
- cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif
-
-wx_ol:
- cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview
-motif:
- $(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK=
-
-xview:
- $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)'
-
-hp:
- $(MAKE) -f makefile,unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' WARN='-w' \
- XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)'
-
-$(OBJDIR):
- mkdir $(OBJDIR)
-
-docview$(GUISUFFIX): $(OBJECTS) $(WXLIB)
- $(CC) $(LDFLAGS) -o docview$(GUISUFFIX) $(OBJECTS) $(XVIEW_LINK) $(LDLIBS)
-
-$(OBJDIR)/docview.$(OBJSUFF): docview.$(SRCSUFF) docview.h doc.h view.h
- $(CC) -c $(CPPFLAGS) -o $@ docview.$(SRCSUFF)
-
-$(OBJDIR)/doc.$(OBJSUFF): doc.$(SRCSUFF) doc.h
- $(CC) -c $(CPPFLAGS) -o $@ doc.$(SRCSUFF)
-
-$(OBJDIR)/view.$(OBJSUFF): view.$(SRCSUFF) view.h
- $(CC) -c $(CPPFLAGS) -o $@ view.$(SRCSUFF)
-
-clean_motif:
- $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany
-
-clean_ol:
- $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany
-
-clean_hp:
- $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany
-
-cleanany:
- rm -f $(OBJECTS) docview$(GUISUFFIX) core
+include ../../src/makeprog.env
// X seems to require a forced resize
int x, y;
frame->GetSize(&x, &y);
- frame->SetSize(x, y);
+ frame->SetSize(-1, -1, x, y);
#endif
frame->Show(TRUE);
// X seems to require a forced resize
int x, y;
frame->GetSize(&x, &y);
- frame->SetSize(x, y);
+ frame->SetSize(-1, -1, x, y);
#endif
frame->Show(TRUE);
#include "wx/file.h"
#include "wx/log.h"
-#ifdef __WXGTK__
+#if defined(__WXGTK__) || defined(__WXMOTIF__)
#include "mondrian.xpm"
#endif
m_locale.AddCatalog("fileutils"); // 3) and another just for testing
// Create the main frame window
- MyFrame *frame = new MyFrame((wxFrame *) NULL, _("Minimal wxWindows App"), 50, 50, 150, 40);
+ MyFrame *frame = new MyFrame((wxFrame *) NULL, _("International wxWindows App"), 50, 50, 150, 40);
// Give it an icon
-#ifdef __WXMSW__
- frame->SetIcon(wxIcon("mondrian"));
-#else
- frame->SetIcon(wxIcon(mondrian_xpm));
-#endif
+ frame->SetIcon(wxICON(mondrian));
// Make a menubar
wxMenu *file_menu = new wxMenu;
--- /dev/null
+#
+# File: makefile.unx
+# Author: Julian Smart
+# Created: 1998
+# Updated:
+# Copyright: (c) 1998 Julian Smart
+#
+# "%W% %G%"
+#
+# Makefile for proplist example (UNIX).
+
+PROGRAM=test
+
+OBJECTS=$(PROGRAM).o
+
+include ../../src/makeprog.env
+
}
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
- EVT_BUTTON(RESOURCE_OK, MyDialog::OnOk)
- EVT_BUTTON(RESOURCE_CANCEL, MyDialog::OnCancel)
+ // EVT_BUTTON(RESOURCE_OK, MyDialog::OnOk)
+ EVT_BUTTON(ID_BUTTON109, MyDialog::OnCancel)
END_EVENT_TABLE()
void MyDialog::OnOk(wxCommandEvent& WXUNUSED(event) )
{
- EndModal(RESOURCE_OK);
+ // EndModal(RESOURCE_OK);
}
void MyDialog::OnCancel(wxCommandEvent& WXUNUSED(event) )
{
- EndModal(RESOURCE_CANCEL);
+ EndModal(ID_BUTTON109);
}
#define RESOURCE_QUIT 4
#define RESOURCE_TEST1 2
+/*
#define RESOURCE_OK 1
#define RESOURCE_CANCEL 2
+*/
#include "typetest.h"
-#ifdef __WXGTK__
+#if defined(__WXGTK__) || defined(__WXMOTIF__)
#include "mondrian.xpm"
#endif
#include "wxpoem.h"
-#ifdef __WXGTK__
+#if defined(__WXGTK__) || defined(__WXMOTIF__)
#include "corner1.xpm"
#include "corner2.xpm"
#include "corner3.xpm"
{
}
+MainWindow::~MainWindow()
+{
+ // Note: this must be done before the main window/canvas are destroyed
+ // or we get an error (no parent window for menu item button)
+ delete popupMenu;
+ popupMenu = NULL;
+}
+
// Read the poetry buffer, either for finding the size
// or for writing to a bitmap (not to the window directly,
// since that displays messily)
Corner3 = new wxIcon("icon_3");
Corner4 = new wxIcon("icon_4");
#endif
-#ifdef __WXGTK__
+#if defined(__WXGTK__) || defined(__WXMOTIF__)
Corner1 = new wxIcon( corner1_xpm );
Corner2 = new wxIcon( corner2_xpm );
Corner3 = new wxIcon( corner3_xpm );
if (backingBitmap)
delete backingBitmap;
delete HelpController;
- delete popupMenu;
delete GreyPen;
delete DarkGreyPen;
delete WhitePen;
-//#ifdef __WXMSW__
delete Corner1;
delete Corner2;
delete Corner3;
delete Corner4;
-//#endif
delete NormalFont;
delete BoldFont;
void PopupFunction(wxMenu& /*menu*/, wxCommandEvent& event)
{
- switch (event.m_commandInt)
+ switch (event.GetId())
{
case POEM_NEXT:
// Another poem/page
public:
MyCanvas *canvas;
MainWindow(wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style);
+ ~MainWindow();
void OnCloseWindow(wxCloseEvent& event);
void OnChar(wxKeyEvent& event);
m_internal->sock_inputid = XtAppAddInput (wxAPP_CONTEXT, m_fd,
(XtPointer *) XtInputReadMask,
(XtInputCallbackProc) wx_socket_read,
+ (XtPointer) this);
}
}
else
if (m_hScrollBar && !m_hScrollBar->IsShown())
horizScrollBarHeight = 0;
- if (m_hScrollBar)
+ if (m_hScrollBar && m_hScrollBar->IsShown())
{
int nCols = GetCols();
m_hScrollBar->SetScrollbar(m_hScrollBar->GetThumbPosition(), wxMax(noHorizSteps, 1), (noHorizSteps == 0) ? 1 : nCols, wxMax(noHorizSteps, 1));
}
- if (m_vScrollBar)
+ if (m_vScrollBar && m_vScrollBar->IsShown())
{
int nRows = GetRows();
{
if ( sashHit != wxSASH_NONE )
{
- CaptureMouse();
+ CaptureMouse();
// Required for X to specify that
- // that we wish to draw on top of all windows
- // - and we optimise by specifying the area
- // for creating the overlap window.
- wxScreenDC::StartDrawingOnTop(this);
+ // that we wish to draw on top of all windows
+ // - and we optimise by specifying the area
+ // for creating the overlap window.
+ // Find the first frame or dialog and use this to specify
+ // the area to draw on.
+ wxWindow* parent = this;
+
+ while (parent && !parent->IsKindOf(CLASSINFO(wxDialog)) &&
+ !parent->IsKindOf(CLASSINFO(wxFrame)))
+ parent = parent->GetParent();
+
+ wxScreenDC::StartDrawingOnTop(parent);
// We don't say we're dragging yet; we leave that
// decision for the Dragging() branch, to ensure
############################ Switches #################################
# Debug/trace mode. 1 or more for debugging.
-DEBUG = 0
+DEBUG = 1
GUI = -D__WXSTUBS__ -D__LINUX__ -D__UNIX__
GUISUFFIX = _stubs
# Misc options
OPTIONS = -D__WXDEBUG__
COPTIONS =
-DEBUGFLAGS =
+DEBUGFLAGS = -ggdb
INCLUDE =
WARN = -Wall -Wno-unused # -w
CWARN = -Wall -Wno-unused # -w
#include "wx/log.h"
#include "wx/module.h"
#include "wx/memory.h"
+
+#if wxUSE_THREADS
#include "wx/thread.h"
+#endif
#if wxUSE_WX_RESOURCES
#include "wx/resource.h"
{
if (!ProcessIdle())
{
+ // TODO: Robert, what's this for?
+#if wxUSE_THREADS
wxMutexGuiLeave();
usleep(20);
wxMutexGuiEnter();
+#endif
}
}
if (GetMainWidget())
{
DetachWidget(GetMainWidget()); // Removes event handlers
+ DetachWidget(m_formWidget);
XtDestroyWidget((Widget) m_formWidget);
m_formWidget = (WXWidget) 0;
wxRect rect;
int x, y, width, height;
window->GetPosition(& x, & y);
- window->ClientToScreen(& x, & y);
+ if (window->GetParent())
+ window->GetParent()->ClientToScreen(& x, & y);
window->GetSize(& width, & height);
rect.x = x; rect.y = y;
rect.width = width; rect.height = height;
// Note that this might need to be done for wxFrame also.
DestroyChildren();
+ // This causes a crash in e.g. the resource sample when closing
+ // the example dialog. TODO: Probably not necessary (?)
+#if 0
// Now process all events, because otherwise
// this might remain on the screen.
Display* display;
XtAppNextEvent((XtAppContext) wxTheApp->GetAppContext(), &event);
XtDispatchEvent(&event);
}
+#endif
}
// By default, pressing escape cancels the dialog
if (item->InSetValue())
return;
- wxCommandEvent event (wxEVT_COMMAND_LISTBOX_SELECTED);
+ wxCommandEvent event (wxEVT_COMMAND_LISTBOX_SELECTED, item->GetId());
switch (cbs->reason)
{
case XmCR_MULTIPLE_SELECT:
frame.cpp \
gauge.cpp \
gdiobj.cpp \
- helpxxxx.cpp \
icon.cpp \
listbox.cpp \
joystick.cpp \
m_pSubMenu = pSubMenu;
m_idItem = id;
m_bEnabled = TRUE;
+ m_bChecked = FALSE;
//// Motif-specific
m_menuBar = NULL;
{
wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, item->GetId());
commandEvent.SetEventObject(item->GetMenuBar()->GetMenuBarFrame());
+ commandEvent.SetInt( item->GetId() );
item->GetMenuBar()->GetMenuBarFrame()->GetEventHandler()->ProcessEvent(commandEvent);
}
{
wxCommandEvent event (wxEVT_COMMAND_MENU_SELECTED, item->GetId());
event.SetEventObject(item->GetTopMenu());
+ event.SetInt( item->GetId() );
+
item->GetTopMenu()->ProcessCommand (event);
}
}
{
delete[] m_radioButtonLabels;
delete[] m_radioButtons;
+ DetachWidget(m_formWidget);
}
wxString wxRadioBox::GetLabel(int item) const
XtManageChild (radioButtonWidget);
SetCanAddEventHandler(TRUE);
- AttachWidget (parent, m_mainWidget, NULL, pos.x, pos.y, size.x, size.y);
+ AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
ChangeBackgroundColour();
void wxScrollBar::ChangeFont(bool keepOriginalSize)
{
// TODO
+ // Do anything for a scrollbar? A font will never be seen.
}
void wxScrollBar::ChangeBackgroundColour()
{
- // TODO
+ wxWindow::ChangeBackgroundColour();
}
void wxScrollBar::ChangeForegroundColour()
{
- // TODO
+ wxWindow::ChangeForegroundColour();
}
static void wxScrollBarCallback(Widget widget, XtPointer clientData,
return TRUE;
}
+wxStaticBox::~wxStaticBox()
+{
+ DetachWidget(m_formWidget);
+}
+
void wxStaticBox::SetLabel(const wxString& label)
{
if (!m_labelWidget)
void wxStaticBox::ChangeBackgroundColour()
{
wxWindow::ChangeBackgroundColour();
+ if (m_labelWidget)
+ DoChangeBackgroundColour(m_labelWidget, m_backgroundColour);
}
void wxStaticBox::ChangeForegroundColour()
{
wxWindow::ChangeForegroundColour();
+ if (m_labelWidget)
+ DoChangeForegroundColour(m_labelWidget, m_foregroundColour);
}
#pragma implementation "thread.h"
#endif
-#include <stdio.h>
-#include <unistd.h>
-#include <pthread.h>
-#include <errno.h>
+#include "wx/defs.h"
+
+#if wxUSE_THREADS
+
#include "wx/module.h"
#include "wx/thread.h"
#include "wx/utils.h"
#include "wx/log.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <pthread.h>
+#include <errno.h>
+
#include <stdio.h>
#include <unistd.h>
IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule)
-
+#endif
+ // wxUSE_THREADS
// printf("Adding widget %ld, name = %s\n", w, win->GetClassInfo()->GetClassName());
if ((oldItem = (wxWindow *)wxWidgetHashTable->Get ((long) w)))
{
- char buf[300];
- sprintf(buf, "Widget table clash: new widget is %ld, %s", (long)w, win->GetClassInfo()->GetClassName());
- wxError (buf);
- fflush(stderr);
- sprintf(buf, "Old widget was %s", oldItem->GetClassInfo()->GetClassName());
- wxError (buf);
+ wxLogError("Widget table clash: new widget is %ld, %s", (long)w, win->GetClassInfo()->GetClassName());
return FALSE;
}
{
if (GetMainWidget())
DoChangeBackgroundColour(GetMainWidget(), m_backgroundColour);
+
+ // This not necessary
+#if 0
+
if (m_scrolledWindow && (GetMainWidget() != m_scrolledWindow))
+ {
DoChangeBackgroundColour(m_scrolledWindow, m_backgroundColour);
+ // Have to set the scrollbar colours back since
+ // the scrolled window seemed to change them
+ wxColour backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ;
+
+ if (m_hScrollBar)
+ DoChangeBackgroundColour(m_hScrollBar, backgroundColour);
+ if (m_vScrollBar)
+ DoChangeBackgroundColour(m_vScrollBar, backgroundColour);
+ }
+#endif
}
void wxWindow::ChangeForegroundColour()