Commit Graph

1249 Commits

Author SHA1 Message Date
Vadim Zeitlin
cfbc15ee04 Allow changing horizontal alignment of numeric cells in wxGrid.
wxGridCellAttr didn't provide any way to query its alignment attributes
without falling back to the (always defined) default alignment so the code in
wxGridCellNumberRenderer and similar classes simply always used right
alignment,

Add a new wxGridCellAttr::GetNonDefaultAlignment() function which allows to
retrieve the alignment defined in the attribute and use it to use right
alignment by default but allow overriding it.

Add a test to the sample showing a non right-aligned numeric cell.

Incidentally fix a long-standing bug in wxGridCell{DateTime,Enum}Renderers
which used wxRIGHT instead of wxALIGN_RIGHT and so were not aligned properly
even by default.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-27 01:47:38 +00:00
Vadim Zeitlin
ba0185b557 Add symbolic constant wxALIGN_INVALID and use it instead of -1 in wxGrid.
wxGridCellAttr was using literal -1 to indicate "no alignment" which wasn't
immediately obvious, use a new wxALIGN_INVALID (which has the same value)
instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-27 01:47:30 +00:00
Vadim Zeitlin
64932e4105 No changes, just avoid overriding GetNativeFontInfoDesc() in wxMSW wxFont.
wxFont::GetNativeFontInfoDesc() and GetNativeFontInfoUserDesc() were
overridden just to ensure that the font is realized but it makes sense to do
it in wxFontRefData::GetNativeFontInfo() itself as detecting the face name
won't work if the font is not realized anyhow. And then we don't need these
functions at all as the only thing they do is checking that the font is valid
when they are called but this can be done in the base class itself as this
should happen in all ports (document that this is the case).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 02:34:01 +00:00
Vadim Zeitlin
7d4911333f Document that throwing exceptions from wxTimer::Notify() is unsupported.
Currently exceptions thrown from this function are not passed to wxApp::
OnExceptionInMainLoop() (unlike exceptions thrown from timer event handlers).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-22 11:24:03 +00:00
Stefan Neis
1dd35cd656 Fixed Cut&Paste error in wxTextCtrl::ChangeValue documentation (fixes #11469).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-22 11:00:42 +00:00
Jaakko Salli
eb23d11e00 Added a new documentation overview section 'Caveats When Not Using C++ RTTI', describing possible problems with Bind() and wxAny when C++ RTTI is disabled.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-21 11:39:32 +00:00
Jaakko Salli
7db064f60f Added typeinfo.h which implements wxTypeId, using C++ RTTI if available. wxAny and Unbind<>() code are updated to use it. Added and updated related unit tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-19 19:27:24 +00:00
Vadim Zeitlin
fde702ea51 Fix typo in Bind() documentation: s/binded/bound/
Closes #11450.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-17 14:47:56 +00:00
Vadim Zeitlin
869aa92d4d Explicitly document event types for EVT_CLOSE().
Closes #11445.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-17 14:47:44 +00:00
Robert Roebling
d7bb29260e Revert wxFlexGridSizer constr. change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-15 09:40:30 +00:00
Vadim Zeitlin
c0a9fe92fa Implement support for wxSL_<DIR> in wxGTK, show them better in the sample.
Support wxSL_{LEFT,TOP,RIGHT,BOTTOM} in wxGTL version of wxSlider.

Make the display of the orientations in the slider page of the widgets sample
more clear.

Also document wxSL_<DIR> meaning better.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-14 23:15:27 +00:00
Vadim Zeitlin
e098940880 Minor corrections to wxSL_LABELS definition and documentation.
Use parentheses around the macro expansion to ensure that code like "whatever
& ~wxSL_LABELS" still works as expected.

Be more explicit in wxSL_LABELS description and mark wxSL_MIN_MAX_LABELS and
wxSL_VALUE_LABEL as being new in 2.9.1.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-14 23:14:27 +00:00
Robert Roebling
7aab7176f1 Restore ability to create wxFlexGridSizer with 2 params (number of columns and vertical gap)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-14 21:50:50 +00:00
Robert Roebling
6d6f99cb41 Document wxSL_MIN_MAX_LABELS and wxSL_VALUE_LABEL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-14 14:25:54 +00:00
Robert Roebling
fe45d6ffd5 Typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-14 11:03:17 +00:00
Robert Roebling
8ddda15ba5 Implement and document wxDataViewTreeCtrl::IsContainer(), use it in the sample to not add items to non-containers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-13 14:14:44 +00:00
Vadim Zeitlin
0ddf0ac696 Make wxSizeEvent::GetSize() description more precise.
Mention that it returns the new total (and not client) size of the window.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-12 13:13:09 +00:00
Vadim Zeitlin
869bc90db7 Add wxBase64Decode(void*,size_t,wxString) overload.
We had wxBase64Decode(void*,size_t,const char*,size_t) as well as
wxBase64Decode(const char*,size_t) and wxBase64Decode(wxString) already but
not a version taking the buffer and wxString, complete the set of overloads
now.

This allows the unit test to compile in STL build (where there is no implicit
conversion from wxString to const char *).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-11 14:38:40 +00:00
Václav Slavík
e3c3dfb409 added a note about XRCID() and EVT_*_RANGE macros (see bug #11431)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-11 10:22:57 +00:00
Vadim Zeitlin
62265c2c67 Allow custom wxDataViewCtrl renderers to easily use attributes.
Set up the DC passed to wxDataViewCustomRenderer::Render() to use the font and
colour defined by the item attribute by default so that any calls to
RenderText() from it will use them automatically.

Also added public wxDataViewCustomRenderer::GetAttr() to allow retrieving the
attribute explicitly in Render().

The column using custom renderer in the dataview sample now works as expected
in the generic version; the native ones will be corrected in the upcoming
commits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-10 17:41:11 +00:00
Vadim Zeitlin
80093617fe No changes, just correct a recurring typo in "Override".
Two "r"s should be enough for anybody.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-09 01:57:42 +00:00
Václav Slavík
b9b2c695ff document that wxMessageDialog API additions appeared in 2.9.0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-08 11:35:58 +00:00
Vadim Zeitlin
80842e1632 Document wxDocument::SetDocumentSaved().
While this function is usually called by wx itself it may be useful to call it
explicitly in some particular situations, as documented in the function
description, so make it officially public.

Closes #11396.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-03 14:12:14 +00:00
Vadim Zeitlin
74d9b8fbd6 Make public and document wxDataView{Index,Virtual}ListModel::GetCount().
This method is useful for getting the number of items in the control and
should be part of the public API instead of being marked as internal.

Closes #11380.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-31 15:58:19 +00:00
Vadim Zeitlin
7fadac8872 Make wxDataViewModel::GetAttr() and GetAttrByRow() const.
This is an incompatible change but having to use a non-const model pointer to
call a clearly logically const version was simply too ugly so change it while
we still can.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-24 21:42:04 +00:00
Vadim Zeitlin
43c64cc6c9 Create model and column in wxDataViewTreeCtrl::Create(), not ctor.
Old code created the tree model and its unique built-in column only in
wxDataViewTreeCtrl ctor but not in Create(), meaning that the behaviour was
very different depending on whether you used base class ctor call or Create()
in a derived class. This was confusing and completely inconsistent with wx API
in which using the default ctor and Create() is supposed to always have
exactly the same effect as using non-default ctor so change this to create the
model in Create() so that it's always done.

Slightly update the documentation and also add wxDataViewTreeCtrl::Init() for
consistency.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-24 21:41:44 +00:00
Vadim Zeitlin
b372f20e7e Add wxDataViewModel::HasValue().
This method allows to simply test whether we have a value at the given row and
column or not (as it happens for container items unless they too have columns).

Currently this method is not virtual and is not used by the implementations
yet but it might make sense to make it virtual and allow overriding it in the
future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-24 01:03:24 +00:00
Vadim Zeitlin
795dac4c86 Add wxDataViewModel::ChangeValue() and use it in wxDVC implementation.
ChangeValue() is a trivial wrapper calling both SetValue() and ValueChanged().
It allows to replace many calls to SetValue() immediately followed by
ValueChanged() with a single function call which is significantly shorter and
less error-prone (e.g. most of the existing code didn't test SetValue() return
code at all).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-23 23:49:16 +00:00
Vadim Zeitlin
6b8ef0b35d Merge SOC2009_FSWATCHER branch into trunk.
Merges everything from the branch with only some minor changes, mostly renamed
wxUSE_FSWATCHER_{INOTIFY,KQUEUE} to wxHAS_{INOTIFY,KQUEUE}.

Add wxFileSystemWatcher and related classes.

Also introduces wxEventLoopSource.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-22 11:35:43 +00:00
Vadim Zeitlin
464c1f9467 Add or fix descriptions of return values from SetFont/XXXColour().
Add the same kind of description to SetBackground/ForegroundColour() as in
SetFont() and fix typo in the latter.

Closes #11352.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-21 09:44:07 +00:00
Vadim Zeitlin
3427bc784e Document wxRendererNative::DrawTitleBarBitmap() and use it properly.
Comment and document the (non obvious) requirement for the PNG image handler
to be enabled when using this function under OS X. In fact, document the
entire function itself which was forgotten previously.

Do enable PNG image handler when using DrawTitleBarBitmap() in the sample.

Closes #11345.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-19 08:59:25 +00:00
Mattia Barbon
1058f65203 Copy wxPerl notes from the LaTeX documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-18 17:47:01 +00:00
Vadim Zeitlin
c937bcac0f Add ellipsization support to wxDataViewCtrl.
Implemented ellipsization in the generic, GTK and both OS X Carbon and Cocoa
versions but it currently doesn't work well in GTK as it changes the item
alignment unconditionally, this will need to be fixed later.

The behaviour for the columns is currently inconsistent between ports too:
under MSW they (natively) use wxELLIPSIZE_END, under GTK -- wxELLIPSIZE_NONE
and under OS X the same ellipsization mode as the column contents, i.e.
wxELLIPSIZE_MIDDLE by default.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-16 21:35:26 +00:00
Vadim Zeitlin
355ce7adea Rename wxEllipsizeFlags elements to avoid confusion with wxEllipsizeMode.
We shouldn't use the same "wxELLIPSIZE_" prefix for two different enums, so
use wxELLIPSIZE_FLAGS one for wxEllipsizeFlags (they should be used less often
than wxEllipsizeMode so it's better to keep the short prefix for the latter).

Also add wxELLIPSIZE_FLAGS_NONE flag.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-16 21:32:51 +00:00
Jaakko Salli
23d74d894d Fix incorrect wxComboBox dropdown and closeup event macro names in doxygen docs (closes #11340)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-16 13:54:56 +00:00
Jaakko Salli
e607eac25c Changed 'bool recursively' to 'int flags' argument (with default value of wxPG_RECURSE) in wxPropertyGrid Set(Property)BackgroundColour() and Set(Property)TextColour() member functions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-15 16:39:19 +00:00
Vadim Zeitlin
c27181d1a1 Replace wxValidator::SetBellOnError() with SuppressBellOnError().
SetBellOnError() erroneously inversed the value of its parameter. Fixing it to
behave correctly could silently break the existing code which might work
around this bug already because it always behaved like this (ever since it was
added 10.5 years ago). So instead simply deprecate this function and add a new
SuppressBellOnError() one which behaves as expected.

Closes #11318.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-15 14:44:22 +00:00
Vadim Zeitlin
b68d34f34c Correct typo in wxDocument::OnSaveModified() description.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-15 14:44:13 +00:00
Jaakko Salli
aaf5f98682 Added wxPGCell::SetFont() and GetFont(); Documented wxPGCell class.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-15 14:41:00 +00:00
Vadim Zeitlin
2d0d781336 Remove wxDataViewTextRendererAttr by merging it with wxDataViewTextRenderer.
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
2009-10-12 13:59:25 +00:00
Vadim Zeitlin
ca4adfd062 Added wxDCFontChanger ctor not changing font.
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
2009-10-12 13:59:13 +00:00
Vadim Zeitlin
489cc69b39 Document wxDCTextColourChanger "do nothing" constructor.
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
2009-10-12 13:59:06 +00:00
Vadim Zeitlin
5f2b0d8586 Don't document WarpPointer() as not implemented under Mac because it is.
Still recommend to avoid using it though.

Closes #11307.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-10 19:07:59 +00:00
Vadim Zeitlin
6da1d056ca Don't use vendor name by default in wxStandardPaths.
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
2009-10-10 18:28:28 +00:00
Jaakko Salli
39e4e221dd Removed intermediate wxPanel from wxPropertyGrid.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-10 09:52:44 +00:00
Vadim Zeitlin
7bfc10389a Mention log components in wxLogTrace() documentation.
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
2009-10-09 13:04:44 +00:00
Vadim Zeitlin
306a5d9515 Add a WX_APPNAME_DATA_DIR hack for wxStandardPaths::GetDataDir().
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
2009-10-08 22:38:03 +00:00
Vadim Zeitlin
4f83b9fc54 Improvements to application info documentation in wxStandardPaths.
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
2009-10-08 22:37:53 +00:00
Vadim Zeitlin
ab9a0b84de Implement wxWindow::ShowWithEffect() for wxOSX/Cocoa.
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
2009-10-05 22:57:59 +00:00
Vadim Zeitlin
3996b21a7f Determine the appropriate show effect automatically in wxInfoBar.
Slide the info bar from top or bottom of the parent window depending on its
location.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:57:45 +00:00