#19195: wxAuiManager::UpdatePane implementation

61 views
Skip to first unread message

wxTrac

unread,
Jun 5, 2021, 7:42:40 AM6/5/21
to wx-...@googlegroups.com
#19195: wxAuiManager::UpdatePane implementation
-----------------------------+--------------------
Reporter: gvcallen | Owner:
Type: optimization | Status: new
Priority: normal | Milestone:
Component: wxAui | Version: 3.1.5
Keywords: manager, update | Blocked By:
Blocking: | Patch: 0
-----------------------------+--------------------
We have found on numerous applications that we simply need to change e.g.
the caption of a specific pane, however calling wxAuiManager::Update()
ultimately redraws the entire pane configuration, thereafter redrawing all
other panes, which is a potentially time-consuming process (e.g. with a
wxTreeCtrl we have).

I would like to request for a function that updates a specific pane's
basic characteristics i.e. wxAuiManager::UpdatePane(wxAuiPaneInfo& pane).
Of course, this function would not be able to update the pane size, as
that would affect other panes too, but properties such as whether it is
floatable, has a gripper and its caption etc. could easily be changed
"locally".

I have looked the code for update and tried implementing this function
myself but am not sure where to start. I would be more than happy to
help/give it a go again but I would need a guideline as I am not 100%
comfortable with the inner-workings of the painting and drawing methods
for the manager.

Could this be implemented? Would it be possible? Is it a trivial
implementation or would it be rather detailed?

Thanks a lot,
Gary

--
Ticket URL: <https://trac.wxwidgets.org/ticket/19195>

wxTrac

unread,
Jun 10, 2021, 6:21:51 PM6/10/21
to wx-...@googlegroups.com
#19195: wxAuiManager::UpdatePane implementation
---------------------------+-----------------------------
Reporter: gvcallen | Owner:
Type: optimization | Status: new
Priority: normal | Milestone:
Component: wxAui | Version: 3.1.5
Resolution: | Keywords: manager, update
Blocked By: | Blocking:
Patch: 0 |
---------------------------+-----------------------------

Comment (by vadz):

I think it would be unsafe to have `UpdatePane()` which work only for some
updates (title, icon, ...), but not others (size, position, ...). If just
the caption needs to be updated, it would seem to be better to add a
function for doing just this.

--
Ticket URL: <https://trac.wxwidgets.org/ticket/19195#comment:1>

wxTrac

unread,
Jun 13, 2021, 9:48:45 AM6/13/21
to wx-...@googlegroups.com
#19195: wxAuiManager::UpdatePane implementation
---------------------------+-----------------------------
Reporter: gvcallen | Owner:
Type: optimization | Status: new
Priority: normal | Milestone:
Component: wxAui | Version: 3.1.5
Resolution: | Keywords: manager, update
Blocked By: | Blocking:
Patch: 0 |
---------------------------+-----------------------------
Changes (by gvcallen):

* cc: gvcallen@… (added)


Comment:

I agree. How might one go about re-drawing the caption only?

Thanks

--
Ticket URL: <https://trac.wxwidgets.org/ticket/19195#comment:2>

wxTrac

unread,
Jun 13, 2021, 11:10:40 AM6/13/21
to wx-...@googlegroups.com
#19195: wxAuiManager::UpdatePane implementation
---------------------------+-----------------------------
Reporter: gvcallen | Owner:
Type: optimization | Status: new
Priority: normal | Milestone:
Component: wxAui | Version: 3.1.5
Resolution: | Keywords: manager, update
Blocked By: | Blocking:
Patch: 0 |
---------------------------+-----------------------------

Comment (by vadz):

Do you mean at the implementation or at the API level? Implementing it
should be simple, just call `SetTitle()`, but I'm not sure about the API.
`UpdateTitle()` maybe?

--
Ticket URL: <https://trac.wxwidgets.org/ticket/19195#comment:3>

wxTrac

unread,
Jun 14, 2021, 5:11:10 AM6/14/21
to wx-...@googlegroups.com
#19195: wxAuiManager::UpdatePane implementation
---------------------------+-----------------------------
Reporter: gvcallen | Owner:
Type: optimization | Status: new
Priority: normal | Milestone:
Component: wxAui | Version: 3.1.5
Resolution: | Keywords: manager, update
Blocked By: | Blocking:
Patch: 0 |
---------------------------+-----------------------------
Changes (by gvcallen):

* cc: gvcallen@… (removed)


Comment:

At the implementation level. What class is SetTitle() a member of?

--
Ticket URL: <https://trac.wxwidgets.org/ticket/19195#comment:4>

wxTrac

unread,
Jun 14, 2021, 11:30:45 AM6/14/21
to wx-...@googlegroups.com
#19195: wxAuiManager::UpdatePane implementation
---------------------------+-----------------------------
Reporter: gvcallen | Owner:
Type: optimization | Status: new
Priority: normal | Milestone:
Component: wxAui | Version: 3.1.5
Resolution: | Keywords: manager, update
Blocked By: | Blocking:
Patch: 0 |
---------------------------+-----------------------------

Comment (by vadz):

Replying to [comment:4 gvcallen]:
> At the implementation level. What class is SetTitle() a member of?

It's in `wxAuiFloatingFrame` which is, or derives from, `wxFrame`.

--
Ticket URL: <https://trac.wxwidgets.org/ticket/19195#comment:5>

wxTrac

unread,
Jul 27, 2021, 3:10:33 AM7/27/21
to wx-...@googlegroups.com
#19195: wxAuiManager::UpdatePane implementation
---------------------------+-----------------------------
Reporter: gvcallen | Owner:
Type: optimization | Status: new
Priority: normal | Milestone:
Component: wxAui | Version: 3.1.5
Resolution: | Keywords: manager, update
Blocked By: | Blocking:
Patch: 0 |
---------------------------+-----------------------------
Changes (by gvcallen):

* cc: gvcallen@… (added)


Comment:

This works for when the frame is floating, but how would one update the
caption only for when the pane is docked? As the manager only seems to
draw the caption on update.

--
Ticket URL: <https://trac.wxwidgets.org/ticket/19195#comment:6>

wxTrac

unread,
Aug 6, 2021, 4:29:28 AM8/6/21
to wx-...@googlegroups.com
#19195: wxAuiManager::UpdatePane implementation
---------------------------+-----------------------------
Reporter: gvcallen | Owner:
Type: optimization | Status: new
Priority: normal | Milestone:
Component: wxAui | Version: 3.1.5
Resolution: | Keywords: manager, update
Blocked By: | Blocking:
Patch: 0 |
---------------------------+-----------------------------
Changes (by gvcallen):

* cc: gvcallen@… (removed)


Comment:

Replying to [comment:5 vadz]:
> Replying to [comment:4 gvcallen]:
> > At the implementation level. What class is SetTitle() a member of?
>
> It's in `wxAuiFloatingFrame` which is, or derives from, `wxFrame`.

Is there a relevant function that would just redraw the caption when the
window docked I.e. not a floating frame?

--
Ticket URL: <https://trac.wxwidgets.org/ticket/19195#comment:7>

wxTrac

unread,
Aug 6, 2021, 9:06:28 AM8/6/21
to wx-...@googlegroups.com
#19195: wxAuiManager::UpdatePane implementation
---------------------------+-----------------------------
Reporter: gvcallen | Owner:
Type: optimization | Status: new
Priority: normal | Milestone:
Component: wxAui | Version: 3.1.5
Resolution: | Keywords: manager, update
Blocked By: | Blocking:
Patch: 0 |
---------------------------+-----------------------------

Comment (by vadz):

Sorry, I don't know. From a quick look at wxAUI code there doesn't seem to
be any way to do it other than calling `Refresh()`. It would still be more
efficient than `Update()` as at least it would only repaint the frames,
without also redoing the layout, but it's definitely sitll not optimal, of
course.

--
Ticket URL: <https://trac.wxwidgets.org/ticket/19195#comment:8>
Reply all
Reply to author
Forward
0 new messages