Commit Graph

53512 Commits

Author SHA1 Message Date
Stefan Csomor
8f2139d0d8 setting the image position after the label is set, otherwise image_only will have the potential label over the image
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-03 16:19:28 +00:00
Václav Slavík
857f05e1bf Use ProcessWindowEvent() in generic wxDataViewCtrl code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-03 13:14:31 +00:00
Václav Slavík
cfc2188189 Extracted wxDataViewMainWindow left/right keys handling into separate methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-03 13:14:28 +00:00
Václav Slavík
1dc779fc6c Rename wxDataViewMainWindow::OnArrowChar to OnVerticalNavigation.
The method handled much more than just arrow characters and it didn't
handle all arrow characters.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-03 13:14:25 +00:00
Václav Slavík
2c336e249e Slightly more efficient wxDataViewCtrl::StartEditor().
Don't compute item rect until we know for sure that the item actually is
editable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-03 13:14:23 +00:00
Václav Slavík
c2efa4b48a Fix generic wxDataViewCtrl Enter handling to conform to Windows UI.
Spacebar is used to activate columns (e.g. toggle a checkbox).  Enter
activates the item, i.e. sends wxEVT_COMMAND_ITEM_ACTIVATED. If that
event isn't handled, Enter acts the same as Space.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-03 13:14:20 +00:00
Robin Dunn
8ff9b17d57 Fix some broken or add some missing interface declarations for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-03 01:39:02 +00:00
Vadim Zeitlin
c2d4ceaf57 Don't warn about wxMetaFile in configure by default.
Only warn if an explicit --enable-metafile was given, otherwise just turn it
on only for the platforms that do support it, similarly to what was done for
--enable-hotkey in the previous commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68969 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-01 18:43:07 +00:00
Vadim Zeitlin
97e477c557 Add wxUSE_HOTKEY support to configure.
Add --enable-hotkey switch to allow enabling hot keys support and enable it by
default under MSW and OS X that do support them but disable it elsewhere to
avoid unnecessary warnings about them being unsupported.

See #12354.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-01 18:43:03 +00:00
Stefan Csomor
b8702c673a fixes #13443, thanks :-)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-01 16:20:24 +00:00
Vadim Zeitlin
2bad2b6d60 Fix deleting and clearing wxTreeListCtrl columns.
The model columns were not updated before, resulting in a mismatch between
view and model columns if ClearColumns() followed by AppendColumn() was
called.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-31 17:22:11 +00:00
Václav Slavík
35219832c9 Add items to correct position in wxDataViewCtrl:ItemAdded.
In both the generic and GTK+ versions, ItemAdded() always appended the
new item, regardless of its position among its siblings  in the model.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-31 09:36:27 +00:00
Václav Slavík
bed74e488f Generic wxDataViewCtrl: resize autosized columns at idle time.
This is much more efficient than doing it immediately when adding large
number of items into a control with lots of them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-31 09:04:41 +00:00
Dimitri Schoolwerth
685a9fa61d Fixed dlmsw.cpp compilation with older SDKs and at run-time for systems prior to XP SP1.
Kernel32's SetDllDirectory is only available since XP SP1 and as such also not available in the SDK that comes by default with for example VS6. Attempt to retrieve the function from the DLL at run-time instead. Regression since r68935.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-30 15:20:05 +00:00
Vadim Zeitlin
2669319136 Better support for flat lists in wxTreeListCtrl.
Override wxDataViewModel::IsListModel() to return true if wxTreeListCtrl
doesn't have any depth. This results in better display when using the generic
implementation of wxDataViewCtrl as no space is reserved for the (unnecessary)
expanders in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-30 13:40:44 +00:00
Vadim Zeitlin
c46ecbe3b5 Fix computation of the item offset in generic wxDataViewCtrl code.
We need to account for the expander even for the items that don't have
children when computing their offset as their parent still does have it,
contributing to the total offset.

This corrects the fixes of r68836 to also work for the leaf items.

Also rename expanderOffset variable to more clear itemOffset.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-30 13:40:40 +00:00
Jouk Jansen
179dbf40de Update makefiles for OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-30 09:51:21 +00:00
Stefan Csomor
8b14528f7b fixes #13438 (building OSX min >= 10.6), thanks :-)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-30 09:02:11 +00:00
Stefan Csomor
eb3cb4925c adding command - comma as shortcut of stockitem wxID_PRERENCES on OSX - and make sure it's working by adapting ToString()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-30 07:01:25 +00:00
Dimitri Schoolwerth
eb5502dcaa Regenerated Xcode projects.
Updated the Xcode projects to include latest source additions and newer settings from template *_in.xcodeproj project files.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-29 19:09:16 +00:00
Václav Slavík
77b555c2a4 Send wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED if WXOnActivate() returned false too.
This is consistent with wxGTK implementation and generally makes sense:
when the renderer cannot handle activation, whole-item activation should
be tried next.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-29 17:25:38 +00:00
Václav Slavík
297e2532b1 Make generic wxDataViewToggleRenderer react to activation.
Previously it only responded to single-clicks, which was to avoid the
need to double-click checkboxes. Fixed to react to activation via
double-click or keyboard too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-29 17:25:33 +00:00
Václav Slavík
276227fcbb Activate cells from keyboard too in generic wxDataViewCtrl.
wxDataViewCtrl only called WXOnActivate() in reaction to double-click.
When Enter/Spacebar was pressed, only
wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED was sent, without calling
OnActivate() even if it was possible.

Fixed to handle both kinds of input identically.

Because there's currently no way to change current focus to a particular
column (as GtkTreeView can do), call WXOnActivate() on the first
activatable column.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-29 17:25:25 +00:00
Dimitri Schoolwerth
07968bbdc5 Fixed drawing a check box in the undetermined state for non-themed MSW apps.
wxRendererMSW::DoDrawFrameControl (used for systems prior to XP or when theming is disabled) didn't check for the wxCONTROL_UNDETERMINED flag yet. Set the appropriate styles when the flag is used to fix drawing check boxes in their third state (as used in for example the treelist sample).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-29 16:06:32 +00:00
Vadim Zeitlin
513d05952a Make it possible to TAB to wxTreeListCtrl contents.
Even though wxTreeListCtrl contains just one child window it still needs to
derive from wxNavigationEnabled<> to allow focus getting to its sole child.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-29 14:46:56 +00:00
Vadim Zeitlin
758cdca10a Fix spelling error in an error message in wxObjectXmlReader.
No other changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-29 12:33:40 +00:00
Dimitri Schoolwerth
ab176b4b50 Added alpha saving support to TIFF image handler.
Added support for saving alpha with RGB, greyscale, and black and white images.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-29 01:13:06 +00:00
Dimitri Schoolwerth
ebbaec82fa Fixed loading greyscale with alpha TIFF images.
The alpha channel was not detected because of wrong hasAlpha determination. Also TIFFReadRGBAImage[Oriented] doesn't appear to decode an alpha channel for images that are greyscale so decode greyscale with alpha images using TIFFReadScanline.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-28 23:45:17 +00:00
Dimitri Schoolwerth
a000de7794 Fixed copying only 1/3 of scanline when saving TIFF image in rare cases.
If our calculated image pitch is not equal to what TIFFScanlineSize returns a scanline buffer would be used. In that case the number of bytes being copied was equal to the image's width instead of pitch (width times 3).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-28 22:44:04 +00:00
Dimitri Schoolwerth
f60e313437 Added support for loading black and white TIFF images with alpha.
As TIFFReadRGBAImage[Oriented] can't deal with all images make use of TIFFReadScanline to decode per scanline. Currently only the case of a black and white image with alpha (for a total of 2 bits per pixel) is handled.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-28 22:17:04 +00:00
Dimitri Schoolwerth
d6d29abb44 Updated manual regarding image alpha support for TGA handler.
TGA was not mentioned in the list of formats supporting loading of alpha, but alpha loading support has been available since r42644.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-28 22:06:46 +00:00
Dimitri Schoolwerth
5d2be7cc55 Read TIFF images from top to bottom instead of bottom to top.
Use TIFFReadRGBAImageOriented with a parameter of ORIENTATION_TOPLEFT instead of using TIFFReadRGBAImage (which uses ORIENTATION_BOTTOMLEFT) to read images in a more logical order and simplify code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-28 21:59:36 +00:00
Dimitri Schoolwerth
f2de33ede4 Fixed accessing out-of-bounds image coordinates while writing a black and white TIFF image.
The code assumed that the image's width is a multiple of 8, and attempted to always write per 8 pixels instead of sometimes having to write fewer pixels for the last column.

Also fixed compilo from previous commit due to not removing old code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-28 21:49:28 +00:00
Dimitri Schoolwerth
649df4bff8 Fixed calculated image pitch being off-by-one in some cases.
The variable linebytes sometimes counted one extra byte, which is OK for allocating but not when accessing the image later on. Calculate the value in a slightly different way and made the variable const.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-28 21:38:22 +00:00
Dimitri Schoolwerth
28b31a2ad2 Removed double TIFFSetField call for setting TIFFTAG_ORIENTATION.
Setting the same TIFF tag with the same value once is enough.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-28 21:31:59 +00:00
Dimitri Schoolwerth
c6973babc6 Call GetAlpha() to get a pointer instead of checking for alpha first.
It's safe to call GetAlpha() even if there's no alpha because in that case NULL will be returned.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-28 21:27:34 +00:00
Stefan Csomor
2824962c5a make sure svn info for an already existing .xcodeproj folder is not deleted, replace project file itself in place
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-28 13:00:38 +00:00
Stefan Csomor
1aa1d260b5 adding missing doc string for BACKSPACE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-28 07:11:44 +00:00
Stefan Csomor
99d6720118 routing keys like ESC etc, fixes #13429
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-28 06:54:18 +00:00
Robin Dunn
932d0768aa * Implement dynamic loading of the Cairo DLL on Windows similar to how it was
done for GDI+.

* Enable the use of the wxCairoContext on MSW.

* Enable creating a wxGCDC from an exisiting wxGraphicsContext.

* Since it's possible for a DLL that is using wx to not be on the PATH nor in
  the same location as the .exe, change the wxDynamicLibrary::RawLoad method to
  explicitly look first in the same place as the main wx-using binary.  This way
  it will find DLLs that are in the same folder as the wx-using binary even if
  that would not be in the normal DLL search path.  

* Change wxDCImpl and wxDC::GetLogicalScale to be const methods.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 23:26:53 +00:00
Václav Slavík
d54f0605a9 More understandable symbolic constants in generic wxDVC's DoJob class.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 16:44:47 +00:00
Václav Slavík
e1f30123c9 Use spacebar to activate items in generic wxDataViewCtrl too.
Pressing Spacebar now behaves the same as Enter in the generic control,
for consistency with the GTK+ control and native Windows list controls.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 16:44:45 +00:00
Václav Slavík
a2d3c415d7 Remove DestroyTreeHelper(), make GetChildNodes() const, add RemoveChild().
There's no reason for DestroyTreeHelper() code, that's what destructors
are for.  On a related note, make removal of children from a node more
explicit too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 16:44:42 +00:00
Václav Slavík
c2c89730e2 Add wxDataViewMainWindow::GetModel() helper.
It's slightly less verbose than GetOwner()->GetModel() used all
over the place.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 16:44:39 +00:00
Václav Slavík
ff3c5ad3d3 Better names in wxDataViewTreeNode.
GetChildNodes() instead of GetNodes(), AddChild() instead of AddNode().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 16:44:36 +00:00
Václav Slavík
dd90475f71 Use wxTE_PROCESS_ENTER with wxDataViewCtrl text controls.
wxDVC code depends on wxEVT_COMMAND_TEXT_ENTER to hide the
inline editing controls.

Fixes #13412.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 15:23:43 +00:00
Vadim Zeitlin
d5d0f0cd9a No real changes, minor corrections to the docs.
Don't leave a line break inside a @code block as it's preserved in the HTML
output, making it appear ugly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 14:58:43 +00:00
Vadim Zeitlin
686631c665 Copy generic images when building the documentation too.
The images used by @genericAppearance Doxygen macro were not copied to the
output directory.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 14:56:33 +00:00
Vadim Zeitlin
00fa267c1e Compilation fix for wxTreeListCtrl when not using PCH.
Include wx/dc.h normally included from wx/wxprec.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 14:50:01 +00:00
Vadim Zeitlin
211d331379 No changes, just fix the file name in the header comment of wxDVC test.
s/tree/dataview/

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 14:11:31 +00:00