button.button_id = wxAUI_BUTTON_MAXIMIZE_RESTORE;
pinfo.buttons.Add(button);
}
-
+
+ if (pinfo.HasPinButton())
+ {
+ wxAuiPaneButton button;
+ button.button_id = wxAUI_BUTTON_PIN;
+ pinfo.buttons.Add(button);
+ }
+
if (pinfo.HasCloseButton())
{
wxAuiPaneButton button;
part.sizer_item = sizer_item;
uiparts.Add(part);
}
+
+ // if we have buttons, add a little space to the right
+ // of them to ease visual crowding
+ if (button_count >= 1)
+ {
+ caption_sizer->Add(3,1);
+ }
// add the caption sizer
sizer_item = vert_pane_sizer->Add(caption_sizer, 0, wxEXPAND);
void wxAuiManager::UpdateButtonOnScreen(wxAuiDockUIPart* button_ui_part,
- const wxMouseEvent& event)
+ const wxMouseEvent& event)
{
wxAuiDockUIPart* hit_test = HitTest(event.GetX(), event.GetY());
-
+ if (!hit_test || !button_ui_part)
+ return;
+
int state = wxAUI_BUTTON_STATE_NORMAL;
if (hit_test == button_ui_part)