20 inline static void DrawTextCenter(wxDC &dc, wxCoord x, wxCoord y, wxString text)
22 wxSize textExtent = dc.GetTextExtent(text);
24 x -= textExtent.x / 2;
25 y -= textExtent.y / 2;
27 dc.DrawText(text, x, y);
36 inline static void DrawTextCenter(wxDC &dc, wxRect &rc, wxString text)
38 wxSize textExtent = dc.GetTextExtent(text);
40 wxCoord x = rc.x + (rc.GetWidth() - textExtent.x) / 2;
41 wxCoord y = rc.y + (rc.GetHeight() - textExtent.y) / 2;
43 dc.DrawText(text, x, y);
52 inline static void CheckFixRect(wxRect &rc)
72 inline static void Margins(wxRect &rc, wxCoord left, wxCoord top, wxCoord right, wxCoord bottom)
74 if ((left + right) > rc.width) {
80 rc.width -= (left + right);
83 if ((top + bottom) > rc.height) {
89 rc.height -= (top + bottom);
103 inline static void SetupRect(wxRect &rc, wxCoord x0, wxCoord y0, wxCoord x1, wxCoord y1)