Spelling fixes from Andreas Mohr (patch #1360064)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -12,7 +12,7 @@ trans->Convert("Myfile.rc","Myfile.xml");
|
||||
1. Figure how to fix memory leaks in all wxLists in this class
|
||||
2. Find a way to rename MS Windows fonts so that they work
|
||||
cross platform (wxGTK,etc)
|
||||
3. Be able to abort incorrectly formated files without crashing
|
||||
3. Be able to abort incorrectly formatted files without crashing
|
||||
*/
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
|
@@ -94,7 +94,7 @@
|
||||
</TR></TBODY></TABLE>
|
||||
<TABLE BORDER=1><TBODY><TR>
|
||||
<TH BGCOLOR=#FFFFE0>
|
||||
<B>This Class stores how this Column should be formated in a String : <HR>
|
||||
<B>This Class stores how this Column should be formatted in a String : <HR>
|
||||
Output String (<I><FONT color=#FF0000>wxString s_Field</I>),<BR>
|
||||
Formatted Objects (TIMESTAMP needs 7) (<I><FONT color=#FF0000>wxString s_Format[7]</I>),<BR>
|
||||
Formatted Objects (<I><FONT color=#FF0000>wxString s_Menge[7]</I>),<BR>
|
||||
|
@@ -1630,12 +1630,12 @@ Beginning support for handling international formatting specifically on dates
|
||||
and floats.
|
||||
|
||||
\begin{verbatim}
|
||||
wxString s_Field; // Formated String for Output
|
||||
wxString s_Format[7]; // Formated Objects - TIMESTAMP has
|
||||
wxString s_Field; // Formatted String for Output
|
||||
wxString s_Format[7]; // Formatted Objects - TIMESTAMP has
|
||||
the biggest (7)
|
||||
wxString s_Amount[7]; // Formated Objects - amount of
|
||||
wxString s_Amount[7]; // Formatted Objects - amount of
|
||||
things that can be formatted
|
||||
int i_Amount[7]; // Formated Objects -
|
||||
int i_Amount[7]; // Formatted Objects -
|
||||
TT MM YYYY HH MM SS m
|
||||
int i_Nation; // 0 = timestamp
|
||||
1 = EU
|
||||
|
@@ -501,7 +501,7 @@ This function may be used to find all selected items in the control like this:
|
||||
\twocolitem{wxLIST\_NEXT\_RIGHT}{Searches for an item to the right of the specified item.}
|
||||
\end{twocollist}
|
||||
|
||||
{\bf NB:} this parameters is only supported by wxMSW currently and ignored on
|
||||
{\bf NB:} this parameter is only supported by wxMSW currently and ignored on
|
||||
other platforms.
|
||||
|
||||
{\it state} can be a bitlist of the following:
|
||||
|
@@ -13,8 +13,8 @@ recursive by default. The reason for this is that recursive mutexes are not
|
||||
supported by all Unix flavours and, worse, they cannot be used with
|
||||
\helpref{wxCondition}{wxcondition}.
|
||||
|
||||
For example, when several thread use the data stored in the linked list,
|
||||
modifications to the list should be only allowed to one thread at a time
|
||||
For example, when several threads use the data stored in the linked list,
|
||||
modifications to the list should only be allowed to one thread at a time
|
||||
because during a new node addition the list integrity is temporarily broken
|
||||
(this is also called {\it program invariant}).
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
This is a small helper class to be used with \helpref{wxMutex}{wxmutex}
|
||||
objects. A wxMutexLocker acquires a mutex lock in the constructor and releases
|
||||
(or unlocks) the mutex in the destructor making it much more difficult to
|
||||
forget to release a mutex (which, in general, will promptly lead to the serious
|
||||
forget to release a mutex (which, in general, will promptly lead to serious
|
||||
problems). See \helpref{wxMutex}{wxmutex} for an example of wxMutexLocker
|
||||
usage.
|
||||
|
||||
|
@@ -20,8 +20,8 @@ decrements the counter. As soon as it reaches $0$, any subsequent calls to
|
||||
counter becomes strictly positive again as the result of calling
|
||||
\helpref{Post}{wxsemaphorepost} which increments the counter.
|
||||
|
||||
In general, the semaphores are useful to restrict access to a shared resource
|
||||
which can only be accessed by some fixed number of clients at once. For
|
||||
In general, semaphores are useful to restrict access to a shared resource
|
||||
which can only be accessed by some fixed number of clients at the same time. For
|
||||
example, when modeling a hotel reservation system a semaphore with the counter
|
||||
equal to the total number of available rooms could be created. Each time a room
|
||||
is reserved, the semaphore should be acquired by calling
|
||||
@@ -43,7 +43,7 @@ No base class
|
||||
\func{}{wxSemaphore}{\param{int }{initialcount = 0}, \param{int }{maxcount = 0}}
|
||||
|
||||
Specifying a {\it maxcount} of $0$ actually makes wxSemaphore behave as if
|
||||
there is no upper limit. If maxcount is $1$ the semaphore behaves exactly as a
|
||||
there is no upper limit. If maxcount is $1$, the semaphore behaves exactly as a
|
||||
mutex.
|
||||
|
||||
{\it initialcount} is the initial value of the semaphore which must be between
|
||||
|
@@ -540,11 +540,11 @@ protected:
|
||||
Yes
|
||||
} m_exitOnFrameDelete;
|
||||
|
||||
// true if the apps whats to use the best visual on systems where
|
||||
// true if the app wants to use the best visual on systems where
|
||||
// more than one are available (Sun, SGI, XFree86 4.0 ?)
|
||||
bool m_useBestVisual;
|
||||
|
||||
// does any of our windows has focus?
|
||||
// does any of our windows have focus?
|
||||
bool m_isActive;
|
||||
|
||||
|
||||
@@ -635,7 +635,7 @@ public:
|
||||
#define IMPLEMENT_WXWIN_MAIN_CONSOLE \
|
||||
int main(int argc, char **argv) { return wxEntry(argc, argv); }
|
||||
|
||||
// port-specific header could have defined it already in some special wau
|
||||
// port-specific header could have defined it already in some special way
|
||||
#ifndef IMPLEMENT_WXWIN_MAIN
|
||||
#define IMPLEMENT_WXWIN_MAIN IMPLEMENT_WXWIN_MAIN_CONSOLE
|
||||
#endif // defined(IMPLEMENT_WXWIN_MAIN)
|
||||
|
@@ -376,10 +376,10 @@ struct WXDLLIMPEXP_ODBC wxDbSqlTypeInfo
|
||||
class WXDLLIMPEXP_ODBC wxDbColFor
|
||||
{
|
||||
public:
|
||||
wxString s_Field; // Formated String for Output
|
||||
wxString s_Format[7]; // Formated Objects - TIMESTAMP has the biggest (7)
|
||||
wxString s_Amount[7]; // Formated Objects - amount of things that can be formatted
|
||||
int i_Amount[7]; // Formated Objects - TT MM YYYY HH MM SS m
|
||||
wxString s_Field; // Formatted String for Output
|
||||
wxString s_Format[7]; // Formatted Objects - TIMESTAMP has the biggest (7)
|
||||
wxString s_Amount[7]; // Formatted Objects - amount of things that can be formatted
|
||||
int i_Amount[7]; // Formatted Objects - TT MM YYYY HH MM SS m
|
||||
int i_Nation; // 0 = timestamp , 1=EU, 2=UK, 3=International, 4=US
|
||||
int i_dbDataType; // conversion of the 'sqlDataType' to the generic data type used by these classes
|
||||
SWORD i_sqlDataType;
|
||||
|
@@ -79,7 +79,7 @@ public:
|
||||
// remove all pages
|
||||
bool DeleteAllPages();
|
||||
|
||||
// adds a new page to the notebook (it will be deleted ny the notebook,
|
||||
// adds a new page to the notebook (it will be deleted by the notebook,
|
||||
// don't delete it yourself). If bSelect, this page becomes active.
|
||||
// the same as AddPage(), but adds it at the specified position
|
||||
bool InsertPage( size_t position,
|
||||
|
@@ -130,7 +130,7 @@ public:
|
||||
void OnIdle(wxIdleEvent& WXUNUSED(event)) {}
|
||||
|
||||
// wxGTK-specific: called recursively by Enable,
|
||||
// to give widgets an oppprtunity to correct their colours after they
|
||||
// to give widgets an opportunity to correct their colours after they
|
||||
// have been changed by Enable
|
||||
virtual void OnParentEnable( bool WXUNUSED(enable) ) {}
|
||||
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
// The methods below are required because many native widgets
|
||||
// are composed of several subwidgets and setting a style for
|
||||
// the widget means setting it for all subwidgets as well.
|
||||
// also, it is nor clear, which native widget is the top
|
||||
// also, it is not clear which native widget is the top
|
||||
// widget where (most of) the input goes. even tooltips have
|
||||
// to be applied to all subwidgets.
|
||||
virtual GtkWidget* GetConnectWidget();
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
// scrolbar in sync (this does not generate any wx events)
|
||||
void GtkUpdateScrollbar(int orient);
|
||||
|
||||
// Called from GTK signales handlers. it indicates that
|
||||
// Called from GTK signal handlers. it indicates that
|
||||
// the layouting functions have to be called later on
|
||||
// (i.e. in idle time, implemented in OnInternalIdle() ).
|
||||
void GtkUpdateSize() { m_sizeSet = false; }
|
||||
|
@@ -79,7 +79,7 @@ public:
|
||||
// remove all pages
|
||||
bool DeleteAllPages();
|
||||
|
||||
// adds a new page to the notebook (it will be deleted ny the notebook,
|
||||
// adds a new page to the notebook (it will be deleted by the notebook,
|
||||
// don't delete it yourself). If bSelect, this page becomes active.
|
||||
// the same as AddPage(), but adds it at the specified position
|
||||
bool InsertPage( size_t position,
|
||||
|
@@ -130,7 +130,7 @@ public:
|
||||
void OnIdle(wxIdleEvent& WXUNUSED(event)) {}
|
||||
|
||||
// wxGTK-specific: called recursively by Enable,
|
||||
// to give widgets an oppprtunity to correct their colours after they
|
||||
// to give widgets an opportunity to correct their colours after they
|
||||
// have been changed by Enable
|
||||
virtual void OnParentEnable( bool WXUNUSED(enable) ) {}
|
||||
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
// The methods below are required because many native widgets
|
||||
// are composed of several subwidgets and setting a style for
|
||||
// the widget means setting it for all subwidgets as well.
|
||||
// also, it is nor clear, which native widget is the top
|
||||
// also, it is not clear which native widget is the top
|
||||
// widget where (most of) the input goes. even tooltips have
|
||||
// to be applied to all subwidgets.
|
||||
virtual GtkWidget* GetConnectWidget();
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
// scrolbar in sync (this does not generate any wx events)
|
||||
void GtkUpdateScrollbar(int orient);
|
||||
|
||||
// Called from GTK signales handlers. it indicates that
|
||||
// Called from GTK signal handlers. it indicates that
|
||||
// the layouting functions have to be called later on
|
||||
// (i.e. in idle time, implemented in OnInternalIdle() ).
|
||||
void GtkUpdateSize() { m_sizeSet = false; }
|
||||
|
@@ -151,7 +151,7 @@ public:
|
||||
// convert to native long long
|
||||
wxLongLong_t GetValue() const { return m_ll; }
|
||||
|
||||
// convert to long with range checking in the debug mode (only!)
|
||||
// convert to long with range checking in debug mode (only!)
|
||||
long ToLong() const
|
||||
{
|
||||
wxASSERT_MSG( (m_ll >= LONG_MIN) && (m_ll <= LONG_MAX),
|
||||
@@ -350,7 +350,7 @@ public:
|
||||
// convert to native ulong long
|
||||
wxULongLong_t GetValue() const { return m_ll; }
|
||||
|
||||
// convert to ulong with range checking in the debug mode (only!)
|
||||
// convert to ulong with range checking in debug mode (only!)
|
||||
unsigned long ToULong() const
|
||||
{
|
||||
wxASSERT_MSG( m_ll <= LONG_MAX,
|
||||
@@ -580,7 +580,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
// convert to long with range checking in the debug mode (only!)
|
||||
// convert to long with range checking in debug mode (only!)
|
||||
long ToLong() const
|
||||
{
|
||||
wxASSERT_MSG( (m_hi == 0l) || (m_hi == -1l),
|
||||
@@ -778,7 +778,7 @@ public:
|
||||
// get low part
|
||||
unsigned long GetLo() const { return m_lo; }
|
||||
|
||||
// convert to long with range checking in the debug mode (only!)
|
||||
// convert to long with range checking in debug mode (only!)
|
||||
unsigned long ToULong() const
|
||||
{
|
||||
wxASSERT_MSG( m_hi == 0ul,
|
||||
|
@@ -262,7 +262,7 @@ protected:
|
||||
// initializes the string to the empty value (must be called only from
|
||||
// ctors, use Reinit() otherwise)
|
||||
void Init() { m_pchData = (wxChar *)wxEmptyString; }
|
||||
// initializaes the string with (a part of) C-string
|
||||
// initializes the string with (a part of) C-string
|
||||
void InitWith(const wxChar *psz, size_t nPos = 0, size_t nLen = npos);
|
||||
// as Init, but also frees old data
|
||||
void Reinit() { GetStringData()->Unlock(); Init(); }
|
||||
@@ -1075,7 +1075,7 @@ public:
|
||||
// convert to a double
|
||||
bool ToDouble(double *val) const;
|
||||
|
||||
// formated input/output
|
||||
// formatted input/output
|
||||
// as sprintf(), returns the number of characters written or < 0 on error
|
||||
// (take 'this' into account in attribute parameter count)
|
||||
int Printf(const wxChar *pszFormat, ...) ATTRIBUTE_PRINTF_2;
|
||||
|
@@ -324,19 +324,19 @@ public:
|
||||
wxCondError Wait();
|
||||
|
||||
// exactly as Wait() except that it may also return if the specified
|
||||
// timeout ellapses even if the condition hasn't been signalled: in this
|
||||
// timeout elapses even if the condition hasn't been signalled: in this
|
||||
// case, the return value is false, otherwise (i.e. in case of a normal
|
||||
// return) it is true
|
||||
//
|
||||
// the timeeout parameter specifies a interval that needs to be waited in
|
||||
// milliseconds
|
||||
// the timeout parameter specifies an interval that needs to be waited for
|
||||
// in milliseconds
|
||||
wxCondError WaitTimeout(unsigned long milliseconds);
|
||||
|
||||
// NB: the associated mutex may or may not be locked by the calling thread
|
||||
//
|
||||
// this method unblocks one thread if any are blocking on the condition.
|
||||
// if no thread is blocking in Wait(), then the signal is NOT remembered
|
||||
// The thread which was blocking on Wait(), will then reacquire the lock
|
||||
// The thread which was blocking on Wait() will then reacquire the lock
|
||||
// on the associated mutex object before returning
|
||||
wxCondError Signal();
|
||||
|
||||
@@ -344,7 +344,7 @@ public:
|
||||
//
|
||||
// this method unblocks all threads if any are blocking on the condition.
|
||||
// if no thread is blocking in Wait(), then the signal is NOT remembered
|
||||
// The threads which were blocking on Wait(), will then reacquire the lock
|
||||
// The threads which were blocking on Wait() will then reacquire the lock
|
||||
// on the associated mutex object before returning.
|
||||
wxCondError Broadcast();
|
||||
|
||||
@@ -387,7 +387,7 @@ public:
|
||||
wxSemaError TryWait();
|
||||
|
||||
// same as Wait(), but as a timeout limit, returns wxSEMA_NO_ERROR if the
|
||||
// semaphore was acquired and wxSEMA_TIMEOUT if the timeout has ellapsed
|
||||
// semaphore was acquired and wxSEMA_TIMEOUT if the timeout has elapsed
|
||||
wxSemaError WaitTimeout(unsigned long milliseconds);
|
||||
|
||||
// increments the semaphore count and signals one of the waiting threads
|
||||
@@ -436,7 +436,7 @@ public:
|
||||
// Returns true if current thread is the main thread.
|
||||
static bool IsMain();
|
||||
|
||||
// Release the rest of our time slice leting the other threads run
|
||||
// Release the rest of our time slice letting the other threads run
|
||||
static void Yield();
|
||||
|
||||
// Sleep during the specified period of time in milliseconds
|
||||
@@ -502,9 +502,9 @@ public:
|
||||
ExitCode Wait();
|
||||
|
||||
// kills the thread without giving it any chance to clean up - should
|
||||
// not be used in normal circumstances, use Delete() instead. It is a
|
||||
// dangerous function that should only be used in the most extreme
|
||||
// cases!
|
||||
// not be used under normal circumstances, use Delete() instead.
|
||||
// It is a dangerous function that should only be used in the most
|
||||
// extreme cases!
|
||||
//
|
||||
// The wxThread object is deleted by Kill() if the thread is
|
||||
// detachable, but you still have to delete it manually for joinable
|
||||
|
@@ -956,7 +956,7 @@ public:
|
||||
void DeleteRelatedConstraints();
|
||||
void ResetConstraints();
|
||||
|
||||
// these methods may be overriden for special layout algorithms
|
||||
// these methods may be overridden for special layout algorithms
|
||||
virtual void SetConstraintSizes(bool recurse = true);
|
||||
virtual bool LayoutPhase1(int *noChanges);
|
||||
virtual bool LayoutPhase2(int *noChanges);
|
||||
|
@@ -1104,7 +1104,7 @@ void wxEvtHandler::AddPendingEvent(wxEvent& event)
|
||||
|
||||
wxLEAVE_CRIT_SECT(*wxPendingEventsLocker);
|
||||
|
||||
// 3) Inform the system that new pending events are somwehere,
|
||||
// 3) Inform the system that new pending events are somewhere,
|
||||
// and that these should be processed in idle time.
|
||||
wxWakeUpIdle();
|
||||
}
|
||||
|
@@ -762,7 +762,7 @@ bool wxSocketBase::WaitForRead(long seconds, long milliseconds)
|
||||
return true;
|
||||
|
||||
// Note that GSOCK_INPUT_LOST has to be explicitly passed to
|
||||
// _Wait becuase of the semantics of WaitForRead: a return
|
||||
// _Wait because of the semantics of WaitForRead: a return
|
||||
// value of true means that a GSocket_Read call will return
|
||||
// immediately, not that there is actually data to read.
|
||||
|
||||
|
@@ -2520,7 +2520,7 @@ bool wxWindowBase::TryValidator(wxEvent& wxVALIDATOR_PARAM(event))
|
||||
|
||||
bool wxWindowBase::TryParent(wxEvent& event)
|
||||
{
|
||||
// carry on up the parent-child hierarchy if the propgation count hasn't
|
||||
// carry on up the parent-child hierarchy if the propagation count hasn't
|
||||
// reached zero yet
|
||||
if ( event.ShouldPropagate() )
|
||||
{
|
||||
|
@@ -31,7 +31,7 @@
|
||||
|
||||
#if wxUSE_DATETIME
|
||||
|
||||
// Enables a grid cell to display a formated date and or time
|
||||
// Enables a grid cell to display a formatted date and or time
|
||||
|
||||
wxGridCellDateTimeRenderer::wxGridCellDateTimeRenderer(const wxString& outformat, const wxString& informat)
|
||||
{
|
||||
|
@@ -223,7 +223,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
|
||||
|
||||
// Disable GTK's broken events ...
|
||||
gtk_signal_disconnect( GTK_OBJECT(combo->entry), combo->entry_change_id );
|
||||
// ... and add surogate handler.
|
||||
// ... and add surrogate handler.
|
||||
combo->entry_change_id = gtk_signal_connect (GTK_OBJECT (combo->entry), "changed",
|
||||
(GtkSignalFunc) gtk_dummy_callback, combo);
|
||||
|
||||
|
@@ -133,7 +133,7 @@ extern GtkContainerClass *pizza_parent_class;
|
||||
|
||||
All windows must have a widget, with which they interact with other under-
|
||||
lying GTK widgets. It is this widget, e.g. that has to be resized etc and
|
||||
thw wxWindow class has a member variable called m_widget which holds a
|
||||
the wxWindow class has a member variable called m_widget which holds a
|
||||
pointer to this widget. When the window class represents a GTK native widget,
|
||||
this is (in most cases) the only GTK widget the class manages. E.g. the
|
||||
wxStaticText class handles only a GtkLabel widget a pointer to which you
|
||||
@@ -173,27 +173,27 @@ extern GtkContainerClass *pizza_parent_class;
|
||||
|
||||
III)
|
||||
|
||||
Singularily the most broken code in GTK is the code that is supposes to
|
||||
Singularily the most broken code in GTK is the code that is supposed to
|
||||
inform subwindows (child windows) about new positions. Very often, duplicate
|
||||
events are sent without changes in size or position, equally often no
|
||||
events are sent at all (All this is due to a bug in the GtkContainer code
|
||||
which got fixed in GTK 1.2.6). For that reason, wxGTK completely ignores
|
||||
GTK's own system and it simply waits for size events for toplevel windows
|
||||
and then iterates down the respective size events to all window. This has
|
||||
the disadvantage, that windows might get size events before the GTK widget
|
||||
the disadvantage that windows might get size events before the GTK widget
|
||||
actually has the reported size. This doesn't normally pose any problem, but
|
||||
the OpenGl drawing routines rely on correct behaviour. Therefore, I have
|
||||
the OpenGL drawing routines rely on correct behaviour. Therefore, I have
|
||||
added the m_nativeSizeEvents flag, which is true only for the OpenGL canvas,
|
||||
i.e. the wxGLCanvas will emit a size event, when (and not before) the X11
|
||||
window that is used for OpenGl output really has that size (as reported by
|
||||
window that is used for OpenGL output really has that size (as reported by
|
||||
GTK).
|
||||
|
||||
IV)
|
||||
|
||||
If someone at some point of time feels the immense desire to have a look at,
|
||||
change or attempt to optimse the Refresh() logic, this person will need an
|
||||
intimate understanding of what a "draw" and what an "expose" events are and
|
||||
what there are used for, in particular when used in connection with GTK's
|
||||
change or attempt to optimise the Refresh() logic, this person will need an
|
||||
intimate understanding of what "draw" and "expose" events are and what
|
||||
they are used for, in particular when used in connection with GTK's
|
||||
own windowless widgets. Beware.
|
||||
|
||||
V)
|
||||
@@ -205,7 +205,7 @@ extern GtkContainerClass *pizza_parent_class;
|
||||
and ending with the youngest generation (speaking of parent and child windows).
|
||||
Also don't forget that cursors (like much else) are connected to GdkWindows,
|
||||
not GtkWidgets and that the "window" field of a GtkWidget might very well
|
||||
point to the GdkWindow of the parent widget (-> "window less widget") and
|
||||
point to the GdkWindow of the parent widget (-> "window-less widget") and
|
||||
that the two obviously have very different meanings.
|
||||
|
||||
*/
|
||||
@@ -560,7 +560,7 @@ static int gtk_window_expose_callback( GtkWidget *widget,
|
||||
win->GtkSendPaintEvents();
|
||||
|
||||
|
||||
// Let parent window draw window less widgets
|
||||
// Let parent window draw window-less widgets
|
||||
(* GTK_WIDGET_CLASS (pizza_parent_class)->expose_event) (widget, gdk_event);
|
||||
#else
|
||||
// This gets called immediately after an expose event
|
||||
@@ -1061,7 +1061,7 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& event,
|
||||
}
|
||||
|
||||
// we want to always get the same key code when the same key is
|
||||
// pressed regardless of the state of the modifies, i.e. on a
|
||||
// pressed regardless of the state of the modifiers, i.e. on a
|
||||
// standard US keyboard pressing '5' or '%' ('5' key with
|
||||
// Shift) should result in the same key code in OnKeyDown():
|
||||
// '5' (although OnChar() will get either '5' or '%').
|
||||
@@ -1235,7 +1235,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
|
||||
const char* string = gdk_event->string;
|
||||
#endif
|
||||
|
||||
// Implement OnCharHook by checking ancesteror top level windows
|
||||
// Implement OnCharHook by checking ancestor top level windows
|
||||
wxWindow *parent = win;
|
||||
while (parent && !parent->IsTopLevel())
|
||||
parent = parent->GetParent();
|
||||
@@ -1313,7 +1313,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
|
||||
|
||||
event.m_keyCode = key_code;
|
||||
|
||||
// Implement OnCharHook by checking ancesteror top level windows
|
||||
// Implement OnCharHook by checking ancestor top level windows
|
||||
wxWindow *parent = win;
|
||||
while (parent && !parent->IsTopLevel())
|
||||
parent = parent->GetParent();
|
||||
@@ -1338,7 +1338,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
|
||||
// win is a control: tab can be propagated up
|
||||
if ( !ret &&
|
||||
((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab)) &&
|
||||
// VZ: testing for wxTE_PROCESS_TAB shouldn't be done here the control may
|
||||
// VZ: testing for wxTE_PROCESS_TAB shouldn't be done here - the control may
|
||||
// have this style, yet choose not to process this particular TAB in which
|
||||
// case TAB must still work as a navigational character
|
||||
// JS: enabling again to make consistent with other platforms
|
||||
@@ -1488,7 +1488,7 @@ static gint gtk_window_key_release_callback( GtkWidget *widget,
|
||||
wxKeyEvent event( wxEVT_KEY_UP );
|
||||
if ( !wxTranslateGTKKeyEventToWx(event, win, gdk_event) )
|
||||
{
|
||||
// unknown key pressed, ignore (the event would be useless anyhow
|
||||
// unknown key pressed, ignore (the event would be useless anyhow)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1675,7 +1675,7 @@ static gint gtk_window_button_press_callback( GtkWidget *widget,
|
||||
*/
|
||||
}
|
||||
|
||||
// GDK sends surplus button down event
|
||||
// GDK sends surplus button down events
|
||||
// before a double click event. We
|
||||
// need to filter these out.
|
||||
if (gdk_event->type == GDK_BUTTON_PRESS)
|
||||
@@ -1791,12 +1791,12 @@ static gint gtk_window_button_press_callback( GtkWidget *widget,
|
||||
|
||||
AdjustEventButtonState(event);
|
||||
|
||||
// wxListBox actually get mouse events from the item, so we need to give it
|
||||
// wxListBox actually gets mouse events from the item, so we need to give it
|
||||
// a chance to correct this
|
||||
win->FixUpMouseEvent(widget, event.m_x, event.m_y);
|
||||
|
||||
// find the correct window to send the event too: it may be a different one
|
||||
// from the one which got it at GTK+ level because some control don't have
|
||||
// find the correct window to send the event to: it may be a different one
|
||||
// from the one which got it at GTK+ level because some controls don't have
|
||||
// their own X window and thus cannot get any events.
|
||||
if ( !g_captureWindow )
|
||||
win = FindWindowForMouseEvent(win, event.m_x, event.m_y);
|
||||
@@ -4478,7 +4478,7 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
|
||||
|
||||
// NOTE: if you change this code, you need to update
|
||||
// the same code in taskbar.cpp as well. This
|
||||
// is ugly code duplication, I know,
|
||||
// is ugly code duplication, I know.
|
||||
|
||||
SetInvokingWindow( menu, this );
|
||||
|
||||
|
@@ -223,7 +223,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
|
||||
|
||||
// Disable GTK's broken events ...
|
||||
gtk_signal_disconnect( GTK_OBJECT(combo->entry), combo->entry_change_id );
|
||||
// ... and add surogate handler.
|
||||
// ... and add surrogate handler.
|
||||
combo->entry_change_id = gtk_signal_connect (GTK_OBJECT (combo->entry), "changed",
|
||||
(GtkSignalFunc) gtk_dummy_callback, combo);
|
||||
|
||||
|
@@ -133,7 +133,7 @@ extern GtkContainerClass *pizza_parent_class;
|
||||
|
||||
All windows must have a widget, with which they interact with other under-
|
||||
lying GTK widgets. It is this widget, e.g. that has to be resized etc and
|
||||
thw wxWindow class has a member variable called m_widget which holds a
|
||||
the wxWindow class has a member variable called m_widget which holds a
|
||||
pointer to this widget. When the window class represents a GTK native widget,
|
||||
this is (in most cases) the only GTK widget the class manages. E.g. the
|
||||
wxStaticText class handles only a GtkLabel widget a pointer to which you
|
||||
@@ -173,27 +173,27 @@ extern GtkContainerClass *pizza_parent_class;
|
||||
|
||||
III)
|
||||
|
||||
Singularily the most broken code in GTK is the code that is supposes to
|
||||
Singularily the most broken code in GTK is the code that is supposed to
|
||||
inform subwindows (child windows) about new positions. Very often, duplicate
|
||||
events are sent without changes in size or position, equally often no
|
||||
events are sent at all (All this is due to a bug in the GtkContainer code
|
||||
which got fixed in GTK 1.2.6). For that reason, wxGTK completely ignores
|
||||
GTK's own system and it simply waits for size events for toplevel windows
|
||||
and then iterates down the respective size events to all window. This has
|
||||
the disadvantage, that windows might get size events before the GTK widget
|
||||
the disadvantage that windows might get size events before the GTK widget
|
||||
actually has the reported size. This doesn't normally pose any problem, but
|
||||
the OpenGl drawing routines rely on correct behaviour. Therefore, I have
|
||||
the OpenGL drawing routines rely on correct behaviour. Therefore, I have
|
||||
added the m_nativeSizeEvents flag, which is true only for the OpenGL canvas,
|
||||
i.e. the wxGLCanvas will emit a size event, when (and not before) the X11
|
||||
window that is used for OpenGl output really has that size (as reported by
|
||||
window that is used for OpenGL output really has that size (as reported by
|
||||
GTK).
|
||||
|
||||
IV)
|
||||
|
||||
If someone at some point of time feels the immense desire to have a look at,
|
||||
change or attempt to optimse the Refresh() logic, this person will need an
|
||||
intimate understanding of what a "draw" and what an "expose" events are and
|
||||
what there are used for, in particular when used in connection with GTK's
|
||||
change or attempt to optimise the Refresh() logic, this person will need an
|
||||
intimate understanding of what "draw" and "expose" events are and what
|
||||
they are used for, in particular when used in connection with GTK's
|
||||
own windowless widgets. Beware.
|
||||
|
||||
V)
|
||||
@@ -205,7 +205,7 @@ extern GtkContainerClass *pizza_parent_class;
|
||||
and ending with the youngest generation (speaking of parent and child windows).
|
||||
Also don't forget that cursors (like much else) are connected to GdkWindows,
|
||||
not GtkWidgets and that the "window" field of a GtkWidget might very well
|
||||
point to the GdkWindow of the parent widget (-> "window less widget") and
|
||||
point to the GdkWindow of the parent widget (-> "window-less widget") and
|
||||
that the two obviously have very different meanings.
|
||||
|
||||
*/
|
||||
@@ -560,7 +560,7 @@ static int gtk_window_expose_callback( GtkWidget *widget,
|
||||
win->GtkSendPaintEvents();
|
||||
|
||||
|
||||
// Let parent window draw window less widgets
|
||||
// Let parent window draw window-less widgets
|
||||
(* GTK_WIDGET_CLASS (pizza_parent_class)->expose_event) (widget, gdk_event);
|
||||
#else
|
||||
// This gets called immediately after an expose event
|
||||
@@ -1061,7 +1061,7 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& event,
|
||||
}
|
||||
|
||||
// we want to always get the same key code when the same key is
|
||||
// pressed regardless of the state of the modifies, i.e. on a
|
||||
// pressed regardless of the state of the modifiers, i.e. on a
|
||||
// standard US keyboard pressing '5' or '%' ('5' key with
|
||||
// Shift) should result in the same key code in OnKeyDown():
|
||||
// '5' (although OnChar() will get either '5' or '%').
|
||||
@@ -1235,7 +1235,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
|
||||
const char* string = gdk_event->string;
|
||||
#endif
|
||||
|
||||
// Implement OnCharHook by checking ancesteror top level windows
|
||||
// Implement OnCharHook by checking ancestor top level windows
|
||||
wxWindow *parent = win;
|
||||
while (parent && !parent->IsTopLevel())
|
||||
parent = parent->GetParent();
|
||||
@@ -1313,7 +1313,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
|
||||
|
||||
event.m_keyCode = key_code;
|
||||
|
||||
// Implement OnCharHook by checking ancesteror top level windows
|
||||
// Implement OnCharHook by checking ancestor top level windows
|
||||
wxWindow *parent = win;
|
||||
while (parent && !parent->IsTopLevel())
|
||||
parent = parent->GetParent();
|
||||
@@ -1338,7 +1338,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
|
||||
// win is a control: tab can be propagated up
|
||||
if ( !ret &&
|
||||
((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab)) &&
|
||||
// VZ: testing for wxTE_PROCESS_TAB shouldn't be done here the control may
|
||||
// VZ: testing for wxTE_PROCESS_TAB shouldn't be done here - the control may
|
||||
// have this style, yet choose not to process this particular TAB in which
|
||||
// case TAB must still work as a navigational character
|
||||
// JS: enabling again to make consistent with other platforms
|
||||
@@ -1488,7 +1488,7 @@ static gint gtk_window_key_release_callback( GtkWidget *widget,
|
||||
wxKeyEvent event( wxEVT_KEY_UP );
|
||||
if ( !wxTranslateGTKKeyEventToWx(event, win, gdk_event) )
|
||||
{
|
||||
// unknown key pressed, ignore (the event would be useless anyhow
|
||||
// unknown key pressed, ignore (the event would be useless anyhow)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1675,7 +1675,7 @@ static gint gtk_window_button_press_callback( GtkWidget *widget,
|
||||
*/
|
||||
}
|
||||
|
||||
// GDK sends surplus button down event
|
||||
// GDK sends surplus button down events
|
||||
// before a double click event. We
|
||||
// need to filter these out.
|
||||
if (gdk_event->type == GDK_BUTTON_PRESS)
|
||||
@@ -1791,12 +1791,12 @@ static gint gtk_window_button_press_callback( GtkWidget *widget,
|
||||
|
||||
AdjustEventButtonState(event);
|
||||
|
||||
// wxListBox actually get mouse events from the item, so we need to give it
|
||||
// wxListBox actually gets mouse events from the item, so we need to give it
|
||||
// a chance to correct this
|
||||
win->FixUpMouseEvent(widget, event.m_x, event.m_y);
|
||||
|
||||
// find the correct window to send the event too: it may be a different one
|
||||
// from the one which got it at GTK+ level because some control don't have
|
||||
// find the correct window to send the event to: it may be a different one
|
||||
// from the one which got it at GTK+ level because some controls don't have
|
||||
// their own X window and thus cannot get any events.
|
||||
if ( !g_captureWindow )
|
||||
win = FindWindowForMouseEvent(win, event.m_x, event.m_y);
|
||||
@@ -4478,7 +4478,7 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
|
||||
|
||||
// NOTE: if you change this code, you need to update
|
||||
// the same code in taskbar.cpp as well. This
|
||||
// is ugly code duplication, I know,
|
||||
// is ugly code duplication, I know.
|
||||
|
||||
SetInvokingWindow( menu, this );
|
||||
|
||||
|
@@ -87,7 +87,7 @@ wxDialog::~wxDialog()
|
||||
Show(FALSE);
|
||||
}
|
||||
|
||||
// By default, pressing escape cancels the dialog , on mac command-stop does the same thing
|
||||
// By default, pressing escape cancels the dialog; on mac command-stop does the same thing
|
||||
void wxDialog::OnCharHook(wxKeyEvent& event)
|
||||
{
|
||||
if (( event.m_keyCode == WXK_ESCAPE ||
|
||||
|
@@ -30,8 +30,8 @@ END_EVENT_TABLE()
|
||||
#define wxSLIDER_BORDERTEXT 5
|
||||
|
||||
/* NB! The default orientation for a slider is horizontal however if the user specifies
|
||||
* some slider styles but dosen't specify the orientation we have to assume he wants a
|
||||
* horizontal one. Therefore in this file when testing for the sliders orientation
|
||||
* some slider styles but doesn't specify the orientation we have to assume he wants a
|
||||
* horizontal one. Therefore in this file when testing for the slider's orientation
|
||||
* vertical is tested for if this is not set then we use the horizontal one
|
||||
* eg. if(GetWindowStyle() & wxSL_VERTICAL) {} else { horizontal case }>
|
||||
*/
|
||||
|
@@ -143,7 +143,7 @@ static unsigned GetBasicFlags(const wxChar* filename)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// The following will most likely will not modify anything not set above,
|
||||
// The following most likely will not modify anything not set above,
|
||||
// and will not work at all for network shares or empty CD ROM drives.
|
||||
// But it is a good check if the Win API ever gets better about reporting
|
||||
// this information.
|
||||
|
@@ -220,7 +220,7 @@ static void EnsureParentHasControlParentStyle(wxWindow *parent)
|
||||
get back to the initial (focused) window: as we do have this style,
|
||||
GetNextDlgTabItem() will leave this window and continue in its parent,
|
||||
but if the parent doesn't have it, it wouldn't recurse inside it later
|
||||
on and so wouldn't have a chance of getting back to this window neither.
|
||||
on and so wouldn't have a chance of getting back to this window either.
|
||||
*/
|
||||
while ( parent && !parent->IsTopLevel() )
|
||||
{
|
||||
@@ -394,7 +394,7 @@ wxWindow *wxWindowMSW::FindItem(long id) const
|
||||
wxControl *item = wxDynamicCastThis(wxControl);
|
||||
if ( item )
|
||||
{
|
||||
// is it we or one of our "internal" children?
|
||||
// is it us or one of our "internal" children?
|
||||
if ( item->GetId() == id
|
||||
#ifndef __WXUNIVERSAL__
|
||||
|| (item->GetSubcontrols().Index(id) != wxNOT_FOUND)
|
||||
@@ -513,7 +513,7 @@ wxWindowMSW::~wxWindowMSW()
|
||||
#endif // __WXUNIVERSAL__
|
||||
|
||||
// VS: destroy children first and _then_ detach *this from its parent.
|
||||
// If we'd do it the other way around, children wouldn't be able
|
||||
// If we did it the other way around, children wouldn't be able
|
||||
// find their parent frame (see above).
|
||||
DestroyChildren();
|
||||
|
||||
@@ -665,7 +665,7 @@ bool wxWindowMSW::Enable(bool enable)
|
||||
|
||||
if ( enable )
|
||||
{
|
||||
// enable the child back unless it had been disabled before us
|
||||
// re-enable the child unless it had been disabled before us
|
||||
if ( !m_childrenDisabled || !m_childrenDisabled->Find(child) )
|
||||
child->Enable();
|
||||
}
|
||||
@@ -1039,7 +1039,7 @@ void wxWindowMSW::SubclassWin(WXHWND hWnd)
|
||||
}
|
||||
else
|
||||
{
|
||||
// don't bother restoring it neither: this also makes it easy to
|
||||
// don't bother restoring it either: this also makes it easy to
|
||||
// implement IsOfStandardClass() method which returns true for the
|
||||
// standard controls and false for the wxWidgets own windows as it can
|
||||
// simply check m_oldWndProc
|
||||
@@ -1203,7 +1203,7 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
|
||||
|
||||
// using this flag results in very significant reduction in flicker,
|
||||
// especially with controls inside the static boxes (as the interior of the
|
||||
// box is not redrawn twice).but sometimes results in redraw problems, so
|
||||
// box is not redrawn twice), but sometimes results in redraw problems, so
|
||||
// optionally allow the old code to continue to use it provided a special
|
||||
// system option is turned on
|
||||
if ( !wxSystemOptions::GetOptionInt(wxT("msw.window.no-clip-children"))
|
||||
@@ -1447,7 +1447,7 @@ void wxWindowMSW::SetDropTarget(wxDropTarget *pDropTarget)
|
||||
}
|
||||
#endif // wxUSE_DRAG_AND_DROP
|
||||
|
||||
// old style file-manager drag&drop support: we retain the old-style
|
||||
// old-style file manager drag&drop support: we retain the old-style
|
||||
// DragAcceptFiles in parallel with SetDropTarget.
|
||||
void wxWindowMSW::DragAcceptFiles(bool WXUNUSED_IN_WINCE(accept))
|
||||
{
|
||||
@@ -1740,7 +1740,7 @@ void wxWindowMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
|
||||
void wxWindowMSW::DoSetClientSize(int width, int height)
|
||||
{
|
||||
// setting the client size is less obvious than it it could have been
|
||||
// setting the client size is less obvious than it could have been
|
||||
// because in the result of changing the total size the window scrollbar
|
||||
// may [dis]appear and/or its menubar may [un]wrap and so the client size
|
||||
// will not be correct as the difference between the total and client size
|
||||
@@ -1908,7 +1908,7 @@ bool wxWindowMSW::DoPopupMenu(wxMenu *menu, int x, int y)
|
||||
#endif
|
||||
::TrackPopupMenu(hMenu, flags, point.x, point.y, 0, hWnd, NULL);
|
||||
|
||||
// we need to do it righ now as otherwise the events are never going to be
|
||||
// we need to do it right now as otherwise the events are never going to be
|
||||
// sent to wxCurrentPopupMenu from HandleCommand()
|
||||
//
|
||||
// note that even eliminating (ugly) wxCurrentPopupMenu global wouldn't
|
||||
@@ -2111,7 +2111,7 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
|
||||
{
|
||||
// ::IsDialogMessage() is broken and may sometimes hang the
|
||||
// application by going into an infinite loop, so we try to detect
|
||||
// [some of] the situatations when this may happen and not call it
|
||||
// [some of] the situations when this may happen and not call it
|
||||
// then
|
||||
|
||||
// assume we can call it by default
|
||||
@@ -2132,7 +2132,7 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
|
||||
#if !defined(__WXWINCE__)
|
||||
if ( ::GetWindowLong(hwndFocus, GWL_EXSTYLE) & WS_EX_CONTROLPARENT )
|
||||
{
|
||||
// passimistic by default
|
||||
// pessimistic by default
|
||||
canSafelyCallIsDlgMsg = false;
|
||||
for ( wxWindowList::compatibility_iterator node = GetChildren().GetFirst();
|
||||
node;
|
||||
@@ -2682,7 +2682,7 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
|
||||
{
|
||||
switch ( wParam )
|
||||
{
|
||||
// we consider these message "not interesting" to OnChar, so
|
||||
// we consider these messages "not interesting" to OnChar, so
|
||||
// just don't do anything more with them
|
||||
case VK_SHIFT:
|
||||
case VK_CONTROL:
|
||||
|
@@ -297,7 +297,7 @@ void wxFrame::PositionStatusBar()
|
||||
{
|
||||
vError = ::WinGetLastError(vHabmain);
|
||||
sError = wxPMErrorToStr(vError);
|
||||
wxLogError(_T("Error setting parent for StautsBar. Error: %s\n"), sError.c_str());
|
||||
wxLogError(_T("Error setting parent for StatusBar. Error: %s\n"), sError.c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -602,7 +602,7 @@ bool wxTopLevelWindowOS2::Create(
|
||||
if (GetExtraStyle() & wxTOPLEVEL_EX_DIALOG)
|
||||
{
|
||||
//
|
||||
// We have different dialog templates to allows creation of dialogs
|
||||
// We have different dialog templates to allow creation of dialogs
|
||||
// with & without captions under OS2indows, resizeable or not (but a
|
||||
// resizeable dialog always has caption - otherwise it would look too
|
||||
// strange)
|
||||
|
@@ -339,7 +339,7 @@ bool wxWindow::DoDrawBackground(wxDC& dc)
|
||||
}
|
||||
else
|
||||
{
|
||||
// Draw background ouselves
|
||||
// Draw background ourselves
|
||||
EraseBackground( dc, rect );
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
# Please note that wx.lib.floatbar is not formally supported as
|
||||
# part of wxPython. If it works, fine. If not, unfortunate.
|
||||
# GTK users can use the wx.TB_DOCKABLE flag with a regular
|
||||
# wx.ToolBar, but everyone else has to take thier chances.
|
||||
# wx.ToolBar, but everyone else has to take their chances.
|
||||
#
|
||||
|
||||
import wx
|
||||
|
Reference in New Issue
Block a user