wxAuiNotebook doesn't store its page in the base class m_pages array, so
calling GetPage() on it via a wxBookCtrl pointer resulted in a crash.
Make GetPage() virtual to allow overriding it at wxAuiNotebook level.
Closes#13768.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It's annoying that the same code for hatched pens and brushes can't be reused
without relying on deprecated wxXXX_HATCH constants, so add new,
non-deprecated, wxHatchStyle enum that can be used in such code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make wxEntry(HINSTANCE, ...) available in wxGTK under Windows too.
Refactor the headers to allow this and extract Windows-specific wxEntry()
declarations in wx/msw/init.h from wx/msw/app.h for consistency with the
normal wxEntry(int, char**) declared in wx/init.h.
Closes#14423.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use wxBITMAP_TYPE_{BMP,CUR,ICON}_RESOURCE by default under Windows, even for
non-wxMSW ports.
Also allow loading wxImage from resources in all ports under MSW as a side
effect of this change.
Closes#14425.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
m_FontSize is in 1..7 range, not 0..6, so add 1 to it when setting it from the
index into m_FontsSizes array.
Also update the comment explaining the valid range of m_FontsSize.
Closes#14442.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxDIB can now be used with wxGTK under Windows, i.e. when not using wxMSW
version of wxBitmap but it can't be created from wxBitmap then as it doesn't
have a corresponding HBITMAP.
Simply disable this functionality when not using wxMSW.
Closes#14414.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to get rid of ugly preprocessor checks due to the fact that this
function could be defined in one or the other library depending on the port
used and also fix a problem with it being defined differently in the base
library depending on which GUI port (Carbon or Cocoa) was used under OS X.
It also fixes the problem with wxBell() in wxGTK under Windows.
Closes#14406.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When building wxGTK under Windows, some MSW-specific options can be defined
but can't be implemented when using GTK, forcefully disable them.
Also a few others that could be implemented but that don't work currently.
Finally, forcefully enable Cairo support as wxGTK always needs it.
Closes#14412.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When not using configure __WXGTKxxx__ symbols should still be defined, assume
we use a recent GTK 2.x version and define all of them.
Closes#14411.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Compiler TLS support is broken under Win32/MSVC when used for a code which is
part of a dynamically loaded DLL, so allow disabling it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This resulted in double border around wxListCtrl contents in wxOSX and almost
certainly other ports except wxGTK for which we already had an explicit
preprocessor check in the generic list control code. Remove it and simply
don't use any wxListCtrl-specific styles, including borders, for its main
window as it doesn't make any sense.
Closes#3701.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Creating a new wxString from c_str() of the old one resulted in dropping all
string data after the first embedded NUL. Fix this by using Clone() method
that exists specifically for this purpose. It also makes the code more clear.
Closes#14380.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
"LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that doesn't believe we're it's parent."
Avoid calling gtk_widget_destroy() on a wxMenuBar attached to a frame
Fixes#14292
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Show the "extension button" in the ribbon panel if this style is specified.
Also generate a specific event if this button is clicked.
Closes#14283.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use t_str() instead of wx_str() to make the code work correctly in UTF-8 build
in which wx_str() returns a pointer to UTF-8 buffer while we need a wchar_t
pointer for Windows.
Closes#14371.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add macros hiding the ugly casts needed to pass wxStrings to Windows API
functions and use them in a couple of places in wxBase to simplify the code.
Closes#14338.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We don't need double precision for determining the hash table fill rate and
using double constant also results in float-to-double promotion warnings from
gcc 4.7.
See #14362.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method draws only the grid lines for the cells in the specified range and
not for all of them.
It is not used yet but will be by the upcoming wxGrid::Render(), see #14294.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Extract the actual drawing of the lines into a new DoDrawGridLines() method.
This will be used by the upcoming commits for drawing grid lines for a part of
the grid only, see #14294.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxPluginLibrary objects had to be unloaded in exactly the reverse order to
which they were loaded in. This was not documented and was a serious
limitation for any realistic use of plugins anyhow, so fix it and allow
unloading them in any order now.
Instead of keeping a pointer to the last wxClassInfo not created by this
plugin, now keep a pointer to the first wxClassInfo that was created by it.
This makes the code slightly more complex but this pointer, unlike the old
one, remains valid even if another plugin was unloaded.
Closes#14261.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This header is used by public headers and hence is not really private, move it
to a better place and add it to the list of OSX headers in the bakefile.
Closes#14339.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Do not delete the client data in wxDataViewListCtrl, this class mainly exists
for compatibility with wxListCtrl and as the latter doesn't delete its client
data, neither should the former.
See #11088.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxAuiNotebook already inherits perfectly workable AdvanceSelection() and
GetCurrentPage() methods from wxBookCtrlBase, no need to reimplement them in
it.
See #14309.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Correct errors in TransformPoint() and TransformDistance().
Change Rotate() to interpret positive angles as rotating clockwise, for
consistency with wxGraphicsContext::Rotate().
Improve the unit test to verify that all the transformations work correctly.
Closes#14334.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxCHECK_W32API_VERSION() is only defined when using MinGW, don't use it an #if
test which is always parsed but only in a separate test inside #ifdef __GNUG__
test which is parsed only when we do use MinGW.
This fixes harmless but annoying warning from MSVC 10.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Clang doesn't accept "struct objc_object*" as synonym for "id" in Objective-C
code, so use the real "id" for it while still using the struct pointer for C++
code where "id" is not defined.
Closes#13565.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The control remained associated to the model so a dangling pointer could be
used if the model was destroyed after the control.
Fix this by removing the control from the model list of notifiers when it is
destroyed.
Closes#14124.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
g++ 4.8 recognizes "cpu" in WX_CC_MANIFEST expansion as a user-defined literal
suffix, add spaces around it to prevent this from happening.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fixed composite object positioning in centred and right-aligned
paragraphs.
Added field example to sample, and enabled pixel font size selection.
Added custom text and dimension scaling.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This signal has been removed from GTK3. Instead have wxPizza keep track of child
size, and use gtk_widget_set_size_request() for wxWindows in native containers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
VC9 and 10 support variadic macros so define HAVE_VARIADIC_MACROS for them
too. This currently only affects wxLog{Debug,Trace} definitions in wx/log.h.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Inherit from wxNavigationEnabled<wxBookCtrlBase> instead of just
wxBookCtrlBase to ensure that the keyboard navigation works correctly for
these controls.
The toolbar in wxToolbook still doesn't accept focus from keyboard but at
least the pages can be TAB-bed too and from. And the rest of the controls
are now fully accessible using only the keyboard.
Closes#14303.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We don't have any sufficiently long-lived pointer to return from this
overload, so don't return anything from it -- it's better to break the
compilation of the existing code rather than make it crash during run-time.
Closes#14214.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Assign wx2stc() return value to a suitably const variable instead of using
ugly casts to get rid of constness.
Also use wxCharBuffer/char* explicitly inside explicit wxUSE_UNICODE checks,
using wxWX2MBbuf here doesn't gain us anything and just confuses the reader of
this code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The value returned by wx2stc() in non-Unicode build is a simple "char*" and we
can't call length() method on it, add a helper wx2stclen() function to get the
length from the original wxString itself in this case.
Closes#14013.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is no need for a separate declaration inside wxIMPLEMENT_APP() as
wxGetApp() is defined by it and redeclaring it immediately after definition
results in a warning with some compilers/environments (Eclipse CDT).
The move of wxGetApp() to the beginning of the macro is only to ensure that a
semicolon is still required after wxIMPLEMENT_APP_NO_MAIN() and the other
macros terminating with it, such as wxIMPLEMENT_APP() itself.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These functions will be used when it is necessary to determine the best size
of the control if one of its size components is fixed. Currently none of the
classes implements DoGetBestClient{Height,Width}() yet but wxListCtrl will do
it soon, see #13898.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Take the control borders into account by overriding DoGetBestClientSize()
instead of DoGetBestSize().
Also invalidate the default best size computed before we have any valid image
when setting the initial image in Create().
Closes#4099.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We need some hacks for the older systems before including this header, extract
them from src/x11/utilsx.cpp into a new private header to be able to reuse it
from wxGTK in the next commit.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This ensures that the value returned from GetFieldRect() is always up to date,
even when this method is called from the user-defined wxEVT_SIZE handler, i.e.
before our own OnSize() could run.
Also remove the now unneeded hack with calling the base class OnSize() from
the statbar sample.
Closes#14268.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxFileCtrl -- which can be #define'd as wxGenericFileCtrl -- is documented to
inherit from wxControl and does derive from it in the native GTK version, so
do it for the generic version too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It is wrong to use dir.GetName()+"/" to obtain a slash-terminated directory
name as this results in (usually harmless but at best ugly) double slashes at
at the beginning of the string for the root directory. Add GetNameWithSep() to
obtain the correct result in all cases.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When using comctl32.dll versions older than 6.0 toolbar icons would not have their background drawn. Fix this in a rough way by always completely erasing the background like was done before. Regression since r62971.
Closes#13512.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Have an explicit per-column dirty flag and use that to determine whether
we need to call wxHeaderCtrl::UpdateColumn(). Previously, the lack of
computed best width was used as an indicator, but this didn't work
correctly if some code called GetWidth() after invalidation but before
wxDataViewCtrl::UpdateColWidths() was called at idle time. This resulted
in header's column widths getting out of sync with the control itself.
Fixes#14167.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow specifying the drag operation flags and retrieving the drop effect when
it's over for wxDataViewCtrl drag-and-drop.
Currently this is only implemented in the generic version.
Closes#12583.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It was impossible to specify the flags when creating wxNotificationMessage in
wxMSW, cotrary to the other ports and the documentation.
Fix this by adding the missing argument to the ctor and simply passing it to
the base class one, we don't have to do anything else as the existing code
already calls GetFlags() later so it should respect these flags without any
more changes.
Closes#14245.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't use typedef for these classes as it makes it impossible to
forward-declare them, just use #define instead as we already do for
wxListbookEvent and wxNotebookEvent. This allows forward declaration and is
also more consistent.
Closes#12242.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Prevent the default wxWindow-level wxEVT_ERASE_BACKGROUND handler from being
used in wxUniv for wxHtmlWindow. This is unnecessary as it has its own handler
anyhow and also doesn't work for some reason as erasing wxMemoryDC by drawing
a solid rectangle over it seems to be broken in at least wxX11.
Work around this problem by erasing the background in wxHtmlWindow itself if
no user-defined (as opposed to any, including one defined in wxWindow itself)
handler for this event exists.
Closes#13880.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Now makes use of max size for images and keeps the image size reasonable
Added original image size so can usually avoid reloading image when recomputing
cached bitmap size
Takes into account bottom of the last floating image so scrollbars are
set correctly
Original image size is shown in disabled size controls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow to use objects of this class without any valid HWND, this is useful for
the derived classes which may, or may not, need the corresponding HDC.
See #14194.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This class allows using virtual wxFSFiles with any wx functions taking
streams. E.g. it makes it possible to load images and animations from
wxFileSystem.
Closes#14185.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This stream allows to wrap another stream. This is a useful base class for
adapter classes providing stream interface on top of something else, like the
upcoming wxFSInputStream.
See #14185.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function can be used to obtain language/locale-independent representation
of an accelerator. This is particularly useful for storing it in configuration
files.
Closes#14228.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use IFileDialog in wxDirDialog implementation if possible, it shows a much
more user-friendly dialog than the one used by SHBrowseForFolder().
Closes#11401.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When building wxGTK under MSW, always use UTF-8 as file name encoding because
GTK+ doesn't use G_FILENAME_ENCODING there.
Add a helper wxGTK_CONV_FN() macro to hide the difference between the
platforms.
Closes#14035.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These brackets are probably not really necessary but add them just in case
they can help with parsing some strange expressions and for consistency with
the other wxGTK_CONV_XXX() macros.
See #14035.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This file doesn't seem to be needed and the open() declaration in it actually
results in errors when using the latest gccxml from cvs under Windows, so just
get rid of it entirely.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It was possible to hide the main part of a combobox control but keep its popup
shown and this notably happened in wxGrid when TAB was pressed while a
wxChoice cell editor was dropped down.
Avoid this Cheshire combobox syndrome by explicitly dismissing the popup when
a combobox is hidden.
Closes#3113.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This compiler doesn't exist any more and was probably unsupported even in 2.8,
let alone 2.9, so remove all the __MWERKS__ tests to simplify things.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Rename wxToolTip::DoAddOtherWindow() to DoAddHWND() as it should be used for
adding any window associated with the tooltip, either the main or an auxiliary
one. And rename wxToolTip::Add() to AddOtherWindow() because it shouldn't be
used for the main window.
See #14184.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This compiler doesn't exist for modern OS X systems, no need to have the
headers used only with it as they just clatter the include directory and
confuse various tools parsing wx headers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't "override" Thaw() in wxAuiNotebook as it's not virtual any more.
Override DoThaw() instead.
Also use wxBookCtrlBase instead of wxControl as the base class.
Closes#14179.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This model was comparing its items by their positions in the list instead of
their values for some reason. This broke sorting in wxDataViewListCtrl using
this model and simply didn't make any sense.
Just remove the comparison code from wxDataViewIndexListModel entirely, the
base class version works just fine for it.
Closes#14116.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't override SetFocus() to set the focus to the main window, this isn't
enough as we can be given the focus by the underlying toolkit itself, without
our SetFocus() being called -- this happened in wxGTK when focus was changed
from the keyboard using TAB and in this case it didn't get to the main window
but remaining on the wxListCtrl itself meaning that keyboard input wasn't
processed at all.
Use wxNavigationEnabled<> now to ensure that OnSetFocus() and related methods
do the right thing instead now.
Also get rid of OnSetFocus() in wxListHeaderWindow, it's better to override
AcceptsFocus() to return false to avoid getting focus in the first place.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
m_filename member was declared in wxTextAreaBase but set only in the
overridden wxTextCtrlBase methods. This meant that it wasn't updated correctly
in wxStyledTextCtrl which also derives from wxTextAreaBase and so saving
SaveFile() with empty file name didn't work there even when the control had
been originally loaded from a file.
Move the code updating m_filename to wxTextAreaBase itself to fix this. This
also simplifies the code as it's now not necessary to override
Do{Load,Save}File() in wxTextCtrlBase at all.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Avoid wxGetTopLevelParent() which doesn't work for the strange TLWs which
override IsTopLevel() to return false, as wxMDIChildFrame does in wxMSW.
Using IsDescendant() works in any case and also is arguably more clear.
Closes#3063.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function checks if another window is a direct or indirect child of this
one, which can be needed in a number of situations.
See #3063.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These methods, taking broken down time representation, avoid the problems
arising due to DST complications when using wxDateTime to represent the time
as special care needs to be taken in this case to avoid using the date part
corresponding to a DST change date at which time is discontinuous.
Document the problem with the old functions and use the new ones in the
sample.
See #14137.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just extract wxAuiTabArt into its own file. Also rename
wxAuiDefaultTabArt to wxAuiSimpleTabArt in preparation for having other tab
art classes as the default one.
See #14098.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The wxComboBox header itself doesn't need <wx/textctrl.h> but there exists
code using wxComboBox with wxTextCtrl styles and events that doesn't include
<wx/textctrl.h> explicitly because it wasn't necessary in 2.8. So include it
from wx/combobox.h to avoid breaking this code after an upgrade to 2.9.
Closes#14132.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The pointer returned by wxDateTime::ParseXXX() methods could point into a
buffer of a temporary wxString created to wrap a char* or wchar_t* argument so
dereferencing it was illegal.
Fix this by defining separate overloads for char*/wchar_t* arguments returning
pointers into the original string.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method can be used to recover the pointer in char* buffer containing
multi-byte string representation corresponding to the given iterator which is
useful for implementing backwards-compatible functions that must be able to
return such pointers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The length here is the size of the buffer in bytes and is not necessarily the
string length in code points (notably not for non-ASCII strings in UTF-8
build).
Closes#14130.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The length of the string here is specified in bytes and is not the same as the
string length for non-ASCII UTF-8 strings, so don't cache it as the string
length.
Just invalidate the cached length instead as we simply don't know what the
real length of the string is going to be.
See #14130.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
A length greater than that of the source string could be passed to this ctor.
This worked correctly, i.e. created a string which was a copy of the source
one but cached a wrong length for it.
Avoid this by explicitly checking the length before caching it in
wxString::assign(str, len).
See #14130.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This variable can take only 2 values, use symbolic names for them instead of
difficult to understand 0 and 1.
See ##14105.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't separate the function name and its arguments types in 2 different
columns in the assert dialog, this doesn't really work with const methods as
"const" can't be separated from the function like this. The old code just
didn't take "const" into account at all and mangled all the const methods by
showing ") cons" (no typo) at the end.
Just show everything in one column to avoid the problem and also simplify the
code.
Closes#14104.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes build with wxUSE_FONTMAP==0 as this dtor was only defined inside
"#if wxUSE_FONTMAP" section. Instead of fixing this, just get rid of this dtor
entirely as it was unnecessary anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775