Commit Graph

156 Commits

Author SHA1 Message Date
Artur Wieczorek
8f8955b2b9 Use wxVector<wxObject*> instead of wxArrayPGObject 2019-01-11 19:22:47 +01:00
Artur Wieczorek
eb40eb4b84 Fix horizontal scrolling of wxPropertyGrid header
wxPropertyGridHeader associated with wxPropertyGrid has to be notified about every horizontal scroll of the grid.
New position is sent with dedicated wxEVT_PG_HSCROLL event being handled by wxPropertyGridManager which in turn scrolls the header accordingly.

See #18313.
2019-01-11 19:22:34 +01:00
Artur Wieczorek
42b1cca8f2 Fix repositioning editors for horizontally scrolled grid
New method of calculating of the new position/size of the editor (introduced in 95461c566d) doesn't work well in all cases so we have to go back to the (modified) old method. To get the correct position of the editor cell from the absolute position of the splitter 0 we have to shift it by the origin of the scrolled view area.

See #18313.
2019-01-04 21:31:39 +01:00
Artur Wieczorek
95461c566d Fix repositioning editors for horizontally scrolled grid
Closes #18313.
2018-12-28 14:01:34 +01:00
Artur Wieczorek
e7357eafa2 Declare array explicitly as a wxVector instead of using wxArrayPGProperty alias 2018-11-01 18:19:56 +01:00
Blake-Eryx
e1a7f56040 Fix spelling and punctuation errors in comments and documentation
Fix several occurrences of misspelling "trivial" as "trival"; use "from"
rather than "than"; add missing articles and commas.

Closes https://github.com/wxWidgets/wxWidgets/pull/874
2018-08-14 17:15:39 +02:00
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
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
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
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
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
912eb6fef9 Use enum instead of macros to represent wxPropertyGrid internal flags. 2016-03-06 21:19:07 +01:00
Artur Wieczorek
403dd5673f Use enum instead of macros to represent wxPropertyGrid::DoSelectProperty flags. 2015-07-16 21:04:25 +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
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
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
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
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
Artur Wieczorek
cc575a7a89 Use in wxPG classes wxMilliClock_t variables to store values returned by wxGetLocalTimeMillis() function.
wxMilliClock_t is always mapped to the proper base type and hence can be used even if wxLongLong type is not defined (when wxUSE_LONGLONG is disabled).
2015-04-03 21:11:15 +02:00
Artur Wieczorek
cafff4405a Use constant variables to store cached constants in wxPGGlobalVarsClass.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-22 17:32:48 +00:00
Artur Wieczorek
1bac5cfbe0 Refactor property attribute names in wxPGProperty::GetAttribute calls.
Use attribute constants instead of strings in wxPGProperty and wxPGDefaultRenderer classes and in NumericValidation() function.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-21 17:06:16 +00:00
Artur Wieczorek
6ba0f3016b Use wxBufferedPaintDC to implement double buffering in wxPG.
This also fixes drawing the PG when buffer is not available and there is necessary do draw directly on window DC.
wxPropertyGrid::DrawItems method is simplified and wxPropertyGrid::DoDrawItems method is reimplemented since its 3-rd argument (isBuffered) is unneeded anymore.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-12 22:36:28 +00:00
Artur Wieczorek
ffbee3a059 Remove unused wxPG member variable.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-24 16:11:19 +00:00
Artur Wieczorek
161e8dcff2 Use Boolean variable to store Boolean values in wxPG.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-24 16:09:46 +00:00
Artur Wieczorek
1fd049988d Use a hash set instead of vector to hold dedicated keys in wxPG.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-24 16:04:53 +00:00
Artur Wieczorek
b2588d907e Remove unused wxPG member variable.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-08 18:17:24 +00:00
Artur Wieczorek
c234f5078f Fix deleting editor controls associated with wxPG properties from within event handler.
Editor controls (and their event handlers) deleted from within wxPG event handler shouldn't by deleted in global idle event handler but only in local wxPG event handler because global idle events can be generated also by calling e.g. wxYield when wxPG is not in the real idle state.

Closes #16617

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-16 22:49:01 +00:00
Artur Wieczorek
89364e95b9 In wxPropertyGridPageState use Boolean member variables to store Boolean values.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-25 17:29:50 +00:00
Artur Wieczorek
63a9cc4c2e Use automatically generated ID values for wxPG sub-controls.
Currently in wxPG there are used fixed "magic" ID values to identify sub-controls and this can lead to side effects if these values overlap with ID values assigned to another controls in the application (like e.g. menu items).

Closes #13634.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-09 18:56:36 +00:00
Paul Cornett
8b4ae731d3 use wxOVERRIDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 00:02:23 +00:00
Vadim Zeitlin
d2f125aa35 Pass non-primitive types by const reference instead of value.
No real changes, just avoid the unnecessary copying and also make the
signatures more consistent by adding the apparently forgotten "&" in a couple
of places.

See #15893.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:45:08 +00:00
Vadim Zeitlin
fb730c32b4 Override Do{Freeze,Thaw}() instead of {Freeze,Thaw}() in wxPropGrid code.
{Freeze,Thaw}() themselves are not virtual any more, so overriding them
doesn't really work and it is unnecessary to reimplement the reference
counting already done by the base class anyhow, so override the DoXXX()
versions instead.

Closes #15877.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-17 18:56:13 +00:00
Vadim Zeitlin
353f1c5491 Deprecate wxPropertyGrid::DoubleToString().
Simply use wxNumberFormatter instead, this reduces code duplication and avoids
bugs due to formatting inconsistencies in DoubleToString().

Closes #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 21:10:58 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
ce7fe42e84 Provide shorter synonyms for wxEVT_XXX constants.
Use the same short names as are used by the event table macros for the event
type constants themselves. This makes them much more comfortable to use, e.g.
Bind(wxEVT_BUTTON) compared to Bind(wxEVT_COMMAND_BUTTON_CLICKED).

The old long names are still kept for backwards compatibility and shouldn't be
removed as it doesn't really cost anything to continue providing them, but all
new event types should only use the short versions.

Closes #10661.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-25 10:11:03 +00:00
Jaakko Salli
35f8ae6572 Removed wxPG_DOUBLE_BUFFER constant. Now all wxPG rendering is done double-buffered, regardless of the platform. Code path with wxPG_DOUBLE_BUFFER = 0 did not render correctly (fixes #13140). In future should probably use wxAutoBufferedPaintDC or something similar, but this will require non-trivial code changes and testing.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-15 09:23:23 +00:00
Dimitri Schoolwerth
4c51a665c6 Fixed various typos.
Applied patch by snowleopard2 fixing a bunch of typos such as misspellings and double words in the documentation. Combined the patch with some local queued typos waiting to be committed as well as adding new typo fixes inspired by the patch.

Function names with American spelling were not changed nor was third-party code touched. The only code changes involve some changes in strings that are translated ("Can not" -> "Cannot").

Closes #13063 (again).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 14:17:38 +00:00
Jaakko Salli
52a368fed1 To prevent wxPropertyGrid from stealing frocus from other controls, only let SetFocusOnCanvas() move focus to the main grid 'canvas' if focus was already in on the grid's child controls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-07 13:02:33 +00:00
Jaakko Salli
95fbeee5ac Bring AddActionTrigger() doc string up to date with the interface
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-22 17:43:49 +00:00
Jaakko Salli
abbd88b52b Added wxPG_ACTION_EDIT, which allows specifying custom key to move focus to the property editor. Also documented wxPG_ACTION_FOOs better.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-22 17:25:45 +00:00
Jaakko Salli
bac635ede2 Have wxPropertyGrid::DoubleToString() to also take comma into account as a decimal separator. In addition, the function now returns target wxString (makes writing tests easier).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66367 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-13 16:07:49 +00:00
Jaakko Salli
b296009869 Have wxPropertyGridEditorEventForwarder::ProcessEvent() return true more often - that is when the event was recognized as being 'handled', and specifically for the case of property editor's button being pressed (fixes #12487).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-22 14:28:16 +00:00
Vadim Zeitlin
ce00f59b5b No changes whatsoever, just remove trailing whitespace.
There are no real changes in this commit but it removes all trailing white
space from our source files. This avoids problems when applying patches and
making diffs and it would be nice to prevent it from reappearing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 11:44:45 +00:00
Jaakko Salli
248a4ec0f2 Fixed PCH-less build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-24 15:22:52 +00:00
Jaakko Salli
2e2e62def1 Have wxPropertyGrid inherit from wxControl and wxScrollHelper instead of wxScrolledWindow. This is the approach other scrolled controls use.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-24 14:47:20 +00:00