info.hovered = false;
// info.rect not set (intentional)
- wxMemoryDC dcTemp;
+ wxClientDC dcTemp(this);
wxString label = wxEmptyString;
if(m_flags & wxRIBBON_BAR_SHOW_PAGE_LABELS)
label = page->GetLabel();
{
bool status = true;
- wxMemoryDC dcTemp;
+ wxClientDC dcTemp(this);
int sep = m_art->GetMetric(wxRIBBON_ART_TAB_SEPARATION_SIZE);
size_t numtabs = m_pages.GetCount();
size_t i;
m_tab_scroll_buttons_shown = true;
}
{
- wxMemoryDC temp_dc;
+ wxClientDC temp_dc(this);
m_tab_scroll_left_button_rect.SetWidth(m_art->GetScrollButtonMinimumSize(temp_dc, this, wxRIBBON_SCROLL_BTN_LEFT | wxRIBBON_SCROLL_BTN_NORMAL | wxRIBBON_SCROLL_BTN_FOR_TABS).GetWidth());
m_tab_scroll_left_button_rect.SetHeight(m_tab_height);
m_tab_scroll_left_button_rect.SetX(m_tab_margin_left);
if(show_right != (m_tab_scroll_right_button_rect.GetWidth() != 0) ||
show_left != (m_tab_scroll_left_button_rect.GetWidth() != 0))
{
- wxMemoryDC temp_dc;
+ wxClientDC temp_dc(this);
if(show_left)
{
m_tab_scroll_left_button_rect.SetWidth(m_art->GetScrollButtonMinimumSize(temp_dc, this, wxRIBBON_SCROLL_BTN_LEFT | wxRIBBON_SCROLL_BTN_NORMAL | wxRIBBON_SCROLL_BTN_FOR_TABS).GetWidth());
base->client_data = client_data;
base->state = 0;
- wxMemoryDC temp_dc;
+ wxClientDC temp_dc(this);
FetchButtonSizeInfo(base, wxRIBBON_BUTTONBAR_BUTTON_SMALL, temp_dc);
FetchButtonSizeInfo(base, wxRIBBON_BUTTONBAR_BUTTON_MEDIUM, temp_dc);
FetchButtonSizeInfo(base, wxRIBBON_BUTTONBAR_BUTTON_LARGE, temp_dc);
wxRibbonControl::SetArtProvider(art);
- wxMemoryDC temp_dc;
+ wxClientDC temp_dc(this);
size_t btn_count = m_buttons.Count();
size_t btn_i;
for(btn_i = 0; btn_i < btn_count; ++btn_i)
wxRibbonControl* ribbon_child = wxDynamicCast(child, wxRibbonControl);
if(m_art != NULL && ribbon_child != NULL)
{
- wxMemoryDC dc;
+ wxClientDC dc((wxRibbonPanel*) this);
wxSize child_relative = m_art->GetPanelClientSize(dc, this, relative_to, NULL);
wxSize smaller = ribbon_child->GetNextSmallerSize(direction, child_relative);
if(smaller == child_relative)
wxRibbonControl* ribbon_child = wxDynamicCast(child, wxRibbonControl);
if(ribbon_child != NULL)
{
- wxMemoryDC dc;
+ wxClientDC dc((wxRibbonPanel*) this);
wxSize child_relative = m_art->GetPanelClientSize(dc, this, relative_to, NULL);
wxSize larger = ribbon_child->GetNextLargerSize(direction, child_relative);
if(larger == child_relative)
}
else
{
- wxMemoryDC dc;
+ wxClientDC dc((wxRibbonPanel*) this);
return m_art->GetPanelSize(dc, this, larger, NULL);
}
}
if(GetChildren().GetCount() == 1)
{
wxWindow* child = GetChildren().Item(0)->GetData();
- wxMemoryDC dc;
+ wxClientDC dc((wxRibbonPanel*) this);
return m_art->GetPanelSize(dc, this, child->GetMinSize(), NULL);
}
if(GetChildren().GetCount() == 1)
{
wxWindow* child = GetChildren().Item(0)->GetData();
- wxMemoryDC dc;
+ wxClientDC dc((wxRibbonPanel*) this);
return m_art->GetPanelSize(dc, this, child->GetBestSize(), NULL);
}
if(m_art != NULL)
{
- wxMemoryDC temp_dc;
+ wxClientDC temp_dc(this);
m_smallest_unminimised_size =
m_art->GetPanelSize(temp_dc, this, minimum_children_size, NULL);
{
wxWindow* child = GetChildren().Item(0)->GetData();
wxPoint position;
- wxMemoryDC dc;
+ wxClientDC dc(this);
wxSize size = m_art->GetPanelClientSize(dc, this, GetSize(), &position);
child->SetSize(position.x, position.y, size.GetWidth(), size.GetHeight());
}