Commit Graph

4639 Commits

Author SHA1 Message Date
Vadim Zeitlin
bb58fa37cd Don't hard code white background colour in generic wxDataViewCtrl.
wxDataViewMainWindow::OnPaint() always used the white brush to erase the
control background which was wrong, change it to use the background colour of
the control.

Also add tests for setting wxDataViewCtrl foreground and background colours to
the dataview sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 16:43:19 +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
f37f49b652 Applied #10811: Image in docview sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 16:04:06 +00:00
Julian Smart
abee7f4704 Applied #10829: docview sample: enable canvas in --single mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 15:48:00 +00:00
Julian Smart
c50e0cc752 Applied part of #9115 (STC sample cleanup)
by troelsk 


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 13:08:48 +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
Jouk Jansen
8110dab0ff Include compile support for propgrid & ribbon on OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 14:13:55 +00:00
Vadim Zeitlin
bced985eb0 Add a test of precisely sized status bar fields.
Modify the status bar sample to use two fields of just the right size for
their contents to confirm that this doesn't work correctly under at least MSW
currently (see #10696).

Notice that we need two fields because the behaviour/problem is different for
the last field and all the other ones.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 13:00:23 +00:00
Vadim Zeitlin
5eb65a3b70 Simplify the status bar sample by removing wxBitmapButton.
The sample code was complicated by having USE_STATIC_BITMAP and using
wxStaticBitmap or wxBitmapButton depending on it. Neither important for
a wxStatusBar sample so just use wxStaticBitmap always and make the code
simpler and more readable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 13:00:16 +00:00
Vadim Zeitlin
ee38a8cf7f Show status bar panes rectangles in the sample.
Display the rectangles returned by wxStatusBar::GetFieldRect() to be able to
visually check if they are correct.

See #10696.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 13:00:07 +00:00
Vadim Zeitlin
06a0d3eaaf Clean up status bar sample.
No real changes, just:
 - Fix code which couldn't compile in USE_MDI_PARENT_FRAME case
 - Use wxMenu::AppendCheckItem() instead of Append(..., true)
 - Remove unnecessary #ifdef __WXMAC__
 - Wrap excessively long lines

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 12:59:56 +00:00
Vadim Zeitlin
d9e90d7912 Add ribbon sample to the list of samples to build.
Add the file to samples/samples.bkl and regenerate the makefiles and also add
it manually to samples.dsw.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-16 23:18:55 +00:00
Vadim Zeitlin
d33ccbe15c Rebaked everything with bakefile 0.2.6 after wxRibbon merge.
0.2.5 versions of some makefiles were checked in, regenerate them using 0.2.6.

Also regenerate configure after autoconf_inc.m4 was updated.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-16 13:07:10 +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
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
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
Vadim Zeitlin
fa837f6633 Remove unneeded pointer check.
This was flagged as an error by static code analyse tools.

Closes #11195.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-14 00:44:59 +00:00
Vadim Zeitlin
d12d9edacb Rebake all the samples, demos and tests makefiles.
This should have been committed together with the changes to the debug flags
handling in build/bakefiles in r61887.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-12 13:38:08 +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
Vadim Zeitlin
7c9cc312e7 Show the order in which different event handlers are called.
Update the event sample to define (as) many (as possible) event handlers for a
test button and log messages in all of the handlers to leave a trace of the
order in which they were executed.

Add a pointer to this feature of the event sample to the events overview.

Closes #11156.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-07 23:00:21 +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
Jaakko Salli
08c1613f88 Disabled top-level parent tracking by default (crashes with AUI), must now use wxPG_EX_ENABLE_TLP_TRACKING style to enable old behavior.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-29 08:09:45 +00:00
Vadim Zeitlin
84e0e5265d No changes, just fix unused variables and parameters warnings.
Fix warnings in wxGTK wxUSE_GRAPHICS_CONTEXT==1 build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-24 21:42:21 +00:00
Vadim Zeitlin
7b342d55c3 Show the current range of valid dates in the calendar sample.
See #11081 (point C).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 22:24:54 +00:00
Jaakko Salli
58935d4a5c Added label editing capability into wxPropertyGrid
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 15:31:03 +00:00
Vadim Zeitlin
1b4b608091 Do wait for connection in the server socket.
The code returned immediately from wxSocketBase::DoWait() if it wasn't
connected but it only made sense for the client sockets, not server ones which
could be calling this function precisely in order to wait until a connection
is made.

Also added a test for this bug in the sockets/server sample.

Closes #11107.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 15:25:09 +00:00
Jaakko Salli
fc72fab6c6 Added multiple selection feature to wxPropertyGrid (enabled by setting wxPG_EX_MULTIPLE_SELECTION style)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-17 18:36:00 +00:00
Jaakko Salli
832c54d43e Added workaround for VC6 internal compiler error (fixes #11104)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-15 05:30:18 +00:00
Vadim Zeitlin
90666795d4 Another compilation fix after wxFlexGridSizer ctors change.
wxFlexGridSizer ctor was even used incorrectly even in layout sample itself,
once again the code was supposed to create 3*3 sizer, not 3-column sizer with
3 pixel vertical gap.

Changed ctors to be more explicit and to use a 5 pixel gap in both directions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-11 10:54:40 +00:00
Vadim Zeitlin
bb9e19db3d Compilation fix after wxFlexGridSizer ctors change.
wxFlexGridSizer ctor was even used incorrectly in a wx sample: the sizer was
supposed to have 2 columns, not 4 with 2 pixels of vertical gap.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-11 00:19:03 +00:00
Vadim Zeitlin
1454b44261 Add test for Push/PopStatusText().
Allow to interactively push and pop status messages for the selected field.

This shows that currently PushStatusText() is completely broken under wxMSW
as it never shows the text being pushed at all because it is "optimized" away
due to an incorrect comparison with the old value (which turns out to be the
new one)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-06 00:00:47 +00:00
Vadim Zeitlin
dac831bb08 Provide saner UI for setting status bar fields.
Instead of asking the user to enter N values in a row (which is really
annoying even for N=2 already), allow to select the status bar to set the
value for and only show a single dialog asking for the value of this pane.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-06 00:00:39 +00:00
Vadim Zeitlin
41d6e8b683 No changes, just removed the whitespace.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-06 00:00:32 +00:00
Vadim Zeitlin
a5cf7942c9 Test wxCalendarCtrl::SetDateRange() in the sample.
See #11060.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-05 13:40:39 +00:00
Vadim Zeitlin
32eda62d16 Improve the menus.
Added accelerators; use radio items for mututally exclusive choices. No real changes otherwise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-26 21:10:27 +00:00
Vadim Zeitlin
704006b381 Allow setting long version field in About dialog.
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
2009-07-25 22:53:23 +00:00
Vadim Zeitlin
9a83f86094 Globally replace _T() with wxT().
Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-23 20:30:22 +00:00
Vadim Zeitlin
43b2d5e7c3 Put braces around all calls to wxLogFunctions() inside an if statement.
This suppresses all the remaining g++ -Wparentheses warnings and uses consistent style everywhere.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-20 16:47:54 +00:00
Vadim Zeitlin
9fceb168bc fix more -Wparentheses warnings after wxLog changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-19 16:16:46 +00:00
Paul Cornett
52ada3cdeb fix crash with repeated split horizontal/vertical and replace window, #11002
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-18 22:46:26 +00:00
Vadim Zeitlin
53ff8df7d5 Make wxLog::EnableLogging() and wxLogNull thread-specific.
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
2009-07-13 13:21:52 +00:00
Vadim Zeitlin
acad886cb4 Add support for thread-specific log targets.
A worker thread can now have its own log target which will be used directly
by the log functions instead of buffering log output in the main thread; the
GUI thread in the thread sample shows how it works.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-13 11:09:26 +00:00
Vadim Zeitlin
232addd1cd Made wxLogXXX() functions thread-safe.
They can now be called from any thread and will buffer the messages until the
current log target is flushed from the main thread. This makes earlier code to
do the same thing specifically for wxLogWindow unnecessary and also allows to
use wxLogMessage() in the thread sample instead of using manual logging there.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-12 17:02:30 +00:00
Jaakko Salli
a1f2daa6d8 Do not disable some useful buttons when wxCB_SORT style is used in wxBitmapComboBox sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-10 14:50:00 +00:00
Vadim Zeitlin
af58844636 Add information about the log message generation location to wxLog.
This means that wxLog::DoLogRecord() can now retrieve the file name, line
number and the function where the message was logged.

An unfortunate consequence of this change is that now

	if ( condition )
		wxLogError("Whatever");

results in a warning from g++ 4.x with -Wparentehses, so extra parentheses had
to be added in many places.

Finally, also allow storing arbitrary attributes in wxLogRecordInfo. This had
to be added to implement our own overloaded wxLogStatus() and wxLogSysError()
and will probably be useful for the others as well.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-09 20:26:34 +00:00
Vadim Zeitlin
f2a4f50e7d make bitmap button background more visible
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-09 13:11:52 +00:00
Vadim Zeitlin
f54277629a update LboxLogger definition after the previous revision changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-08 13:53:36 +00:00
Vadim Zeitlin
8eceaeb621 compilation fix after last change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-05 13:32:32 +00:00
Vadim Zeitlin
f106c625bd really fix compilation fix after last change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-05 13:10:46 +00:00
Vadim Zeitlin
42c097b83e translate wxMessageDialog labels to the language of the current locale (closes #10962)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-05 11:48:01 +00:00