1. Fix object_ref so it at least works, with this I mean
XRC was not even handling the little sample in
tn0014.txt correct.
Hans Van Leemputten (hansvl)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Restore the wxWizard wxEVT_WIZARD_FINISHED
event, which was sent when the FINISHED button was
pressed and the wizard was finished. When the
wxWizard is modal this event is not needed. However,
when the wizard is non-modal this is the only way to
determine that the wizard has finished.
Scott Pleiter
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Benjamin I. Williams
Currently there is no way of receiving notification
that a user cancelled an edit operation on a wxTreeCtrl
tree node label.
This patch adds a method "IsEditCancelled" to the
wxTreeEvent class. During an EVT_TREE_END_LABEL_EDIT
event, the programmer can now determine whether or not
the edit operation was cancelled by the user (by
pressing <ESC>).
This patch provides this implementation for both
wxMSW's wxTreeCtrl and the wxGenericTreeCtrl. Both
situations have been tested and work well.
The patch is not very invasive, and is much smaller
than I had expected.
Please see the relevent discussion on the wx-dev list
for more details.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Benjamin I. Williams
This patch implements three new flags for the
wxTextCtrl control. The flags are wxTE_LEFT,
wxTE_CENTRE, and wxTE_RIGHT. These flags can change
the way text is aligned inside an edit control, which
is useful when the user is editing numbers or dates.
At Vadim's recommendation, the patch implements the
alignment flags so they are equal to the corresponding
wxALIGN_* value. wxTE_LEFT is actually 0x0000, and is
just a place holder. wxTE_CENTRE is equal to
wx_ALIGN_CENTER_HORIZONTAL (0x0100), and wxTE_RIGHT is
equal to wxALIGN_RIGHT (0x0100). I couldn't agree more
with this idea.
As Vadim pointed out, choosing to set the text
alignment flags to the corresponding wxALIGN_* flags
has a slight negative side effect: the values 0x0100
and 0x0200 collide with the existing flags
wxTE_NO_VSCROLL and wxTE_AUTO_SCROLL. A valid point
was raised, however, which stated that the flags would
never really be used at the same time, and also that
wxTE_AUTO_SCROLL is (possibly) going to be deprecated
anyway.
While this collision is not really a problem, I didn't
like the idea of someone specifying wxTE_NO_VSCROLL and
ending up with with a centered text control ! Thus, I
chose to move both wxTE_NO_VSCROLL and wxTE_AUTO_SCROLL
down to the free bits 0x0002 and 0x0008, respectively.
I'll leave the final say up to Vadim and the rest of
you whether you want to move these flags down or keep
them where they are (with collisions). What truly
matters to me is that I can now create text controls
with the proper alignment!
This patch also updates the documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1. works correctly (handles negative widths according to the docs/MSW/Univ)
2. has shorter and simpler GetFieldRect() implementation
3. ... which is also more efficient (pixel widths are cached)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
By Michael Fielding
As discussed on wx-dev. some fixes and improvements for Interprocess Communication (IPC), using DDE and TCP.
1. DDE buffers were using a global buffer
2. TCP buffers were allocated each time needed, and Request would have caused memory leaks had it been used.
Fixed these both by using a self-resizing buffer in wxConnectionBase. Changed samples and docs to reflect the improved (but backward compatible) internal buffer management. wxConnectionBase could (in future) use wxMemoryBuffer.
3. IPC sample had trouble closing, causing crash, when closing server using window X button.
Because it was (effectively) trying to delete a window in OnExit, when that window was already destroyed. Fixed by making IPCDialog and MyConnection remember if they'd destroyed each other. It's not elegant, but either the connection or the window could be deleted first.
4. Docs for wxDDE... and wxTCP... duplicated eachother, supposed to have same API. Some parts unclear.
Patch removes dde and tcp-specific files (including from tipc.tex and classes.tex), and explains how ipc.h selects for you which one to use based on platform. Some other misc clarifications.
6. Client sample was suffering apparent memory leak because of not deleting connection object, and had a hack in there to do that.
In fact this was due to the derived OnDisconnect not deleting itself, as it does in base class. Mentioned need to do it in docs, fixed sample so that it does.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
By Robert O'Connor
This is a patch to wxTip Provider classes used by the "Tip of the day" dialog.
See wx-dev archives August 2002 for discussion of the functionality design.
It does 5 things:
-Support for comments inside the tips file. The pound character (#) is used, as recommended by Vadim.
-Allows optional easy translation support to tips, by marking them as translatable for gettext, by enclosing them in a _(""). Program will translate these tips at runtime from the active catalog.
-Blank lines or lines with just spaces are automatically skipped (I had to put this in, I keep wondering why I get blank tips sometimes and it is because the text file had a empty blank line at the end of the text file).
-There is a pluggable virtual function to preprocess to modify the tip in a derived class, in case something specialized is desired, such as variable expansion, etc, as recommended by Julian and Vadim.
-Now resets the tip counter if the previous tip is past the end of the file (ie you removed some tips, or changed tip files), as discussed on wx-dev.
This patch updates:
-The classes.
-The class documentation and the Tip-of-the-day topic overview documentation.
-The dialogs example, placing some new strings for the tips.txt file which demonstrate how to use the Tip-of-the-day features for in practice.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Proposed fixes for the wxWindows joystick code under
MSW.
Some of these would be valid for other platforms, too.
Events for buttons are named wrong, docs say different.
Docs say EVT_JOY_BUTTON_DOWN and
EVT_JOY_BUTTON_UP,
but the code says EVT_JOY_DOWN and EVT_JOY_UP. I
suggest
changing the code to match the docs.
wxJoystick::GetNumberJoysticks() should be a static
member
function. Having to create a joystick object to see if there
are joysticks is silly.
Docs for GetNumberJoysticks() must be changed; it returns
the
number of potentially connected joysticks, not the number of
actually connected. Alternatively, GetNumberJoysticks() and
others must be rewritten to conform with documentation,
including
remapping of wxWindows sequential joystick ID's to match
MSW non-sequential joystick ID's.
dwSize is not set when joyGetPosEx() is called. SEVERE
ERROR.
Error return value from functions should not be a legal
return,
for instance, wxJoystick::GetPOVCTSPosition() returns 0
for error,
but this is a legal return value.
GetButtonState() supports only four (out of 32) buttons.
Also, should return as bitmap (LSB = button 1). (Win32
does this,
although not documented as such).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775