There is no reason to have a separate class for rendering the text honouring
the attributes defined for it, wxDataViewTextRenderer itself already does this
perfectly well.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is similar to the existing wxDCTextColourChanger ctor not changing colour
and is useful in the same kind of situations: when the font may or not be
changed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Only wxDCTextColourChanger(wxDC, wxColour) one was documented, also document
wxDCTextColourChanger(wxDC) and its Set() method now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The changes in r50025 made the behaviour of wxStandardPaths silently
incompatible with the previous versions under MSW and OS X as it now used the
vendor name in the paths it returned, unlike before. The benefits of doing
this don't justify silently breaking the existing programs so revert this
change and continue to use the application name only by default.
It is, of course, still possible to explicitly ask for the vendor name to be
used with wxStandardPaths::UseAppInfo().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Using different log components for different logging statements provides a
better (because more general and efficient) way to do the same thing that
wxLogTrace() does, so mention them when describing wxLogTrace().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Applications using wxStandardPaths::GetDataDir() to find their files under
Unix can't be ran without being installed as they look for their data files
under $prefix/share/appname. Make it possible to override this location by
setting WX_APPNAME_DATA_DIR environment variable to allow running them without
installation.
Notice that this shouldn't present any security risk unless the application is
SUID (which would be a very bad idea anyhow).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62337 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use "appinfo" instead of "appname" in the examples to make it clear that it
may be different from just the application name.
Also make UseAppInfo() documentation more clear.
See #11275.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This version animates the window asynchronously and is being checked in just
to preserve it in svn if we later decide to return to this semantics. It will
be replaced by synchronous animation in the next commit.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This id corresponds to the close button bitmap. Currently only wxGTK returns a
natively-looking button from here, MSW and OS X versions will be added later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Assume that user-added buttons can be already used to close the message so
don't show the default close button if any were added.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Also add an example of handling info bar buttons events to the sample and
mention that this must be done using Connect() or by deriving from wxInfoBar
in the documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Also change the GTK implementation to use a separate wxInfoBarGTKImpl to store
its data, this object won't be even allocated if a generic implementation is
used under GTK.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Straightforward implementation of wxInfoBar using GtkInfoBar widget available
in GTK+ 2.18.
Some side effects of this change:
- Rename wxInfoBar version in wx/generic/infobar.h to wxInfoBarGeneric and
define wxInfoBar in wx/infobar.h.
- Also change default value of flags argument to ShowMessage() to
wxICON_INFORMATION from wxICON_NONE as the default colour for wxICON_NONE
messages is surprisingly ugly in GTK native version.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Calling Show/HideWithEffect() with this effect is the same as calling just the normal Show/Hide().
This is convenient as it allows to use the same API, whether with effects or without them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Mention that Remove() uses binary search for sorted arrays so the item removed
by it is not necessarily the first one. Also correct documentation of Index()
for sorted arrays which was incorrectly the same as for the normal kind.
Closes#11233.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Calling Initialize() from another thread could never work before but it wasn't
clear that this was the case so document it in the functions comments and
documentation now and add asserts checking that they are called from the main
thread only.
Also simplify the code as we don't actually need to do any reference-counting
here and a simple boolean flag indicating whether the sockets are initialized
is enough.
Closes#11119.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These methods allow to operate with all 3 or 4 colour channels at once.
Add their implementation, documentation and a unit test for wxColour
exercising them.
Closes#9918.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Set svn:keyword and, most importantly, svn:eol-style, to avoid having files
with DOS line endings in svn, for the new files added by r61971.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It used to return a pointer in wxUSE_STL==0 build and an object in
wxUSE_STL==1 one making checking its return value difficult without provoking
warnings from either MSVC or g++ (see #11038).
Also, all the other occurrences of Member() already returned bool, including
the one in wxStringList so changing it to return bool in wxList itself is more
consistent.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This makes it easier to use in common cases: there is no need to come up with
a unique name for the checker any more as sufficiently unique combination of
wxApp::GetAppName() and wxGetUserId() is used if no name was explicitly given.
This is done by calling the new CreateDefault() on demand from
IsAnotherRunning() instead of simply creating the checker with the default
name in the default ctor for compatibility (you had to call Create() after
using the default ctor before and it can only be called once) and because
wxTheApp might not exist yet when wxSingleInstanceChecker is created.
Closes#11166.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It used to add a spacer with the given size in both directions but this was
counter-intuitive and wasn't expected even by the original author of this code
so change it to behave more reasonably.
Closes#11197.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These methods can be used to load objects from anywhere in the XRC resource
tree and not just from the top level.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make it possible to customize the appearance of wxGrid corner window and its
row and column headers by defining custom renderers for them.
Add demonstration of this new feature to the grid sample and update the
documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Empty value refers to the default or unnamed key in Win32 API but this may be
not clear to people unused to it so mention this explicitly.
Closes#11191.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These overloads allow not to worry about buffer lengths and just convert
between wxCharBuffer and wxWCharBuffer directly in a convenient way.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
By default include assertions and debug logging in both debug and release
builds but disable them in application release builds (when NDEBUG is
defined).
Also update (more accurately, replace) debugging overview.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The change in the values returned by wxStandardPaths functions is important as
it's incompatible with 2.8 if the application defines a vendor name so must be
mentioned in docs/changes.txt.
Also update the documentation of the class itself and mention UseAppInfo() in
the overview.
Closes#11189.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
and wxPG_EX_TOOLBAR_SEPARATOR styles for finer control over borders.
Borders around property grid are now native for consistency.
Some strange VC6 compiler errors fixed, plus size assertion in
sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Call gtk_window_set_keep_above() to force the message dialog to be above the
other windows (some WMs do this by default anyhow but not all).
Closes#11163.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't capitalize the app name if it had been explicitly set with SetAppName()
as this can result in unexpectedly wrong value. Do capitalize the program name
which is used as app name by default and don't store the program name in
m_appName to be able to distinguish between the two cases.
Closes#11165.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxIMAGE_QUALITY_BILINEAR in addition to the existing wxIMAGE_QUALITY_BICUBIC,
it is supposed to be much faster yet yield almost the same results.
Closes#11034.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
After the changes in r50710 wxString numeric conversion functions didn't
update their output parameter any more if the conversion failed because not
entire string was converted. This was incompatible with the old behaviour
which some existing code did rely on, so restore it and now always return the
number which was extracted from the beginning of the string if we found
anything at all, even if the function returns false.
Add unit test for the correct behaviour and updated the documentation.
Closes#11126.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't write extra NUL bytes obtained by decoding the padding at the end of
input into the output buffer as there may be not enough place in it for them.
And in any case the buffer is not (always) NUL-terminated as no NUL bytes are
obtained in absence of padding, so it's better to never terminate it for
consistency.
Closes#11101.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These functions return the number of columns or rows being currently used and
not 0, unlike the existing Get{Cols,Rows}(), if the corresponding number is
determined dynamically.
Closes#10254.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to test whether a given key belongs to the category of e.g. arrow
keys or navigation keys in a more concise and more readable manner.
Closes#10268.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The angles passed to it are measured clockwise from the horizontal axis,
contrary to the usual mathematical convention so take care to mention this in
the documentation.
Closes#11112.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This old name function conflicted with the one in wxRenderer in wxUniv and
also was misleading as this function draws only a bitmap and not the entire
wxRadioButton control.
The old workaround for the warnings about the function names conflict was ugly
and unmaintainable, as proven by the fact that wxRenderer method signature
already became different from the wxRendererNative one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It may be useful to change the directory where it is generated to allow the
users to find it more quickly. Also allow changing the crash report base name
for completeness.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function allows to get the location of Windows shell special folders not
covered by wxStandardPaths methods (yet), e.g. CSIDL_DESKTOPDIRECTORY.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Confusing wxFlexGridSizer(int cols, int vgap = 0, int hgap = 0) was removed as
well as corresponding wxGridSizer ctor overload. New ctor overloads taking gap
as wxSize were added.
See #11040.
Closes#11091.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Added wxWindow::CanScroll() with the old HasScrollbar() meaning but changed
HasScrollbar() to check for the scrollbar existence instead of just checking
if it might exist.
Closes#10897.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Added missing wxID_ANY in the control creation calls.
Also rephrase/extend the discussion about creating windows shown inside the
static box as its children or siblings.
Closes#11086.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Calls to SetStatusText() in between Push/PopStatusText() were simply lost
before, now the text explicitly changed by SetStatusText() is preserved by the
next call to PopStatusText().
This required adding a new virtual method, called DoUpdateStatusText(), which
is now implemented in all the derived classes instead of overriding
SetStatusText() (on the bright side, it doesn't need to do any checks already
done in the base class any more).
Also fix PushStatusText() to actually show the text being pushed at all under
wxMSW as a side effect.
And further reduce code duplication between wxStatusBarBase and the derived
classes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The old and confusing wxGridSizer(int cols, int vgap = 0, int hgap = 0) is removed and replaced with wxGridSizer(int cols, int vgap, int hgap).
New ctor overloads using wxSize for the gap parameter added.
Closes#11040.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Long version is constructed by concatenating "Version " with the short version but can be overridden for the platforms which use it (currently MSW and OS X).
Closes 11027.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to retrieve labels appropriate for the buttons and not menu items which currently means without trailing ellipsis.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Disabling logging in a single thread (even the main one) shouldn't disable
logs from the background threads which should disable their logging themselves
as/if needed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775