Commit Graph

3515 Commits

Author SHA1 Message Date
Artur Wieczorek
48adc38bbb Refactor code for numeric validation in numeric wxPG properties
Move template function NumericValidation() to wxNumericProperty because all data necessary to validate the value are available here: acceptable value range, SpinCtrl editor value wrapping mode, etc.
2019-06-29 11:13:14 +02:00
Artur Wieczorek
69632371e3 Implement wxNumericProperty as a base class for all wxPG numeric properties
All numeric properties (wxIntProperty, wxUIntProperty, wxFloatProperty) share some features (like specific attributes, numeric validation, SpinCtrl editor support) so for the sake of clear design it would be good to derive them from the common base class (wxNumericProperty) in which all shared functions are implemented. This class is not intended to be instantiated so it's an abstract class.
2019-06-29 11:13:13 +02:00
Artur Wieczorek
8c0a210a75 Make wxPGProperty an abstract class
wxPGProperty is intended to be only a base class for property classes and therefore shouldn't be instantiated directly.
2019-06-29 11:11:35 +02:00
Ilya Sinitsyn
feacaf8714 Use wxWindow as a control for wxGridCellEditor
Use wxWindow instead of wxControl in wxGridCellEditor to allow using
any window as an editor control, as it doesn't need to be a wxControl.

Closes https://github.com/wxWidgets/wxWidgets/pull/1370
2019-06-28 16:47:56 +02:00
Vadim Zeitlin
8f47728fd2 Merge branch 'grid-appearance-fixes'
Draw row/columns labels better in the disabled state and improve
appearance of wxGrids with a border.

See https://github.com/wxWidgets/wxWidgets/pull/1358
2019-06-19 16:44:16 +02:00
Vadim Zeitlin
5b525ed201 Advise using a border with a wxGrid not showing column/row labels
In this case a border can be useful to visually separate the grid from
the surrounding area as without it there is no separation at all.
2019-06-18 00:58:51 +02:00
Vadim Zeitlin
18956125d3 Fix copy-and-pasto in wxGrid::HideColLabels() documentation
The old sentence didn't make sense for this function.
2019-06-18 00:55:16 +02:00
Artur Wieczorek
2ebdfb7a40 Remove obsoleted comments 2019-06-16 19:49:01 +02:00
Robin Dunn
8b489f53d6 MSWSetEmulationLevel and MSWSetModernEmulationLevel are static 2019-06-10 21:03:40 -07:00
Vadim Zeitlin
9f5684d171 Fix a typo in the previous commit
Use wxCLEAR instead of wxNO_OP twice.
2019-06-07 19:44:24 +02:00
Vadim Zeitlin
4184fc286f Document wxGCDC limitations in wxDC API implementation
See https://github.com/wxWidgets/wxWidgets/pull/1339
2019-06-07 17:32:53 +02:00
Tomay
1bb4404527 Make ribbon tab active/hover label colour customizable
Allow changing the colour of the label in the active and hover states to
make it possible to improve its contrast with the tab background in
these states.

Closes #18406.
2019-06-04 23:23:04 +02:00
PB
4ad780d6d3 Add missing semicolon to examples using wxDECLARE_XXX() macros
Such macros must be followed by semicolons but a couple of examples were
missing them.

Closes https://github.com/wxWidgets/wxWidgets/pull/1337

Closes #18408.
2019-06-04 23:11:02 +02:00
Artur Wieczorek
b309868930 Fix implementation of wxScrolled<wxControl>
wxControl::Create() has a different signature than wxWindow::Create()
(its 6-th parameter is of const wxValidator& type instead of
const wxString&) so it cannot be invoked from the the general template of
wxScrolled<T>::Create() method. We need to move a call to T::Create()
function to a dedicated template function wxCreateScrolled() responsible
for actual creation of the scrolled window and overload it for custom
classes if necessary.
This has to be done for wxControl and from this overloaded function
wxControl::Create() can be called with rearranged parameters.
2019-06-02 22:34:01 +02:00
Vadim Zeitlin
8caa379490 Merge branch 'sys-theme-fixes'
Fix disabling system theme for wxMSW wxListCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/1332
2019-05-28 17:17:49 +02:00
Vadim Zeitlin
65fdda7a35 Document that wxDC::GetPixel() doesn't work under Mac
See #4473.

Closes https://github.com/wxWidgets/wxWidgets/pull/1333
2019-05-28 00:38:17 +02:00
Vadim Zeitlin
b04f199cd0 Correct wrong XDG note in wxStandardPaths::GetUserDir() docs
Unlike the older functions, this one doesn't care about backwards
compatibility and so always uses XDG specification.

Closes #18403.
2019-05-27 17:27:55 +02:00
Vadim Zeitlin
d9684e1ceb Allow calling EnableSystemTheme(false) before creating the window
This is important as enabling the system theme results in changes to the
native ListView control appearance that are not undone later even if the
system theme is disabled. Notably, the item rectangle width is reduced
by 2 pixels when system theme is enabled and it's not increased to its
original value even when it's disabled later, resulting in gaps between
items through which the control background shows, for example. This also
makes items drawn using our own HandleItemPaint() slightly, but
noticeably, larger than the items using standard appearance, which looks
bad.

All these problems can be avoided if we skip enabling the system theme
in the first place if EnableSystemTheme(false) had been called before
creating the control, so support doing it like this and document that
this is the preferred way of disabling the system theme use.

Closes #17404, #18296.
2019-05-26 23:20:21 +02:00
Artur Wieczorek
a93713f7f8 Use long int literals to represent long constants 2019-05-26 18:51:37 +02:00
Artur Wieczorek
1943a9f38d Update wxPG documentation to get rid of doxygen warnings 2019-05-26 18:22:49 +02:00
Artur Wieczorek
58fdf77c9b Add descriptions of enum values in documentation 2019-05-26 18:22:14 +02:00
Artur Wieczorek
1a5526e0ad Remove unused type definition from documentation
It's not used since 3.1.
2019-05-26 18:20:38 +02:00
Artur Wieczorek
b55ff7c3b5 Fix typo in documentation
To generate the link to wxPG_FILE_DIALOG_TITLE.
2019-05-26 18:19:13 +02:00
Artur Wieczorek
d225d2c099 Remove unnecessary section from wxPG documentation
Documentation of macros looks better without using the section.
2019-05-26 18:17:42 +02:00
Artur Wieczorek
7a29f5dd2c Don't set maximum text length for non-text wxPG properties
Setting the limit for the length of the text the user can enter in the text editor makes sense only for properties having text editors so in wxPGProperty::SetMaxLength() should be done a check whether to actually set a limit or not depending on the kind of editor used.
wxPropertyGridInterface::SetPropertyMaxLength() should be implemented on top of wxPGProperty::SetMaxLength() to proceed only if maximum length was actually set.
2019-05-26 18:06:53 +02:00
Artur Wieczorek
549acf6e80 Implement wxPropertyGrid as wxScrolled
Scrolling operations and related calculations are simpler when wxPG is implemented as wxScrolled instead of wxScrollHelper.
2019-05-26 17:57:31 +02:00
Robin Dunn
629e52da5e Remove 'virtual' from some items that are not virtual in the real code 2019-05-24 13:33:41 -07:00
Robin Dunn
c30eb8f2ff Add missing and fix broken interface items for wxPython 2019-05-23 21:26:14 -07:00
Artur Wieczorek
04cebe381a Remove unneeded privileged access as friends 2019-05-12 20:24:59 +02:00
Artur Wieczorek
d4df8119ee Remove from documentation references to nonexistent classes 2019-05-12 20:24:58 +02:00
Artur Wieczorek
8ba6173e21 Update wxFloatProperty documentation
DoGetAttribute() function is no longer implemented.
2019-05-12 20:24:57 +02:00
Artur Wieczorek
fde9bb6d41 Make wxPG_COLOUR_ALLOW_CUSTOM a Boolean property
So far it was implemented as property which could take int values 0/1 so it was acting essentially as a Boolean property. Implementing it explicitly as a Boolean one will make it more intuitive. Legacy code setting 0/1 int values shouldn't be affected because conversion from int to bool is implicit.
2019-05-12 20:24:57 +02:00
Artur Wieczorek
1b977718d4 Make wxPG_FILE_xxx built-in attributes
All wxPG_FILE_xxx attributes are used only in wxFileProperty to set respective internal data members and don't have to be stored in the property's attribute store.
2019-05-12 20:24:55 +02:00
Artur Wieczorek
baaba42776 Refactor: display file selector dialog from within member function in wxFileProperty
By moving the code to display file selector dialog from wxPGFileDialogAdapter to wxFileProperty we can encapsulate the operation of showing the dialog because all required parameters are stored in the corresponding data members and there is no need to use call generic GetAttribute() function to retrieve them. This also helps in making wxFileProperty attributes built-ones in the future.
2019-05-12 20:24:55 +02:00
Artur Wieczorek
d9da2feaf2 Refer to predefined constants in documentation 2019-05-12 20:24:54 +02:00
Artur Wieczorek
b2ea56b4e9 Make wxPG_FILE_DIALOG_STYLE a built-in attribute
This attribute is used only internally in wxFileProperty so it can be considered as a built-in attribute which value can be stored in the local data member and not in the property's attribute store.
2019-05-12 20:24:53 +02:00
oneeyeman1
28a84486bd Implement wxClipboard::Flush() in wxGTK
Update the documentation and also add a call of Flush() to the sample.

Closes #10515.

Closes https://github.com/wxWidgets/wxWidgets/pull/1316
2019-05-10 01:46:54 +02:00
Vadim Zeitlin
02adddfa1a Merge branch 'wxlistctrl-virtual-checkboxes' of https://github.com/MaartenBent/wxWidgets
Add support for checkboxes to virtual wxListCtrl too.

See https://github.com/wxWidgets/wxWidgets/pull/1315
2019-05-10 01:39:33 +02:00
Vadim Zeitlin
04689e9727 Merge branch 'utf8-text-stream'
Really fix reading from UTF-8 text streams.

Closes #14720.

See https://github.com/wxWidgets/wxWidgets/pull/1304
2019-05-10 01:35:55 +02:00
Vadim Zeitlin
998097b3a4 Merge branch 'col-dialog-current'
Add events for current colour change in wxColourDialog and
wxColourPickerCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/1301
2019-05-10 01:31:18 +02:00
Maarten Bent
353b0aabba Add virtual function to provide virtual wxListCtrl checkbox state 2019-05-05 14:24:30 +02:00
Vadim Zeitlin
542aafff39 Ensure that we accept WXK_XXX in RegisterHotKey() in wxMSW
RegisterHotKey() wrongly expected to be given VK_XXX MSW virtual key
code constant, which couldn't work in portable code, so fix it to accept
WXK_XXX constants, while preserving compatibility by still accepting
VK_XXX values not clashing with them.
2019-05-02 20:53:18 +02:00
QuentinC
413abb066e Allow retrieving current filter from wxFileDialog extra controls
Add wxFileDialog::GetCurrentlySelectedFilterIndex() similar to the
existing GetCurrentlySelectedFilename(), which can be used to retrieve
the index of the currently selected filter and update the state of the
extra controls in wxFileDialog accordingly.

Implement this for wxMSW only by updating the internally stored value
from the native CDN_TYPECHANGE notification and also generating a
wxEVT_UPDATE_UI event to allow the extra controls to update themselves.

Closes https://github.com/wxWidgets/wxWidgets/pull/1310
2019-05-02 19:53:05 +02:00
Vadim Zeitlin
a1b39ce78b Merge branch 'wxsvgfiledc-improvements' of https://github.com/MaartenBent/wxWidgets
Fix wxSVGBitmapFileHandler directory for saving files and other
miscellaneous improvements to wxSVGFileDC code and documentation.

See https://github.com/wxWidgets/wxWidgets/pull/1290
2019-04-25 18:54:23 +02:00
Maarten Bent
e32721247a Use wxFileName in wxSVGBitmapFileHandler constructor 2019-04-23 21:20:02 +02:00
Artur Wieczorek
87318ec4ee Update documentation bout querying for property attributes
Describe what is returned when corresponding functions are queried for values of built-in attributes and wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES style is set.
2019-04-22 20:28:53 +02:00
Artur Wieczorek
cd1dafb619 Make wxPG_ATTR_MULTICHOICE_USERSTRINGMODE a built-in attribute
This attribute is used only internally in wxArrayStringProperty and thus can be considered as a built-in attribute which value can be stored in the local data member and not in the property's attribute store.
2019-04-22 20:16:15 +02:00
Artur Wieczorek
36285e7fb8 Fix setting wxPG_ARRAY_DELIMITER attribute
This attribute is used only to set internal data member in wxArrayStringProperty and thus can be considered as a built-in attribute which doesn't have to be stored in the property's attribute store.
2019-04-22 20:16:14 +02:00
Artur Wieczorek
c96495d3be Fix formatting keywords and predefined constants in documentation 2019-04-22 20:16:12 +02:00
Vadim Zeitlin
5488a1438f Globally replace vadim@wxwindows.org with vadim@wxwidgets.org
The old email address is invalid since many years and shouldn't be used
any longer.

No real changes.
2019-04-22 14:12:05 +02:00