Commit Graph

365 Commits

Author SHA1 Message Date
Artur Wieczorek
892def066c Pass only relevant extra style bits to wxPropertyGrid
When extra style bits are set with the call to
wxPropertyGridManager::SetExtraStyle(), only those which are relevant
to wxPropertyGrid should be passed to the underlying property grid object.
Because it can happen that not all extra style bits of the underlying
wxPropertyGrid have been effectively changed by call to SetExtraStyle()
(e.g. wxPG_EX_NATIVE_DOUBLE_BUFFERING), we have to get the actual style
bits prior to storing them.
2017-10-18 22:58:21 +02:00
Takeshi Abe
0fea881f12 Fix recurrent "applicable" typo in wxPropertyGrid documentation
It was misspelt as "applicapple" in several places.

Closes https://github.com/wxWidgets/wxWidgets/pull/564
2017-10-06 15:28:58 +02:00
orbitcowboy
9416e00abe No real changes, just enclosed macro arguments in parentheses.
I
2017-09-28 19:21:22 +02:00
Artur Wieczorek
6395e7805a Fix repositioning of active property editor in wxPG
When there is open an editor for some property and in the same time
wxPropertyGrid layout is changed (due to the adding or removing a property,
sorting), it is necessary to recalculate the actual position of the active
editor to display it in the cell dedicated for the edited property. Under
some platforms the position of the edit control is shifted within the cell
and we have to take this shift into account in repositioning process.
Because actual value of the shift depends on the platform and on
the particular control, it is convenient to determine actual shift when
the editor is created and use this value whenever repositioning is done.

Close #17912.
2017-07-16 19:38:08 +02:00
Artur Wieczorek
836bbcbfcb Fix positioning of TextCtrlEditor in wxPG (wxOSX)
Position of the editor associated with properties like StringProperty,
IntProperty, etc. needs to be adjusted in order to display edited text
at the same position as the text which is displayed as a property value
prior to the editing.
2017-07-16 19:12:20 +02:00
Artur Wieczorek
3212f7eab9 Fix positioning of TextCtrlEditor in wxPG (wxGTK)
Position of the editor associated with properties like StringProperty,
IntProperty, etc. needs to be adjusted in order to display edited text
string at the same position as the text which is displayed as a property
value prior to the editing.
2017-07-16 19:03:38 +02:00
Artur Wieczorek
113cec4ab2 Update wxPropertyGrid documentation
Completed documentation for topics marked as uncompleted.
2017-03-27 18:54:16 +02:00
Robin Dunn
af9a0f6734 Change ~wxPGChoicesData from private to protected 2016-10-21 20:08:20 -07:00
Artur Wieczorek
cd96c664dd Updated documentation for some wxPropertyGrid classes.
Updated documentation for wxPGEditor, wxPropertyGridPage, wxPropertyGridManager, wx*Property classes.
Removed doxygen-style comments from header files.
2016-07-23 23:38:39 +02:00
Artur Wieczorek
c3fa684a27 Fixed displaying validation error for numeric wxPG properties (wxUIntProperty, etc.)
When entered wxFloatProperty, wxIntProperty or wxUIntProperty is out of range then there is displayed a warning message presenting a valid range. Instead of displaying in this message numeric values in default (and fixed) format we should display values which are formatted based on to the current attributes of the property (like wxPG_UINT_PREFIX, wxPG_UINT_BASE, wxPG_FLOAT_PRECISION).
To do so, we shouldn't format respective values on our own in NumericValidation() but instead call wxPGProperty()::ValueToString() which returns value string formatted in line with attributes.

Closes #17601
2016-07-21 23:13:16 +02:00
Artur Wieczorek
c08b8c6f6d Fixed minor typo in comment. 2016-07-08 19:51:58 +02:00
Artur Wieczorek
c910085507 Update documentation of some flags used by wxPropertyGridInterface methods. 2016-07-08 19:49:03 +02:00
Artur Wieczorek
04ba48e685 Use enum instead of macro to represent flag used in wxPGPropertyGridInterface and wxPGProperty methods.
Use enums to represent all flags.
2016-07-08 19:47:25 +02:00
Artur Wieczorek
7968f37883 Updated documentation of some wxPropertyGrid-related classes.
Updated wxPropertyGridPageState, wxPropertyGridHitTestResult, wxPropertyGridIterator,  documentation.
2016-07-02 23:20:11 +02:00
Artur Wieczorek
2ea7ff3160 Updated documentation for wxPropertyGridInterface.
Updated documentation and removed doxygen-style comments from propgridiface.h header file.
2016-06-25 18:17:57 +02:00
Artur Wieczorek
9bee5e1e2b Updated documentation for several wxPG components.
Updated wxPropertyGrid, wxPropertyGridEvent, wxPropertyGridPopulator documentation and removed doxygen-style comments from propgrid.h header file.
2016-06-23 22:23:03 +02:00
Artur Wieczorek
2ea41cca8d Updated documentation for several wxPG components.
Updated documentation and removed doxygen-style comments from property.h header file.

wxPGPaintData
wxPGProperty
wxPGCell
wxPGAttributeStorage
wxPGChoices
wxPGChoiceEntry
wxPGRootProperty
wxPropertyCategory
2016-06-16 23:55:37 +02:00
Artur Wieczorek
1f696b6110 Updated wxPGDefaultRenderer and wxPGCellRenderer documentation.
Removed doxygen-style comments from the header file, too.

Closes #14788
2016-06-13 18:40:42 +02:00
Marek Temnyak
d4460435d9 Make source string const in wxPropertyGrid escape sequence methods
Source string is not changed in {Expand,Create}EscapeSequences() methods, so
make it const.

Closes https://github.com/wxWidgets/wxWidgets/pull/271
2016-04-14 16:05:10 +02:00
Artur Wieczorek
31ab9d8f3f Make pointer to wxWindow a const argument.
State of referenced window is not going to be changed and let caller know about it.
2016-03-06 21:26:14 +01:00
Artur Wieczorek
912eb6fef9 Use enum instead of macros to represent wxPropertyGrid internal flags. 2016-03-06 21:19:07 +01:00
Artur Wieczorek
85bad08373 Fix wxPropertyGrid compilation when wxUSE_TOOLBAR==0
Don't use toolbar associated with wxPG in this case.
2016-02-25 21:37:27 +01:00
Paul Cornett
27a8d28029 more use of wxOVERRIDE 2015-09-06 17:20:42 -07:00
Artur Wieczorek
c63b1604b3 Use native renderer to draw rectangle indicating that wxPG category property is selected.
Because on some ports native renderers require a valid reference to the windows be drawn then it is necessary to implement and use new wxPGCellRenderer::DrawCaptionSelectionRect method which passes this  additional argument.
2015-08-30 19:46:34 +02:00
Artur Wieczorek
bbecebd4ba Use Boolean expression instead of conditional statement to get Boolean value. 2015-08-27 19:17:49 +02:00
Artur Wieczorek
7ce6cff5ab Extend functionality of wxPropertyGridInterface::SetPropertyColoursToDefault method.
SetPropertyTextColour, SetPropertyBackgroundColour methods are able to set colours recursively for sub-properties but SetPropertyColoursToDefault method is not.
For the sake of consistency, SetPropertyColoursToDefault method is extended to have the same capabilities as SetPropertyTextColour and SetPropertyBackgroundColour. Behaviour and signature in default case (no recursion) is preserved.
For internal purposes there were also implemented helper methods in wxPGProperty class: SetDefaultColours, ClearCells.
2015-08-27 19:14:52 +02:00
Artur Wieczorek
e0f5b49a07 Fixed searching the elements in wxArrayPGProperty.
Use dedicated Index() function to search elements in wxArray instead of calling custom function.
2015-07-20 21:50:30 +02:00
Artur Wieczorek
a0afc17c75 Use wxNullBitmap explicitly instead of wxPG_NULL_BITMAP.
wxPG_NULL_BITMAP macro is not useful because is used only once. In the rest of wxPG code wxNullBitmap is used explicitly many times so for the sake of consistency we can resign from using this macro.
2015-07-17 22:29:37 +02:00
Artur Wieczorek
403dd5673f Use enum instead of macros to represent wxPropertyGrid::DoSelectProperty flags. 2015-07-16 21:04:25 +02:00
Artur Wieczorek
4588acb21b Use wxEmptyString instead of dedicated wxPropertyGridInterface member variable. 2015-07-16 21:00:38 +02:00
Artur Wieczorek
79794391e9 Declare wxPG_DEFAULT_IMAGE_SIZE as wxDefaultSize constant.
wxDefaultSize is an equivalent of wxSize(-1,-1) but is more portable.
2015-07-15 21:45:27 +02:00
Artur Wieczorek
2770f76de5 Fix wxPropertyGridManager::SelectProperty
Call wxPropertyGridpageState::DoSelectProperty with explicitly set flags instead of casting from bool to unisgned int. It cannot be guaranteed that 0/1 values of this implicit conversion will be mapped to the proper flags also int the future.
2015-06-29 20:03:25 +02:00
Artur Wieczorek
f48439cfc6 Fix casting variable in wxFlagsProperty::GetLabel
Cast GetLabel parameter to a proper type (unsigned int instead of int).
2015-06-28 19:31:48 +02:00
Artur Wieczorek
8e2f1b47aa Use wxS macro with string literals.
To make string literals notation consistent.
2015-06-12 23:39:00 +02:00
Artur Wieczorek
6cc7811394 Fixed minor typos in comments.
Yet another iteration.
2015-06-09 20:04:27 +02:00
Artur Wieczorek
c9417c41f5 Fix PCH-less build after cb6efbd.
Add missing wx/settings.h inclusion.
2015-06-09 18:03:56 +02:00
Artur Wieczorek
aeed3322f2 Fixed minor typos in comments. 2015-06-08 21:49:38 +02:00
Artur Wieczorek
c8088e479a Fixed minor typos in the name of variables. 2015-06-08 21:48:08 +02:00
Artur Wieczorek
cb6efbd3c3 Lay out various wxPG dialogs based on the current system screen design.
Currently, customizing some dialogs for small screen environment is done statically on the build stage by setting wxPG_SMALL_SCREEN to 1 (what is done for WXWINCE only).
Instead, we can do this for all platforms in a dynamic manner, based on the classification provided by wxSystemSettings::GetScreenType() function.
In order to do so there is introduced a static helper function wxPropertyGrid::IsSmallScreen() which is used to select right parameters (size, position) for several dialogs in order to display them correctly on the small screen.
2015-06-08 21:46:03 +02:00
Artur Wieczorek
67bfb78ace Replace wxT() with wxS() in wxPropertyGrid code. 2015-05-31 19:20:11 +02:00
Artur Wieczorek
5decea57f4 Don't declare wxPropertyGridManager::SetColumnTitle if wxUSE_HEADERCTRL == 0.
This method already has no definition in this case so there is no reason to declare it.
2015-05-31 19:20:08 +02:00
Artur Wieczorek
65dee275f2 Fix minor typos in comments. 2015-05-30 20:12:02 +02:00
Artur Wieczorek
fec5f36139 Use getter functions to get access to some properties of wxPropertyGridPageState.
Use existing GetColumnCount(), GetColumnWidth() functions instead of getting direct access to corresponding member variables.
2015-05-24 20:44:20 +02:00
Artur Wieczorek
b3ad8dae84 Use empty() member function to determine if arrays are empty in wxPG.
Use this dedicated function instead of checking if size() function returns zero/non-zero value.
2015-05-24 20:36:44 +02:00
Artur Wieczorek
204a3d229c Use symbolic constants instead of numeric ones to represent masks filtering window style flags in wxPG. 2015-05-23 18:26:05 +02:00
Artur Wieczorek
7394dd8e1f Allow wxPG to take focus on the entire area even if wxPG is not a standalone control.
By default, to prevent wxPG from stealing focus from other controls, focus is moved to the grid only if it was already in one of its child controls.
When newly introduced wxPG_EX_ALWAYS_ALLOW_FOCUS flag is set then wxPG can take focus on the entire grid area (on canvas) even if focus is moved from another control.
Default wxPG behavior remains unchanged because wxPG_EX_ALWAYS_ALLOW_FOCUS flag must be explicitly set with wxPropertyGrid::SetExtraStyle function.

Closes #16993.
2015-05-21 18:51:37 +02:00
Artur Wieczorek
b6ab81584f Deprecate wxPGProperty::GetFlags() getter method.
Instead of using pass-trough getter just to check the bits of internal field there are implemented dedicated HasFlag() and HasFlagsExact() methods to do so.
2015-05-16 17:17:14 +02:00
Artur Wieczorek
91144a2247 Fixed setting property label with wxPGproperty::SetLabel
If there is a corresponding cell containing a cached text for column 0 then this text also needs to be updated when the label is changed.

See #16982.
2015-05-10 18:50:25 +02:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Artur Wieczorek
0bc20fee71 Non-PCH wxPG build fix after cc575a.
Include time.h to get wxMilliClock_t used now instead of wxLongLong for the timestamp.
2015-04-06 23:40:54 +02:00