Artur Wieczorek
f39e70be15
Use dedicated event type to notify header about column width changes
...
Notification about changes of column widths needs to be sent locally from wxPropertyGrid to wxPropertyGridManager (to update the header) so it would be good to use a dedicated non-public event type for these purposes.
2019-04-28 15:31:10 +02:00
Paul Cornett
90ce6a4334
Remove unused variables
2019-04-04 10:40:45 -07:00
Artur Wieczorek
47bba8764a
Fix drawing invalid wxPGProperty
...
Invalid wxPGProperty needs to be redrawn after setting wxPG_FL_CELL_OVERRIDES_SEL because this flag
is used to select proper colors to mark property as invalid.
This order of operations is important under e.g. wxMSW when redrawing with DrawItemAndChildren() is done immediately.
Closes #18351 .
2019-03-09 18:57:11 +01:00
Paul Cornett
9ea2ac92ef
Fix wxCriticalSectionLocker usage
...
A temporary object will not hold the lock
2019-02-17 17:24:36 -08:00
Artur Wieczorek
a005391413
Use wxEventType instead of int
...
This parameter identifies the type of the event so it should be of type wxEventType.
2019-01-11 19:22:50 +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
b235987a69
Use dedicated functions to covert between physical and logical coordinates of the scrolled wxPropertyGrid
2019-01-04 21:32:08 +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
066c422c81
Take into account scrolling while obtaining absolute mouse pointer position
...
See #18313 .
2019-01-04 21:30:32 +01:00
Artur Wieczorek
4eef8d9658
Use row height value stored already in another variable
...
No reason to calculate it twice.
2018-12-28 14:02:03 +01:00
Artur Wieczorek
99c53ca4bb
Don't retrieve unused x-coordinate of the view
2018-12-28 14:02:03 +01:00
Artur Wieczorek
76ff4ab2b6
Use dedicated method to move rectangle
2018-12-28 14:02:02 +01:00
Artur Wieczorek
18e03af068
Use conditional operator instead of conditional statement
2018-12-28 14:02:01 +01:00
Artur Wieczorek
9d2fbef751
Only render columns that are within update region
2018-12-28 14:02:01 +01:00
Artur Wieczorek
95461c566d
Fix repositioning editors for horizontally scrolled grid
...
Closes #18313 .
2018-12-28 14:01:34 +01:00
Artur Wieczorek
831a81fb90
Fix positioning property editor
...
Account scrolled horizontal position.
See #18313 .
2018-12-27 14:22:18 +01:00
Artur Wieczorek
de6469610a
Fix determining width of the entire row
...
See #18313 .
2018-12-27 14:20:13 +01:00
Artur Wieczorek
9ad19622fd
Fix drawing horizontal lines between the rows of the grid
...
See #18313 .
2018-12-27 14:18:04 +01:00
Artur Wieczorek
2f918abf3a
Clear empty space beyond the right edge of the grid
...
See #18313 .
2018-12-27 14:15:44 +01:00
Artur Wieczorek
48c71a5f04
Fix calculating width of the first cell
...
See #18313 .
2018-12-27 14:14:19 +01:00
Artur Wieczorek
73b5d3420e
Fix determining shift of the drawn scrolled contents
...
Position of the visible portion of the window should be taken as a drawing offset.
See #18313 .
2018-12-27 14:12:32 +01:00
Artur Wieczorek
cc32ebc979
Adjust scroll bar and refresh the grid after changing virtual width
2018-12-27 13:18:06 +01:00
Artur Wieczorek
311e5e8414
Use conditional operator instead of conditional statement
2018-12-26 11:38:52 +01:00
Artur Wieczorek
a57aacd5af
Calculate splitter positions once
...
Column widths are the same for all rows so there is no need to calculate splitters positions for each drawn row.
2018-12-26 11:38:10 +01:00
Artur Wieczorek
c112c20d5f
Optimize calculating position of the right edge of the last cell
...
Cell widths are invariant during the drawing so calculation can be done once, not on every loop.
2018-12-26 11:37:31 +01:00
Artur Wieczorek
5c0acce694
Hide editor button while column splitter is being dragged
...
Main editor and its button (secondary editor) should be both hidden while dragging the splitter because it's misleading when one part of the property editor disappears and another part remains visible.
2018-12-26 11:36:12 +01:00
Artur Wieczorek
e74e345e04
Use dedicated function to check if array of selected properties is empty
2018-12-26 11:32:09 +01:00
Artur Wieczorek
d85a03b561
Don't make unnecessary calls to the member function
...
Use already obtained reference to the list of selected properties instead of retrieving the list by calling GetSelectedProperties() function.
2018-12-26 11:31:21 +01:00
Artur Wieczorek
6c36554ae1
Get rid of unnecessary variable in wxPropertyGrid
2018-12-26 11:30:29 +01:00
Artur Wieczorek
e9b45f19f9
Fix index of dragged splitter sent with EVT_PG_COL_DRAGGING
...
Re-centering the splitter with mouse double-click works only if we have two columns so only splitter 0 can be clicked.
2018-12-26 11:29:40 +01:00
Artur Wieczorek
1042521706
Refresh wxPropertGrid after resetting column sizes
...
Grid needs to be redrawn with new splitters positions.
Closes #18312 .
2018-12-26 11:28:17 +01:00
Maarten Bent
39ff5b90e5
Replace wxDeprecatedGUIConstants enum values
2018-11-25 21:29:32 +01:00
Maarten Bent
86c49283f5
Remove trailing spaces
2018-11-25 20:22:25 +01:00
Artur Wieczorek
4e2d26b22e
Keep wxPGProperty editor focused while refreshing the property
...
Active property's editor should remain focused after refreshing the property.
2018-11-11 11:21:52 +01:00
Artur Wieczorek
c86f795914
Move shared wxVector utilities to one place
2018-11-10 22:27:57 +01:00
Artur Wieczorek
e2115d0d6f
Remove unneeded calls to c_str()
2018-11-10 20:44:54 +01:00
Artur Wieczorek
63c602c3d2
Explicitly declare iterators in the function templates
2018-11-02 12:10:22 +01:00
Artur Wieczorek
161bb592ce
Use wxVector<int> instead of wxArrayInt
2018-11-01 18:22:22 +01:00
Artur Wieczorek
e7357eafa2
Declare array explicitly as a wxVector instead of using wxArrayPGProperty alias
2018-11-01 18:19:56 +01:00
Artur Wieczorek
5fbe3cab76
Don't reset wxPGProperty editor if focus is switched between its components
...
As long as focus is being switched only between subcontrols of the active editor the state of the edited wxPGProperty remains unchanged and there is no need to explicitly reset the editor.
Unwanted editor resets could happen if such internal focus changes would be captured in EVT_IDLE handler.
Closes #18162 .
2018-11-01 18:11:58 +01:00
Artur Wieczorek
7c0eac050e
Use dedicated function to obtain highest level parent of the just changed property
2018-10-13 23:33:26 +02:00
Artur Wieczorek
09ff7edfbe
Redraw only wxPGProperties within update region
...
Currently all properties within client area are processed for drawing whether they lie inside the update region or not. Processing for drawing is an expensive operation so doing this only for properties being actually repainted should improve performance.
2018-10-13 23:33:23 +02:00
Artur Wieczorek
b894ea1ce3
Use dedicated function to check wxPGProperty flag
2018-10-13 23:33:23 +02:00
Artur Wieczorek
fe924be261
Use dedicated function to check if property is a wxRootProperty
2018-10-13 23:33:22 +02:00
Artur Wieczorek
12a755acf8
Declare array explicitly as a wxVector instead of using wxArrayPGProperty alias
2018-10-13 23:33:19 +02:00
Artur Wieczorek
858b5e7222
Prevent losing the focus by active editor when error dialog box is closed
...
Displaying error dialog can cause on some platforms native focus changes
what triggers unwanted focus change events in wxPG and disturbs expected
sequence of events. To prevent this from happening (regardless of platform),
we need to save focused window before dialog box is displayed and restore
it after closing the dialog.
Closes #18046 .
2018-07-06 22:56:55 +02:00
Stefan Csomor
dcd012184a
Dark Mode for wxPropertyGrid
...
see #18146 , thanks to dkulp
2018-06-19 21:49:15 +02:00
Vadim Zeitlin
d4f380e16e
Use Bind() instead of Connect() in wxWidgets code
...
Use more modern function which allows to avoid wxXXXEventHandler()
macros use.
No real changes.
2018-05-30 13:06:20 +02:00
Frédéric Bron
f4b56f67ec
Improve documentation of wxPropertyGrid::MakeColumnEditable()
...
Explain that column must be different from 1 in the documentation and in
the (already existing) assert checking it.
Closes https://github.com/wxWidgets/wxWidgets/pull/656
2017-12-29 20:06:04 +01:00
Artur Wieczorek
aaf1d505c6
Rely on native double buffering by default in wxPropertyGrid
...
If the platform has native double-buffering, instruct wxPropertyGrid
to rely on it by default.
Closes #16978 .
2017-10-17 21:13:45 +02:00