Commit Graph

13693 Commits

Author SHA1 Message Date
Vadim Zeitlin
8e59cbe40c No changes, just attempts to make the code more readable.
Reformat/reindent, use more wx coding style, wrap some extremely long lines.
Use shorter and less Carbon-ish variable names. Clarify some comments.

Also use static_cast<> because there is no need to use reinterpret_cast<> when
a static_cast<> will do.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-17 01:04:20 +00:00
Vadim Zeitlin
f32eb96401 Fix crash when editing wxDVC items in place in wxOSX/Cocoa.
NSOutlineView::editedColumn: and editedRow: return -1 when they are called
from textDidEndEditing so we need to store their values in textDidBeginEditing
and reuse them later.

This fixes the crash in the sample with out-of-range array index exception
which happened whenever a cell was edited.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-17 01:04:13 +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
Vadim Zeitlin
73b1b99623 Improve wxCollapsiblePane appearance under OS X.
By default, don't use border in wxDisclosureTriangle because the native
applications do not. However do honour wxBORDER_XXX style if specified in case
this becomes useful in the future (this required no effort as the code was
already there for bitmap buttons and just had to be extracted into a reusable
function).

Don't expand the disclosure triangle in wxCollapsiblePane sizer, as this
resulted in the text being centered instead of remaining left-aligned.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-16 16:25:43 +00:00
Vadim Zeitlin
205bdf2069 Implement icon text column using native GTK renderers in wxDVC.
This has a possible advantage of a more native look and feel (although it's
hard to tell the difference between drawing the icon ourselves and how the
default GTK+ renderer does it to be honest) and a very real advantage of
allowing to edit in place cells with icons. It also reduces code duplication
in GTK implementation.

Modify the sample to make the icon-text column in the list model editable to
show that it works. This required storing the values of the second column as
well, so do it in its own array and to avoid calling it "m_array2", rename the
existing m_array to m_textColValues (which accounts for most of the diff in
the sample) and call the new one m_iconColValues.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-16 01:29:06 +00:00
Vadim Zeitlin
84fc95da58 Use correct colour for selected items in generic wxDVC.
wxDataViewCustomRenderer::RenderText() taking attributes must use correct
colour for the selected items if no attribute is specified as it can be (and
is) called directly and not only via the compatibility overload.

This fixes the display of the selected items in the dataview sample broken by
recent changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-15 16:53:45 +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
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
d85aece199 Test whether GTK+ is 2.18 or newer in configure.
We need to define __WXGTK218__ symbol in configure instead of simply checking
if we are compiled with 2.18 in wx/infobar.h because GTK_CHECK_VERSION() can't
be used when compiling user code which can't even include gtk/gtkversion.h
defining it because it doesn't necessarily use `pkg-config --cflags gtk+-2.0`
at all in its CFLAGS.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-14 22:49:38 +00:00
Vadim Zeitlin
aa62256a06 Add a detailed explanation of possible error reasons to wx/chkconf.h.
Also modify the #error directives to point to the comment near the top of this
file.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-14 20:59:41 +00:00
Vadim Zeitlin
9aa2e298ae Fixes to comparison operators for wxDVC classes.
Comparison operators for wxDataViewItem and wxDataViewIconText were not inline
and not exported, resulting in linking errors for any code using them in
shared wx build. Fix this by making them inline.

Also correct wxDataViewIconText operator==() implementation to compare icons
as well and to return true when comparing the object with itself.

Finally add operator!=() matching existing operator==() as a class having one
of these operators is supposed to have the other one as well and it costs
nothing to define it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-14 17:00:28 +00:00
Paul Cornett
4d4ec2a507 Make m_idleMutex an object instead of a pointer. Use bool for hook-installed flag, the actual hook id is not needed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-13 15:40:35 +00:00
Vadim Zeitlin
38c349189a Implement attributes support in generic wxDataViewIconTextRenderer.
Simply override RenderWithAttr() instead of Render().

Update the sample to show that this works now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-12 22:44:15 +00:00
Vadim Zeitlin
3e60a3c147 Make generic wxDataViewProgressRenderer fill the entire cell.
After the fixes in the previous commit it is finally possibly to make the
progress renderer expand to the entire cell area instead of taking a
fixed width, it is enough to simply override RenderWithAttr() instead of
Render() and ignore the alignment as this avoids the use of (arbitrary and
hardcoded) wxDataViewProgressRenderer::GetSize().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-12 22:44:09 +00:00
Vadim Zeitlin
a6f1201f97 Handle cell alignment in the renderer itself in generic wxDVC.
Instead of using wxDataViewRenderer::GetSize() and rendering the cell into the
appropriate part of the rectangle, pass the full rectangle and the alignment
of the cell contents in it to the renderer itself.

This fixes the bug with bold text being truncated in the "attributes" column
of the dataview sample and is also generally more flexible as the renderer may
decide itself what to do with the extra space.

It also somewhat reduces the code duplication between CreateItemBitmap() and
OnPaint().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-12 22:44:03 +00:00
Vadim Zeitlin
b74399b982 Correct bug with items without attributes in wxGTK wxDVC.
After the change to the sample in r62390 it turned out that wxGTK version
didn't handle items without attributes in a column where other items did have
attributes neither -- they inherited the last used attribute.

Fix this by remembering whether we are using any non-default attributes or not
and resetting them if we do.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-12 22:43:57 +00:00
Vadim Zeitlin
09a0ece0dc Fix display of items without attributes in Cocoa wxDVC.
The attribute used for the last item was reused for the next item in the same
column unless it was overridden in the attribute of this item, fix this by
remembering the original attribute and using it if no attributes are
explicitly specified.

Also change the sample to show the items without attributes in a column with
attributes and make the label correspond to the attribute of the item.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-12 17:30:48 +00:00
Vadim Zeitlin
de40d73647 No real changes, just minor cleanup in Cocoa wxDataViewCtrl.
Start cleaning up Cocoa wxDataViewCtrl implementation:
 - Don't use "this->" which is not used anywhere else in wx code.
 - Use "()" instead of "(void)" as per wx coding standards.
 - Don't use end of function comments, this is inconsistent and
   unmaintainable.

No real changes otherwise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-12 13:59:32 +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
Jaakko Salli
0da1f1c4cc Have page-specific splitter setup flags in order to fix bug that caused splitter change in one page to affect others. Also fixed a regression in splitter auto-centering.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-11 15:30:03 +00:00
Jaakko Salli
b5e184c6ff Code cleanup and clarification
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-11 08:45:34 +00:00
Jaakko Salli
0b6a0a7272 Fixed wxPropertyGrid empty space rendering
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-11 08:32:25 +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
Paul Cornett
8e6efd1fd2 replace TRUE/FALSE with true/false
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-09 17:39:19 +00:00
Stefan Csomor
9bd36c6c0f adding defaults as wxDC did
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-09 17:34:39 +00:00
Vadim Zeitlin
17005cd723 Define __WXOSX__ and __WXMAC__ on compiler command line.
Although __WXMAC__ and __WXMAC__ were already defined in wx/platform.h if
__WXOSX_XXX__ was defined, they couldn't be used for checks done before
including this header, which was surprising and, in case of __WXMAC__,
backwards incompatible. Define them now on the compiler command line to ensure
that they are always defined.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-09 13:05:38 +00:00
Vadim Zeitlin
8462a84b2c Removed wxFont::Set/GetNoAntiAliasing() implementations.
Most of them were dummy and didn't do anything and this API was never meant to
be used anyhow.

Keep just the declarations in wxFontBase but mark them as deprecated.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-09 13:04:59 +00:00
Stefan Csomor
b38dc31ffa moving bitmapbutton functionality up to button for OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-09 12:24:35 +00:00
Stefan Csomor
411a1c35ff implementing rollover and pressed image for bitmapbutton on osx_cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-08 18:38:43 +00:00
Paul Cornett
e33253d15c non-PCH build fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-06 03:42:55 +00:00
Vadim Zeitlin
2973301f6f Refactor initialization code in wxTopLevelWindowMSW::Create().
No real changes as the old code was, in fact, correct (although Create()
didn't initialize m_parent explicitly, it was still done in AddChild() if the
parent was not NUL) but just make it more explicit and clear.

Add a new helper wxWindowBase::CreateBase() overload for top level windows,
not taking the validator parameter which doesn't apply to them.

Also make CreateBase() protected as it is only meant to be called from derived
classes Create().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:58:15 +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
ff6893d2c2 Added a virtual wxWindow::OSXGetViewOrWindow() method.
This can be used to retrieve either an NSView for child windows or NSWindow
for non-owned ones without resorting to dynamic casts.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:57:50 +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
Vadim Zeitlin
15ea6e205b Remove the hack with changing the parent background colour in wxInfoBar.
Finding the closest info bar to copy the background colour from only worked
for very simple layouts and failed for more complicated ones with nested
sizers so don't try to change the colour automatically, it's easy enough to do
it manually as shown in the updated dialogs sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:57:39 +00:00
Vadim Zeitlin
ec20a753b9 Implement DrawTitleBarBitmap() for OS X using hard coded PNG images.
Use a simple implementation working under all OS X versions, including 10.4
which doesn't have standard system images for the close button.

Added the images themselves under art/osx and png2c.py helper script to
convert them to a form used in C++ code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:57:32 +00:00
Vadim Zeitlin
b50d93d1da Added wxRendererNative::DrawTitleBarBitmap().
This is currently only implemented for wxMSW as there is no advantage to use a
generic implementation compared to using wxArtProvider directly under the
other ports. But for MSW this allows to have perfectly natively looking
titlebar-like buttons.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:57:04 +00:00
Vadim Zeitlin
942d5e2d72 Replaced GraphicsHDC from src/msw/renderer.cpp with wxDC::GetTempHDC().
wxDC::GetTempHDC() method provides a convenient and safe way to retrieve HDC
from a wxDC object, whether it is using GDI or GDI+. It is implemented using
(MSW-specific) virtual functions in wxDC and so doesn't need ugly hacks like
wxDynamicCast which were used in src/msw/renderer.cpp to achieve the same
effect.

Also, we now use GetTempHDC() consistently in all wxMSW rendering methods as
the old GraphicsHDC was only used in some of them meaning that many methods
didn't work at all with wxGCDC.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:56:58 +00:00
Vadim Zeitlin
5cdd380565 Don't use themed border for the generic info bar.
Since the switch to deriving from wxControl instead of wxWindow, the info bar
gained a themed border which doesn't look nice for it, especially when it is
shown progressively, as happens under Windows.

Restore the old behaviour by overriding GetDefaultBorder() to return
wxBORDER_NONE for it. This doesn't look perfect neither however, we may want
to draw a separator line between it and the parent window ourselves as even
wxBORDER_SIMPLE looks too heavy for it (and there should be definitely no
border on its sides as it always touches the parent window edges).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:56:22 +00:00
Vadim Zeitlin
4026acf137 Ensure that info bar message uses the set font/colours in wxGTK.
Propagate the font and colours set on wxInfoBar window itself to its label in
the native GTK implementation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:56:17 +00:00
Vadim Zeitlin
0b1add25fd Added wxInfoBar::Dismiss().
Add a method to conveniently hide the info bar and update the parent layout.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:56:07 +00:00
Vadim Zeitlin
b9727751aa Added wxART_CLOSE art id.
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
2009-10-05 22:55:53 +00:00
Vadim Zeitlin
39f6b6ba78 Added wxArtProvider::GetMessageBoxIconId().
This function translates between wxICON_XXX constants and wxART_YYY values. It
was extracted from the existing GetMessageBoxIcon().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:55:46 +00:00
Vadim Zeitlin
6a3f8b4f1f Only show the default close button in wxInfoBar if there are no others.
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
2009-10-05 22:55:40 +00:00
Vadim Zeitlin
cc7033c2f5 Use event tables instead of Connect() in wxInfoBarGeneric.
This allows to handle events from the info bar buttons in the derived classes
using the event tables while if the base class used Connect(), the derived
classes static event handlers would be never executed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:55:22 +00:00
Vadim Zeitlin
e6b2aae1b8 Add wxInfoBar::RemoveButton() method.
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
2009-10-05 22:55:17 +00:00
Vadim Zeitlin
ed8efd46d9 Added native wxInfoBar implementation for wxGTK.
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
2009-10-05 22:55:10 +00:00
Vadim Zeitlin
a0c8bb73f2 Add wxWindowGTK::GTKConnectWidget() helper.
This trivial wrapper function allows to omit "m_widget" and "this" arguments
when calling g_signal_connect().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:55:01 +00:00
Vadim Zeitlin
92153555cf Added GTKShouldConnectSizeRequest() to prevent size_request handling.
Don't hard code the exception for GtkFileChooserButton in
wxWindow::PostCreation() in wxGTK, handling size_request signal also breaks
other controls (e.g. upcoming wxInfoBar native implementation). Instead,
define a virtual function which may be overridden to return false if
size_request shouldn't be connected.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:54:46 +00:00
Vadim Zeitlin
ce668f297b Extract conversion from wx to GtkMessageType in a separate file.
Add wxGTKImpl::ConvertMessageTypeFromWX() function to convert from wxICON_XXX
styles to GTK_MESSAGE_XXX values.

This will be reused by wxInfoBar in the next commits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:54:36 +00:00
Vadim Zeitlin
374ae80f2c Added wxInfoBar::AddButton().
Allow adding custom buttons to wxInfoBar and show this in the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:54:31 +00:00
Vadim Zeitlin
df8c364bf4 Made wxInfoBar::SetFont() change the text message font.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:54:24 +00:00
Vadim Zeitlin
a92b5dfe8c Initial wxInfoBar implementation.
Add generic implementation, documentation and examples showing the use of the
new class in the samples.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:54:13 +00:00
Vadim Zeitlin
ffa50e7361 Added wxSHOW_EFFECT_NONE.
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
2009-10-05 22:53:57 +00:00
Vadim Zeitlin
2e61f76aac Added wxICON_NONE to wxICON_MASK.
Absence of icon is also an icon flag.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:53:48 +00:00
Vadim Zeitlin
e9ee227022 Partially implement wxTextCtrl::GetStyle() in wxGTK.
Support retrieving the (both foreground and background) colours for the given
position.

Closes #11281.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:53:26 +00:00
Václav Slavík
57cc93eb59 fixed wxXmlDocument::Save() to interpret the indentstep argument correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-04 21:19:40 +00:00
Jaakko Salli
c5fe6a5bee Added wxDECLARE_ANY_TYPE(CLS, DECL) and documented for what kind of situation it is intended: wxAny used across DLL and EXE boundaries.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-03 10:43:21 +00:00
Stefan Csomor
267ba369d6 fixing typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-02 19:56:35 +00:00
Stefan Csomor
2986eb869c adding construction from native bitmaps
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-02 19:45:03 +00:00
Stefan Csomor
1821877f7f adding NSImage to CGImageRef conversion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-02 17:51:16 +00:00
Stefan Csomor
ada175836e overriding to allocate an outer autorelease pool
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-30 18:25:33 +00:00
Jaakko Salli
24985a9b5b Removed dst buffer delete responsibility from wxAnyValueType::CopyBuffer(), clarified documentation regarding it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-29 13:38:20 +00:00
Julian Smart
8e43fc7776 Context menu now created in constructor; old context menu deleted when new one set.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-29 06:45:36 +00:00
Julian Smart
7da33e042c Moved WinPrinter from private.h to printdlg.cpp.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-28 16:15:34 +00:00
Julian Smart
2ae3afa09f Applied #9076 (scrolling bars grow box fix)
By lillo


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-28 07:06:14 +00:00
Jaakko Salli
9370ec6a3b wxUSE_THREAD -> wxUSE_THREADS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-28 06:25:44 +00:00
Jaakko Salli
ca5a36146e Use long double instead of double in wxAnyValueBuffer, moved alignment-specific values into sub-union
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-27 16:30:26 +00:00
Jaakko Salli
62d7be2066 Added function and member function pointers in wxAnyValueBuffer to make memory alignment problems even less likely.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-27 15:28:06 +00:00
Jaakko Salli
0411067998 Make sure there are no memory alignment issues with wxAnyValueBuffer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-27 14:52:34 +00:00
Jaakko Salli
644b283d6a Store property name and value in wxPropertyGridEvent, keep track of live event instances, and clear property/grid information in them in wxPropertyGrid dtor. This allows application to relay events for later processing without fear of losing most relevant information within.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-27 14:35:02 +00:00
Julian Smart
906cb3f119 Applied modified #10655 (Added Cookie (receive) support to wxHTTP)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 19:47:23 +00:00
Vadim Zeitlin
6f0740beb5 Use FWD version of DLL export macro in forward declaration.
Forward declarations must use WXDLLIMPEXP_FWD_XXX and not WXDLLIMPEXP_XXX to
avoid g++ warnings about "type attributes are honored only at type definition".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 16:43:37 +00:00
Vadim Zeitlin
ddb44248a6 Fixed wxDataViewCtrl::Set{Foreground,Background}Colour() to work under GTK too.
Implement DoApplyWidgetStyle() in wxGTK version of wxDataViewCtrl to propagate
the main window style to the GtkTreeView which is what the user mostly sees.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 16:43:30 +00:00
Vadim Zeitlin
2fa90e33ea Use default composite controls attributes for wxDataViewCtrl.
wxDataViewCtrl should use the same colours/fonts as the native list and tree
controls.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 16:43:12 +00:00
Vadim Zeitlin
0534259ab8 Move wxControl::GetCompositeControlsDefaultAttributes() from MSW to common.
This function is not MSW-specific and should be used in generic implementation
of controls such as wxListCtrl, wxTreeCtrl and wxDataViewCtrl. Even if it is
needed by MSW only now, move it to the common code to avoid #ifdefs in these
controls code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 16:43:06 +00:00
Vadim Zeitlin
3396739da1 Refactor wxStyledTextCtrl to share common file save/load code.
Keep the code for saving and loading text contents from files in a single
place instead of doing it differently in wxTextCtrl and wxStyledTextCtrl.

This required adding Set/GetValue() methods to wxTextAreaBase just so that its
DoLoad/SaveFile() could use them, even if they are the same as wxTextEntryBase
methods and are overridden in wxTextCtrlBase to be implemented in terms of the
latter.

Notice that wxRichTextCtrl might need to be refactored to use this code too in
the future.

Also notice that this reverts the change of r62081 which replaced SetValue()
with ChangeValue() in DoLoadFile() as wxTextAreaBase only has SetValue() and
it's not worth adding ChangeValue() to it too just to preserve this recent
change in behaviour.

Closes #10715.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 13:26:16 +00:00
Stefan Csomor
ddbc8ac9ca cleaning up key handling, closes #10406
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 10:39:26 +00:00
Jaakko Salli
a1d5aa9361 Have wxComboCtrl generate wxEVT_COMMAND_COMBOBOX_DROPDOWN and wxEVT_COMMAND_COMBOBOX_CLOSEUP events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 09:15:29 +00:00
Julian Smart
51c72a7b56 Applied #9011: Native wxListCtrl::HitTest on OS X
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-25 09:02:04 +00:00
Julian Smart
a74d082e8c Applied #10858: wxListCtrl on Mac does not route Freeze/Thaw/Update to m_genericImpl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-25 07:45:35 +00:00
Julian Smart
240071a415 Added missing const
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 20:47:34 +00:00
Julian Smart
198c264dbc Applied part of #10034: wxImage::ConvertToDisabled()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 20:05:33 +00:00
Julian Smart
250ab35a3b Applied: wxDocument: Adding an asterix to the title
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 13:49:01 +00:00
Julian Smart
426d19f139 Applied patch #9058 (add Hildon 2.0 support)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 12:36:34 +00:00
Julian Smart
082e5b9856 Applied patch #11078 - DEVMODE creation in wxWindowsPrintNativeData::TransferFrom plus SetQuality to dpi
by Martin Perktold


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 09:54:25 +00:00
Stefan Csomor
e876d0f262 removing unneeded method, closes #11073
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 09:39:38 +00:00
Stefan Csomor
2c864095a0 removing unneeded method, closes #11073
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 09:15:41 +00:00
Julian Smart
da89830af4 Applied #10025 (Patch to allow proper sizing of simple combo box)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 09:07:13 +00:00
Julian Smart
c631741b39 Fixed compile problem
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 06:48:27 +00:00
Paul Cornett
b4bde7a74b build fixes for wxUSE_VALIDATORS==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 16:32:32 +00:00
Vadim Zeitlin
670d01778a Extract default grid header renderers from wxGridCellAttrProvider.
We must be able to use them even when we have no attributes at all
and even when we have no associated table, so use default renderers in wxGrid
implementation of Draw{Row,Column}Label()/DrawBorder() in this case.

Closes #11230.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 14:28:55 +00:00
Vadim Zeitlin
cb7c02fd46 Remove DLL export declaration from wxScrolled.
As this class has only inline methods it doesn't need to be exported from the
DLL and actually exporting it results in linking problems when using
wxScrolled<wxWindow> (which, unlike wxScrolled<wxPanel>, is not used in wx
itself and so doesn't seem to be instantiated) in DLL client even with VC > 6.

An alternative solution would be to change WXDLLIMPEXP_TEMPLATE_INSTANCE_CORE
macro to explicitly instantiate the template in the DLL even for VC > 6 but
this wouldn't solve the problem for wxScrolled<CustomClass> while removing the
DLL export declaration should.

Also use wxScrolled<wxWindow> in addition to wxScrolled<wxPanel> in the scroll
sample to test that it links correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 14:28:42 +00:00
Julian Smart
4fdc2c5f2a Added wxRICHTEXT_HANDLER_USE_CSS flag for HTML handler to use CSS
where possible.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 11:05:52 +00:00
Julian Smart
2f0baf9797 Resolved #4842 (accessors for member variables)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 08:15:13 +00:00
Peter Cawley
77749ea963 Added automatic linking of ribbon libraries when using MSVC.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 12:13:03 +00:00
Vadim Zeitlin
fdc468a0a6 Add a separate wxControlRenderer::DrawButtonLabel() too.
wxControlRenderer::DrawLabel() was used by both wxStaticText and wxButton but
their labels may need to be drawn differently and wxRenderer does have
different DrawLabel() and DrawButtonLabel() to do it. Now also add a separate
method for the buttons to wxControlRenderer.

See #11220.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 00:23:03 +00:00
Vadim Zeitlin
2c1a1ed190 Implement wxWindow::DoGetBorderSize() in wxUniv.
As some wxUniv classes implement DoGetBestClientSize(), the new code in
wxWindow::DoGetBestSize() implementation calls DoGetBorderSize() which asserts
because it's not implemented, making it impossible to even start the minimal
sample -- fix this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 00:22:52 +00:00
Stefan Csomor
1437127330 fixing include type
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 13:08:52 +00:00
Vadim Zeitlin
edd608b18a Account for the margins used by Windows around status bar text.
Because Windows uses margins around the text drawn in the status bar, naively
setting a field width to the size of the text didn't work (see previous
commit for an example). As this seems a natural enough thing to do, account
for this margin inside wxStatusBar itself to avoid the user code the trouble
of having to call some special function to do it. Notice that this does mean
that fields not containing text may be slightly larger than needed, but we
consider that this (rarer) case is less important.

Also account correctly for the status bar grip size. And while we still hard
code its size, do it in a clearly named function instead of using completely
mysterious constants here and there.

Closes #10696.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 13:00:36 +00:00
Stefan Csomor
0a84f928e9 moving themeing include to private.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 12:57:12 +00:00
Vadim Zeitlin
0fd2ecfed3 Initialize wxMDIParentFrame::m_accelWindowMenu in default ctor.
If wxMDIParentFrame object was created without its Create() ever being called,
it crashed in its dtor trying to delete an uninitialized pointer, so do
initialize it to NULL in all ctors (via a helper Init() method, as usual).

Closes #11216.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 08:44:42 +00:00
Vadim Zeitlin
4017f5ca49 wxSocket::Initialize() and Shutdown() are for main thread only.
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
2009-09-21 08:44:35 +00:00
Vadim Zeitlin
45de347c10 Put wxAny implementation entirely in the header.
This allows to remove WXDLLIMPEXP_BASE from the class declaration and should
hopefully fix VC6 linking errors when building the unit test.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-20 12:37:16 +00:00
Vadim Zeitlin
59d43911b4 Optionally return length from wxLoadUserResource().
Add optional length output parameter and also change the return type to "char
*" from "wxChar *" to which it apparently was blindly changed just to make
this code compile even though this function never returned any strings.

Closes #11214.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-19 16:29:57 +00:00
Vadim Zeitlin
b0edecea48 Add wxColour::{Set,Get}RGB[A]().
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
2009-09-19 16:29:50 +00:00
Vadim Zeitlin
0193727824 Add curly braces around wxFAIL_MSG() to avoid g++ 4.3 warning.
g++ 4.3 warns about lack of explicit braces to make it happy.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-19 16:29:42 +00:00
Vadim Zeitlin
39601a7f74 Set svn properties correctly for the newly added files.
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
2009-09-19 15:41:08 +00:00
Jaakko Salli
178c77606f wxAny initial commit (closes #10932)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-19 08:51:11 +00:00
Vadim Zeitlin
11c2b0413a Add wxUSE_RIBBON to wx/setup_inc.h and wx/chkconf.h.
wxUSE_RIBBON was apparently added to the different wx/*/setup.h files manually
instead of being added to wx/setup_inc.h and regenerating the rest, correct it.

Also check that it is defined in wx/chkconf.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-18 22:16:59 +00:00
Vadim Zeitlin
0f08aa4432 Change return type of wxList::Member() to bool.
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
2009-09-18 17:10:58 +00:00
Vadim Zeitlin
b3b17ee743 Fix recurring typo in "theming".
It was (consistently) misspelt as "themeing" in several places.

Closes #11206.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-18 16:16:30 +00:00
Vadim Zeitlin
e9670814f5 Use UTF-8 for all non-ASCII characters in the sources.
Avoid mixing Latin-1, UTF-8 and Mac Roman (?) encodings in different source
files, use UTF-8 everywhere.

See #11116.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-18 16:16:12 +00:00
Julian Smart
370eda07c1 Added missing includes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-17 08:18:52 +00:00
Vadim Zeitlin
3175fc12b4 More ribbon compilation fixes for OS X.
Add more headers for wxColour and wxFont.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-17 00:17:57 +00:00
Vadim Zeitlin
91d33c61a5 Ribbon compilation fixes for OS X.
Forward declare wxWindow and wxDC classes in wx/ribbon/art.h to avoid errors
in (PCH-less?) buildbot builds.

Also include header containing declarations of private Mac functions in
implementation file (closes #11203).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-16 23:19:01 +00:00
Vadim Zeitlin
956b3d92ef Allow creating wxSingleInstanceChecker with default name.
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
2009-09-16 12:38:00 +00:00
Peter Cawley
3c3ead1d15 Merged GSOC Ribbon work from SOC2009_RIBBON branch into trunk.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-16 12:06:02 +00:00
Vadim Zeitlin
1a2df6a75b Change wxBoxSizer::AddSpacer() to only add space in sizer direction.
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
2009-09-15 17:05:32 +00:00
Vadim Zeitlin
a8030f0eaa Really fix VC6 compilation after r61919.
The change in r61922 which was supposed to do it somehow forgot the fix itself
and added only a comment explaining why it was needed. Really do name the
struct now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-15 17:05:13 +00:00
Vadim Zeitlin
af0ac990fc Add wxXmlResource::LoadObjectRecursively().
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
2009-09-14 23:22:00 +00:00
Vadim Zeitlin
c9a199c6a6 Add virtual dtor to header renderer classes to avoid g++ warnings.
g++ warns about class with virtual functions having non-virtual dtor so make
the dtor of wxGridCornerHeaderRenderer virtual even if it's not really needed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-14 23:21:48 +00:00
Julian Smart
749414f70f wxRTC's own caret is more reliable than the generic one, so use it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-14 15:52:48 +00:00
Jaakko Salli
c7994b5651 Added dummy wxPG_THEME_BORDER style for backwards compatibility
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-14 15:17:50 +00:00
Stefan Csomor
0770c0a05f fixing and completing iPhone sound
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-14 13:07:23 +00:00
Vadim Zeitlin
ade40d72f0 Fix VC6 compilation after r61919.
Work around VC6 bug which resulted in error C2639 when compiling the
declaration of an unnamed struct inside wxGridCellAttrProvider.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-14 08:37:28 +00:00
Stefan Csomor
e203dbfe15 adding glFrustum to compat API, supporting SetColour on OpenGL ES
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-14 08:37:23 +00:00
Vadim Zeitlin
ba9574c310 Added support for corner, row and column headers renderers to wxGrid.
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
2009-09-14 00:45:29 +00:00
Stefan Csomor
deb0a11e99 adapting to new sound file organization for osx
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-13 18:28:45 +00:00
Stefan Csomor
0fd61b1609 adding types for OpenGL on iPhone
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-13 17:45:21 +00:00
Stefan Csomor
4e16d05a28 enabling correct audio framework on OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-13 17:23:53 +00:00
Stefan Csomor
b90817de2b OpenGL changes for carbon and cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-13 17:19:01 +00:00
Stefan Csomor
e7ee4873d5 adding emulation API for OpenGL ES platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-13 17:17:40 +00:00
Vadim Zeitlin
40ac5040ce Add convenient wxMBConv::cMB2WC/WC2MB overloads taking buffers.
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
2009-09-12 22:40:25 +00:00
Vadim Zeitlin
ab06470e49 Add wxDEBUG_LEVEL to wx/setup.h and document it.
Under Unix wxDEBUG_LEVEL can be set using configure --enable-debug=max option
but under Windows it needs to be changed in wx/msw/setup.h so add it to this
file with a comment explaining its meaning.

Also document this symbol with the other preprocessor constants.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-12 11:29:42 +00:00
Vadim Zeitlin
7d9550df50 Define wxDEBUG_LEVEL in both debug and release builds as 1.
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
2009-09-12 11:28:52 +00:00
Jaakko Salli
20fb9ddf29 Fixed constants of the new wxPG_EX styles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-11 16:41:31 +00:00
Julian Smart
521f1d8371 wxPropertyGrid: added wxPG_NO_INTERNAL_BORDER, wxPG_EX_NO_TOOLBAR_DIVIDER
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
2009-09-11 11:49:03 +00:00
Jaakko Salli
e84e5ba3c1 Notify if the grid is being destroyed in an event generated by it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-10 14:15:32 +00:00
Vadim Zeitlin
ddc4214a4f Use correct visual attributes for wxSpinCtrl.
The default colours for this control are wxTextCtrl-like and not wxButton-like
(which is the default). Override GetDefaultAttributes() to indicate this and
to avoid returning a wrong background from wxControl::DoMSWControlColor() when
just a foreground is set.

See #1691.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-08 12:23:06 +00:00
Jouk Jansen
c5885966f0 fixed typo : wxDEPRECTED -> wxDEPRECATED
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-07 12:14:21 +00:00
Vadim Zeitlin
ea283460f7 Recognize the buddy text control as part of wxSpinCtrl.
This allows the code in wxWindowMSW::HandleCtlColor() to find the correct
control when handling the messages from the buddy control and hence setting
the colours for wxSpinCtrl works after this change.

Closes #1691.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-06 14:31:25 +00:00
Vadim Zeitlin
4516928a45 Compilation fix after wxTextEntry::SetMargins() changes.
We need to include wx/gdicmn.h to define wxPoint which is now used in
wx/textentry.h, it is not necessarily already included and in fact compilation
was broken in PCH-less build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-06 14:31:17 +00:00
Jaakko Salli
169dc97542 Added check to allow multiple selection by dragging only if property under mouse was adjacent to a property already in the selection.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-06 07:51:35 +00:00
Jaakko Salli
0847e36eff wxTextEntry::SetMargins(), GetMargins() - implemented on wxMSW and wxGTK (GTK+ 2.10+); also added similar functions into wxComboCtrl, deprecated old indent-functions; wxPropertyGrid modified to use the new functionality
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-05 12:39:12 +00:00
Vadim Zeitlin
f432e6777d Tweak the default wxApp::GetAppDisplayName() logic.
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
2009-09-03 11:38:31 +00:00
Jaakko Salli
e9fb1910b9 Added 'bool editable' argument to wxPropertyGrid::MakeColumnEditable()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-01 13:54:41 +00:00