#pragma hdrstop
#endif
-#include "wx/dcmemory.h"
-#include "wx/ribbon/art.h"
-
#if wxUSE_RIBBON
+#include "wx/ribbon/art.h"
#include "wx/ribbon/art_internal.h"
#include "wx/ribbon/bar.h"
#include "wx/ribbon/buttonbar.h"
#include "wx/ribbon/toolbar.h"
#ifndef WX_PRECOMP
+#include "wx/dcmemory.h"
#endif
#ifdef __WXMSW__
wxPoint offset(wnd->GetPosition());
wxRibbonPage* page = NULL;
wxWindow* parent = wnd->GetParent();
- wxRibbonPanel* panel = NULL;
+ wxRibbonPanel* panel = wxDynamicCast(wnd, wxRibbonPanel);
bool hovered = false;
- panel = wxDynamicCast(wnd, wxRibbonPanel);
if(panel != NULL)
{
hovered = allow_hovered && panel->IsHovered();
else
*client_offset = wxPoint(3, 2);
}
+ if (size.x < 0) size.x = 0;
+ if (size.y < 0) size.y = 0;
return size;
}
wxCoord label_height;
wxCoord best_width;
dc.GetTextExtent(label, &best_width, &label_height);
- int best_num_lines = 1;
int last_line_extra_width = 0;
if(kind != wxRIBBON_BUTTON_NORMAL)
{
last_line_extra_width += 8;
- best_num_lines = 2; // label on top line, button below
}
size_t i;
for(i = 0; i < label.Len(); ++i)
if(width < best_width)
{
best_width = width;
- best_num_lines = 2;
}
}
}