Detecting the active wxAUI pane

Поиск
Список
Период
Сортировка
От Dave Page
Тема Detecting the active wxAUI pane
Дата
Msg-id 937d27e10902250449w227c95a1k6ee9828941624b5a@mail.gmail.com
обсуждение исходный текст
Список pgadmin-hackers
I've been looking at how we can detect which AUI pane is active, and
unfortunately, it doesn't seem like there is a clean way.

Ideally, wxAUI would provide a event that is fired whenever it's
SetActivePane() function is called, so we can simply note in an event
handler which pane it is. But there is no such event.

The only way I can currently see to do this is as follows:

- Setup a timer to fire a few times per second (I wonder if we can
catch a wxPaintEvent instead - not sure how that would work with an
undocked pane though).

- Call wxAuiManager::GetAllPanes to get an array of wxAuiPaneInfo's

- For each pane in the array, check
HasFlag(wxAuiPaneInfo::optionActive) to see if that pane is active.

- Adjust the toolbar accordingly for the active pane.

This is a truly horrible kludge, but so far the best option I have I'm afraid.

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: Server Status window work
Следующее
От: Dave Page
Дата:
Сообщение: Re: Server Status window work