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
These styles allow to use a smaller browse button as the standard one takes
too much space, often leaving too little of it for the more important text
control part.
Notice that both styles are, in fact, equal to wxPB_SMALL but only file and
directory pickers currently use it as it doesn't make sense for the colour and
font pickers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There doesn't seem to be any reason not to do this in the controls which we
know are meant for entering file or directory names into them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The controls were too small to see long paths in them comfortably while there
was plenty of space in the page, use wxEXPAND flag for them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As we already had MSW-specific AutoCompleteFileNames(), we can just as well
also add the also useful AutoCompleteDirectories() to be used with the text
controls used for path entry.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is a facade for wxDataViewCtrl allowing to easily work with multi-column
trees, possibly with an optional checkbox in the first column. Its API is very
similar to wxTreeListCtrl and it provides a simple migration path from the
latter.
Add the class itself, documentation for it and minimal unit tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Having wxBITMAP_TYPE_TIFF and wxBITMAP_TYPE_TIFF_RESOURCE is more consistent with already using the complete short name of an image format elsewhere (e.g. wxBITMAP_TYPE_JPEG, not wxBTMAP_TYPE_JPG, and wxTIFFHandler as opposed to wxTIFHandler). Renamed all existing occurrences and kept the old enum values for backwards compatibility.
Also renamed occurrences of wxBITMAP_TYPE_RESOURCE to the already existing wxBITMAP_TYPE_BMP_RESOURCE.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Avoid defining SetImageList() in several different places in wx API as not
only this resulted in (trivial) code duplication but this method also had
different semantics before: it didn't take ownership of the pointer passed to
it in wxTreeCtrl, wxListCtrl and wxBookCtrl and derived classes but did take
its ownership in wxDataViewTreeCtrl and wxRichTextFormattingDialog.
Harmonize this for all the classes now: SetImageList() never takes ownership
while AssignImageList() (which is now available in all classes having
SetImageList()) always does.
Also add convenience wxWithImages::GetImage() helper to avoid (more) code
duplication in wxDataViewTreeCtrl code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Thread id is an (unsigned) long, not just unsigned, so use "%lx" to print it
instead of "%x" to avoid asserts in formatting code.
Closes#13404.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
openFiles (available since OS X 10.3) replaces using the openFile method. It allows for more convenient handling of multiple drops and knowing in advance how much files/folders are dropped instead of openFile with which you only get to respond to a single file/folder drop at a time. By default openFiles calls the newly added MacOpenFiles which calls MacOpenFile multiple times, so ordinarily the behaviour is backwards compatible (both on wxOSX Cocoa and Carbon).
The openFile instance method has been removed because it doesn't seem to be called anymore: neither when dropping a single file on the application in the dock or Finder nor when passed as a command-line argument.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Also generate events corresponding to WM_SYSCOMMAND messages for the custom
items of the system menu.
Add a small snippet to test the new functionality to the dialogs sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Implement support for wxHELP for wxMSW, wxGTK and wxOSX/Cocoa (at least when
showing the message box from the main thread, there doesn't seem to be any way
to show more than three buttons with CFUserNotificationDisplayAlert() so
"Help" button is not supported when using it).
This is useful not only on its own, i.e. to allow the user to ask for help,
but also because it brings the total number of buttons supported by the
message dialog to 4, meaning that more choices can be offered to the user
(which is rarely, but not quite never, useful).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Show how the file history can be saved to and restored from wxConfig.
This makes it much easier to test file history related stuff as the history
doesn't need to be recreated during every sample run.
It is also closer to what real applications using docview framework do as the
file history is relatively useless if it's not saved.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775