From dbdb39b2d0b8c3359eab1693fd1fc786499f62d7 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 16 Feb 1999 20:17:02 +0000 Subject: [PATCH] Some doc corrections; removed wxDocument arg from wxView constructor; wxTextCtrl::OnChar correction; added SetString and default constructor to wxStringTokenizer; added missing MSW wxFrame::SetSize functions git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/body.tex | 8 +- docs/latex/wx/classes.tex | 4 +- docs/latex/wx/frame.tex | 2 +- docs/latex/wx/helpinst.tex | 5 +- docs/latex/wx/locale.tex | 42 +++++------ docs/latex/wx/pen.tex | 4 +- docs/latex/wx/tokenizr.tex | 13 +++- docs/latex/wx/view.tex | 2 +- docs/latex/wx/window.tex | 150 ++++++++++++++++++------------------- include/wx/docview.h | 3 +- include/wx/event.h | 2 +- include/wx/msw/frame.h | 4 + include/wx/msw/setup0.h | 5 ++ include/wx/msw/window.h | 3 + include/wx/tbarbase.h | 2 +- include/wx/tokenzr.h | 13 +++- samples/docview/view.h | 2 +- samples/docvwmdi/view.h | 2 +- src/common/docview.cpp | 5 +- src/msw/textctrl.cpp | 2 +- src/msw/window.cpp | 15 ++++ 21 files changed, 172 insertions(+), 116 deletions(-) diff --git a/docs/latex/wx/body.tex b/docs/latex/wx/body.tex index 2c82cd9080..36511120a4 100644 --- a/docs/latex/wx/body.tex +++ b/docs/latex/wx/body.tex @@ -7,8 +7,8 @@ wxWindows is a C++ framework providing GUI (Graphical User Interface) and other facilities on more than one platform. Version 2.0 currently -supports MS Windows (16-bit, Windows 95 and Windows NT) and GTK+, with Motif -and Mac ports in an advanced state. +supports MS Windows (16-bit, Windows 95 and Windows NT), Unix with GTK+, and Unix with Motif. +A Mac port is in an advanced state. wxWindows was originally developed at the Artificial Intelligence Applications Institute, University of Edinburgh, for internal use. @@ -80,7 +80,7 @@ here are some of the benefits: \item Available on a variety of popular platforms. \item Works with almost all popular C++ compilers. \item Several example programs. -\item Over 700 pages of printable and on-line documentation. +\item Over 900 pages of printable and on-line documentation. \item Includes Tex2RTF, to allow you to produce your own documentation in Windows Help, HTML and Word RTF formats. \item Simple-to-use, object-oriented API. @@ -194,7 +194,7 @@ Applications Institute by anonymous FTP and World Wide Web: \begin{verbatim} ftp://www.remstar.com/pub/wxwin - http://web.ukonline.co.uk/julian.smart/wxwin + http://www.wxwindows.org \end{verbatim} \section{Acknowledgments} diff --git a/docs/latex/wx/classes.tex b/docs/latex/wx/classes.tex index 78a3024914..43b4159d53 100644 --- a/docs/latex/wx/classes.tex +++ b/docs/latex/wx/classes.tex @@ -190,9 +190,10 @@ $$\image{14cm;0cm}{wxclass.ps}$$ \input statusbr.tex \input wxstring.tex \input strlist.tex +\input tokenizr.tex \input strmbase.tex \input stream.tex -%\input strmmem.tex +\input strmmem.tex \input sysclevt.tex \input settings.tex \input tab.tex @@ -212,7 +213,6 @@ $$\image{14cm;0cm}{wxclass.ps}$$ \input thread.tex \input time.tex \input timer.tex -\input tokenizr.tex \input toolbar.tex \input treectrl.tex \input treeevt.tex diff --git a/docs/latex/wx/frame.tex b/docs/latex/wx/frame.tex index 52c5be1dfb..ebe13b0449 100644 --- a/docs/latex/wx/frame.tex +++ b/docs/latex/wx/frame.tex @@ -303,7 +303,7 @@ only). See also \helpref{wxActivateEvent}{wxactivateevent}. \membersection{wxFrame::OnCreateStatusBar}\label{wxframeoncreatestatusbar} -\func{virtual wxStatusBar*}{OnCreateStatusBar}{\param{int }{number} +\func{virtual wxStatusBar*}{OnCreateStatusBar}{\param{int }{number}, \param{long}{ style}, \param{wxWindowID}{ id}, \param{const wxString\&}{ name}} diff --git a/docs/latex/wx/helpinst.tex b/docs/latex/wx/helpinst.tex index 8bb79f6dbd..cd7c69b1a6 100644 --- a/docs/latex/wx/helpinst.tex +++ b/docs/latex/wx/helpinst.tex @@ -32,7 +32,10 @@ wxHelpControllerBase\\ \wxheading{Include files} - + (wxWindows chooses the appropriate help controller class)\\ + (wxHelpControllerBase class)\\ + (Windows Help controller)\\ + (external browser controller) \latexignore{\rtfignore{\wxheading{Members}}} diff --git a/docs/latex/wx/locale.tex b/docs/latex/wx/locale.tex index 1f34f9e948..2583c0a538 100644 --- a/docs/latex/wx/locale.tex +++ b/docs/latex/wx/locale.tex @@ -1,13 +1,7 @@ -% -% automatically generated by HelpGen from -% f:\libs\wxwindows\docs\latex\wx/locale.tex at 15/Feb/99 23:37:46 -% - - \section{\class{wxLocale}}\label{wxlocale} -wxLocale class encapsulates all language dependent settings and is a -generalization of the C locale concept (see also setlocale(3)). +wxLocale class encapsulates all language-dependent settings and is a +generalization of the C locale concept. In wxWindows this class manages message catalogs which contain the translations of the strings used to the current language. @@ -16,6 +10,10 @@ of the strings used to the current language. No base class +\wxheading{Include files} + + + \latexignore{\rtfignore{\wxheading{Members}}} \membersection{wxLocale::wxLocale}\label{wxlocaledefctor} @@ -23,9 +21,7 @@ No base class \func{}{wxLocale}{\void} This is the default constructor and it does nothing to initialize the object: -\helpref{Init()}{wxlocaleinit} must be used to do it. - -\membersection{wxLocale::wxLocale}\label{wxlocalewxlocale} +\helpref{Init()}{wxlocaleinit} must be used to do that. \func{}{wxLocale}{\param{const char }{*szName}, \param{const char }{*szShort = NULL}, \param{const char }{*szLocale = NULL}, \param{bool }{bLoadDefault = TRUE}} @@ -51,7 +47,7 @@ translate the messages using the message catalogs for this locale. \func{}{\destruct{wxLocale}}{\void} -Destructor, like the constructor, also has global side effects: the previously +The destructor, like the constructor, also has global side effects: the previously set locale is restored and so the changes described in \helpref{Init}{wxlocaleinit} documentation are rolled back. @@ -62,15 +58,14 @@ set locale is restored and so the changes described in Returns the locale name as passed to the constructor or \helpref{Init()}{wxlocaleinit}. - \membersection{wxLocale::AddCatalog}\label{wxlocaleaddcatalog} \func{bool}{AddCatalog}{\param{const char }{*szDomain}} Add a catalog for use with the current locale: it's searched for in standard -places (current directory first, system one after), but you may also prepend +places (current directory first, then the system one), but you may also prepend additional directories to the search path with -\helpref{AddCatalogLookupPathPrefix().}{wxlocaleaddcataloglookuppathprefix}. +\helpref{AddCatalogLookupPathPrefix()}{wxlocaleaddcataloglookuppathprefix}. All loaded catalogs will be used for message lookup by GetString() for the current locale. @@ -93,6 +88,7 @@ This only applies to subsequent invocations of AddCatalog()! \func{bool}{Init}{\param{const char }{*szName}, \param{const char }{*szShort = NULL}, \param{const char }{*szLocale = NULL}, \param{bool }{bLoadDefault = TRUE}} The parameters have the following meaning: + \begin{itemize}\itemsep=0pt \item szName is the name of the locale and is only used in diagnostic messages \item szShort is the standard 2 letter locale abbreviation and is used as the @@ -114,11 +110,12 @@ Returns TRUE on success or FALSE if the given locale couldn't be set. \membersection{wxLocale::IsLoaded}\label{wxlocaleisloaded} -\constfunc{bool}{IsLoaded}{\param{const char }{*szDomain}} +\constfunc{bool}{IsLoaded}{\param{const char* }{domain}} + +Check if the given catalog is loaded, and returns TRUE if it is. -Check if the given catalog (according to GNU gettext tradition each catalog -normally corresponds to 'domain' which is more or less the application name) -is loaded, returns TRUE if it is. +According to GNU gettext tradition, each catalog +normally corresponds to 'domain' which is more or less the application name. See also: \helpref{AddCatalog}{wxlocaleaddcatalog} @@ -133,12 +130,15 @@ the Init() function). \constfunc{const char*}{GetString}{\param{const char }{*szOrigString}, \param{const char }{*szDomain = NULL}} -Retrieve the translation for a string in all loaded domains unless the szDomain +Retrieves the translation for a string in all loaded domains unless the szDomain parameter is specified (and then only this catalog/domain is searched). Returns original string if translation is not available (in this case an error message is generated the first time a string is not found; use \helpref{wxLogNull}{wxlogoverview} to suppress it). -Remark: domains are searched in the last to first order, i.e. catalogs +\wxheading{Remarks} + +Domains are searched in the last to first order, i.e. catalogs added later override those added before. + diff --git a/docs/latex/wx/pen.tex b/docs/latex/wx/pen.tex index 14400253a9..2f7b233933 100644 --- a/docs/latex/wx/pen.tex +++ b/docs/latex/wx/pen.tex @@ -376,7 +376,9 @@ to the pen list, and returns it. \docparam{colour}{Colour object.} -\docparam{colourName}{Colour name, which should be in the colour database.} +\docparam{colourName}{Colour name, which should be in the \helpref{colour database}{wxcolourdatabase}.} + +\docparam{width}{Width of pen.} \docparam{style}{Pen style. See \helpref{wxPen::wxPen}{wxpenconstr} for a list of styles.} diff --git a/docs/latex/wx/tokenizr.tex b/docs/latex/wx/tokenizr.tex index 23a98634e7..750bd8cb35 100644 --- a/docs/latex/wx/tokenizr.tex +++ b/docs/latex/wx/tokenizr.tex @@ -14,9 +14,13 @@ wxStringTokenizer helps you to break a string up into a number of tokens. \membersection{wxStringTokenizer::wxStringTokenizer}\label{wxstringtokenizerwxstringtokenizer} +\func{}{wxStringTokenizer}{\void} + +Default constructor. + \func{}{wxStringTokenizer}{\param{const wxString\& }{to\_tokenize}, \param{const wxString\& }{delims = " $\backslash$t$\backslash$r$\backslash$n"}, \param{bool }{ret\_delim = FALSE}} -Constructor. Pass the string to tokenze, a string containing delimiters, +Constructor. Pass the string to tokenize, a string containing delimiters, a flag specifying whether delimiters are retained. \membersection{wxStringTokenizer::\destruct{wxStringTokenizer}}\label{wxstringtokenizerdtor} @@ -49,5 +53,12 @@ Returns the next token. Returns the input string. +\membersection{wxStringTokenizer::SetString}\label{wxstringtokenizersetstring} + +\func{void}{SetString}{\param{const wxString\& }{to\_tokenize}, \param{const wxString\& }{delims = " $\backslash$t$\backslash$r$\backslash$n"}, \param{bool }{ret\_delim = FALSE}} +Initializes the tokenizer. + +Pass the string to tokenize, a string containing delimiters, +a flag specifying whether delimiters are retained. diff --git a/docs/latex/wx/view.tex b/docs/latex/wx/view.tex index b988382746..e977bd41df 100644 --- a/docs/latex/wx/view.tex +++ b/docs/latex/wx/view.tex @@ -43,7 +43,7 @@ variable when the view is created. Not currently used by the framework. \membersection{wxView::wxView} -\func{}{wxView}{\param{wxDocument* }{doc = NULL}} +\func{}{wxView}{\void} Constructor. Define your own default constructor to initialize application-specific data. diff --git a/docs/latex/wx/window.tex b/docs/latex/wx/window.tex index 0929c65b7f..ac5b691d47 100644 --- a/docs/latex/wx/window.tex +++ b/docs/latex/wx/window.tex @@ -1551,6 +1551,75 @@ calling this function. \helpref{wxWindow::Refresh}{wxwindowrefresh},\rtfsp \helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground} +\membersection{wxWindow::SetClientSize}\label{wxwindowsetclientsize} + +\func{virtual void}{SetClientSize}{\param{int}{ width}, \param{int}{ height}} + +\func{virtual void}{SetClientSize}{\param{const wxSize\&}{ size}} + +This sets the size of the window client area in pixels. Using this function to size a window +tends to be more device-independent than \helpref{wxWindow::SetSize}{wxwindowsetsize}, since the application need not +worry about what dimensions the border or title bar have when trying to fit the window +around panel items, for example. + +\wxheading{Parameters} + +\docparam{width}{The required client area width.} + +\docparam{height}{The required client area height.} + +\docparam{size}{The required client size.} + +\membersection{wxWindow::SetCursor}\label{wxwindowsetcursor} + +\func{virtual void}{SetCursor}{\param{const wxCursor\&}{cursor}} + +Sets the window's cursor. + +\wxheading{Parameters} + +\docparam{cursor}{Specifies the cursor that the window should normally display.} + +\wxheading{Remarks} + +Under Windows, you sometimes need to call ::wxSetCursor in addition to this +function if you want the cursor to change immediately, because under Windows, +wxWindows only sets the global cursor when it detects mouse movement. + +\wxheading{See also} + +\helpref{::wxSetCursor}{wxsetcursor}, \helpref{wxCursor}{wxcursor} + +\membersection{wxWindow::SetEventHandler}\label{wxwindowseteventhandler} + +\func{void}{SetEventHandler}{\param{wxEvtHandler* }{handler}} + +Sets the event handler for this window. + +\wxheading{Parameters} + +\docparam{handler}{Specifies the handler to be set.} + +\wxheading{Remarks} + +An event handler is an object that is capable of processing the events +sent to a window. By default, the window is its own event handler, but +an application may wish to substitute another, for example to allow +central implementation of event-handling for a variety of different +window classes. + +It is usually better to use \helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler} since +this sets up a chain of event handlers, where an event not handled by one event handler is +handed to the next one in the chain. + +\wxheading{See also} + +\helpref{wxWindow::GetEventHandler}{wxwindowgeteventhandler},\rtfsp +\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp +\helpref{wxWindow::PopEventHandler}{wxwindowpusheventhandler},\rtfsp +\helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent},\rtfsp +\helpref{wxEvtHandler}{wxevthandler} + \membersection{wxWindow::SetConstraints}\label{wxwindowsetconstraints} \func{void}{SetConstraints}{\param{wxLayoutConstraints* }{constraints}} @@ -1657,6 +1726,12 @@ Sets the window's name. \helpref{wxWindow::GetName}{wxwindowgetname} +\membersection{wxWindow::SetPalette}\label{wxwindowsetpalette} + +\func{virtual void}{SetPalette}{\param{wxPalette* }{palette}} + +Obsolete - use \helpref{wxDC::SetPalette}{wxdcsetpalette} instead. + \membersection{wxWindow::SetReturnCode}\label{wxwindowsetreturncode} \func{void}{SetReturnCode}{\param{int }{retCode}} @@ -1913,81 +1988,6 @@ given bounds. The resizing increments are only significant under Motif or Xt. -\membersection{wxWindow::SetClientSize} - -\func{virtual void}{SetClientSize}{\param{int}{ width}, \param{int}{ height}} - -\func{virtual void}{SetClientSize}{\param{const wxSize\&}{ size}} - -This sets the size of the window client area in pixels. Using this function to size a window -tends to be more device-independent than \helpref{wxWindow::SetSize}{wxwindowsetsize}, since the application need not -worry about what dimensions the border or title bar have when trying to fit the window -around panel items, for example. - -\wxheading{Parameters} - -\docparam{width}{The required client area width.} - -\docparam{height}{The required client area height.} - -\docparam{size}{The required client size.} - -\membersection{wxWindow::SetPalette} - -\func{virtual void}{SetPalette}{\param{wxPalette* }{palette}} - -Obsolete - use \helpref{wxDC::SetPalette}{wxdcsetpalette} instead. - -\membersection{wxWindow::SetCursor}\label{wxwindowsetcursor} - -\func{virtual void}{SetCursor}{\param{const wxCursor\&}{cursor}} - -Sets the window's cursor. - -\wxheading{Parameters} - -\docparam{cursor}{Specifies the cursor that the window should normally display.} - -\wxheading{Remarks} - -Under Windows, you sometimes need to call ::wxSetCursor in addition to this -function if you want the cursor to change immediately, because under Windows, -wxWindows only sets the global cursor when it detects mouse movement. - -\wxheading{See also} - -\helpref{::wxSetCursor}{wxsetcursor}, \helpref{wxCursor}{wxcursor} - -\membersection{wxWindow::SetEventHandler}\label{wxwindowseteventhandler} - -\func{void}{SetEventHandler}{\param{wxEvtHandler* }{handler}} - -Sets the event handler for this window. - -\wxheading{Parameters} - -\docparam{handler}{Specifies the handler to be set.} - -\wxheading{Remarks} - -An event handler is an object that is capable of processing the events -sent to a window. By default, the window is its own event handler, but -an application may wish to substitute another, for example to allow -central implementation of event-handling for a variety of different -window classes. - -It is usually better to use \helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler} since -this sets up a chain of event handlers, where an event not handled by one event handler is -handed to the next one in the chain. - -\wxheading{See also} - -\helpref{wxWindow::GetEventHandler}{wxwindowgeteventhandler},\rtfsp -\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp -\helpref{wxWindow::PopEventHandler}{wxwindowpusheventhandler},\rtfsp -\helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent},\rtfsp -\helpref{wxEvtHandler}{wxevthandler} - \membersection{wxWindow::SetTitle}\label{wxwindowsettitle} \func{virtual void}{SetTitle}{\param{const wxString\& }{title}} diff --git a/include/wx/docview.h b/include/wx/docview.h index b2a1d68797..c7ea657142 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -157,7 +157,8 @@ class WXDLLEXPORT wxView: public wxEvtHandler { DECLARE_ABSTRACT_CLASS(wxView) public: - wxView(wxDocument *doc = (wxDocument *) NULL); +// wxView(wxDocument *doc = (wxDocument *) NULL); + wxView(); ~wxView(void); inline wxDocument *GetDocument(void) const { return m_viewDocument; } diff --git a/include/wx/event.h b/include/wx/event.h index 76e31ed6cd..80f2274901 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -1305,7 +1305,7 @@ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ // EVT_COMMAND #define EVT_COMMAND(id, event, fn) { event, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_COMMAND_RANGE(id1, id2, event, fn) { eventId, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_COMMAND_RANGE(id1, id2, event, fn) { event, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, // Scrolling #define EVT_SCROLL(func) \ diff --git a/include/wx/msw/frame.h b/include/wx/msw/frame.h index 5f3870950d..5c27215173 100644 --- a/include/wx/msw/frame.h +++ b/include/wx/msw/frame.h @@ -69,6 +69,10 @@ public: wxPoint GetPosition() const { return wxWindow::GetPosition(); } virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); + virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO) + { wxWindow::SetSize(rect, sizeFlags); } + virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); } + virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); } virtual void ClientToScreen(int *x, int *y) const; diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index df22ac28c3..f19e6377a3 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -282,6 +282,11 @@ #endif +#if defined(__WXMSW__) && defined(__BORLANDC__) +#undef wxUSE_ODBC +#define wxUSE_ODBC 0 +#endif + #if defined(__WXMSW__) && !defined(__WIN32__) #undef wxUSE_THREADS diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index a9e9360221..212504c34f 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -466,6 +466,9 @@ public: void UpdateWindowUI(); void OnEraseBackground(wxEraseEvent& event); + void OnKeyDown(wxKeyEvent& event); + void OnKeyUp(wxKeyEvent& event); + void OnPaint(wxPaintEvent& event); void OnChar(wxKeyEvent& event); void OnIdle(wxIdleEvent& event); diff --git a/include/wx/tbarbase.h b/include/wx/tbarbase.h index 7e8708e577..3cf75abf8b 100644 --- a/include/wx/tbarbase.h +++ b/include/wx/tbarbase.h @@ -46,7 +46,7 @@ class WXDLLEXPORT wxToolBarTool: public wxObject const wxString& shortHelpString = "", const wxString& longHelpString = "", GtkWidget *item = (GtkWidget *) NULL ); #else - wxToolBarTool(int theIndex = 0, const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap, + wxToolBarTool(int theIndex, const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap, bool toggle = FALSE, long xPos = -1, long yPos = -1, const wxString& shortHelpString = wxEmptyString, const wxString& longHelpString = wxEmptyString); #endif diff --git a/include/wx/tokenzr.h b/include/wx/tokenzr.h index 7de58feed3..c23d130185 100644 --- a/include/wx/tokenzr.h +++ b/include/wx/tokenzr.h @@ -20,17 +20,28 @@ #include "wx/string.h" #include "wx/filefn.h" -class wxStringTokenizer : wxObject { +class wxStringTokenizer : public wxObject { public: wxStringTokenizer(const wxString& to_tokenize, const wxString& delims = " \t\r\n", bool ret_delim = FALSE); + wxStringTokenizer() { m_string = ""; m_delims = ""; m_retdelims = FALSE;} ~wxStringTokenizer(); int CountTokens(); bool HasMoreToken(); wxString NextToken(); wxString GetString() { return m_string; } + + void SetString(const wxString& to_tokenize, + const wxString& delims = " \t\r\n", + bool ret_delim = FALSE) + { + m_string = to_tokenize; + m_delims = delims; + m_retdelims = ret_delim; + } + protected: off_t FindDelims(const wxString& str, const wxString& delims); protected: diff --git a/samples/docview/view.h b/samples/docview/view.h index 2f068c7c04..d69cef8fec 100644 --- a/samples/docview/view.h +++ b/samples/docview/view.h @@ -67,7 +67,7 @@ class TextEditView: public wxView wxFrame *frame; MyTextWindow *textsw; - TextEditView(wxDocument *doc = (wxDocument *) NULL): wxView(doc) { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; } + TextEditView(): wxView() { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; } ~TextEditView(void) {} bool OnCreate(wxDocument *doc, long flags); diff --git a/samples/docvwmdi/view.h b/samples/docvwmdi/view.h index e851caf6fe..74038ede6e 100644 --- a/samples/docvwmdi/view.h +++ b/samples/docvwmdi/view.h @@ -67,7 +67,7 @@ class TextEditView: public wxView wxFrame *frame; MyTextWindow *textsw; - TextEditView(wxDocument *doc = (wxDocument *) NULL): wxView(doc) { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; } + TextEditView(): wxView() { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; } ~TextEditView(void) {} bool OnCreate(wxDocument *doc, long flags); diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 47fc1beea0..01f8ebe21a 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -462,9 +462,10 @@ void wxDocument::SetFilename(const wxString& filename, bool notifyViews) * Document view */ -wxView::wxView(wxDocument *doc) +wxView::wxView() { - SetDocument(doc); +// SetDocument(doc); + m_viewDocument = (wxDocument*) NULL; m_viewTypeName = ""; m_viewFrame = (wxFrame *) NULL; diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 7fa765d4a4..323bca0c7c 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -965,7 +965,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) case '\\': { char c = (char)event.KeyCode(); - *this << c; + WriteText(c); } break; diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 1aff70f753..8b970ba696 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -3715,6 +3715,21 @@ void wxWindow::OnChar(wxKeyEvent& event) (void) MSWDefWindowProc(m_lastMsg, (WPARAM) id, m_lastLParam); } +void wxWindow::OnKeyDown(wxKeyEvent& event) +{ + Default(); +} + +void wxWindow::OnKeyUp(wxKeyEvent& event) +{ + Default(); +} + +void wxWindow::OnPaint(wxPaintEvent& event) +{ + Default(); +} + bool wxWindow::IsEnabled(void) const { return (::IsWindowEnabled((HWND) GetHWND()) != 0); -- 2.45.2