#include "wx/notebook.h"
#include "wx/spinbutt.h"
#include "wx/artprov.h"
-#ifdef wxUSE_TOGGLEBTN
#include "wx/tglbtn.h"
-#endif // wxUSE_TOGGLEBTN
#include "wx/univ/scrtimer.h"
#include "wx/univ/stdrend.h"
col = Get(CONTROL);
else
{
- if ( !col.Ok() )
+ if ( !col.IsOk() )
{
// doesn't depend on the state
col = Get(WINDOW);
}
#endif // wxUSE_TEXTCTRL
- if (!col.Ok())
+ if (!col.IsOk())
col = Get(CONTROL); // Most controls should be this colour, not WINDOW
}
else
// the colour set by the user should be used for the normal state
// and for the states for which we don't have any specific colours
- if ( !col.Ok() || (flags & wxCONTROL_PRESSED) != 0 )
+ if ( !col.IsOk() || (flags & wxCONTROL_PRESSED) != 0 )
{
#if wxUSE_SCROLLBAR
if ( wxDynamicCast(win, wxScrollBar) )
int flags)
{
wxBitmap bmp;
- if ( bitmap.Ok() )
+ if ( bitmap.IsOk() )
{
bmp = bitmap;
}
? IndicatorStatus_Checked
: IndicatorStatus_Unchecked;
- if ( !m_bmpCheckBitmaps[i].Ok() )
+ if ( !m_bmpCheckBitmaps[i].IsOk() )
{
m_bmpCheckBitmaps[i] = wxBitmap(ms_xpmChecked[i]);
}
GetIndicatorsFromFlags(flags, indState, indStatus);
wxBitmap& bmp = m_bmpIndicators[indType][indState][indStatus];
- if ( !bmp.Ok() )
+ if ( !bmp.IsOk() )
{
const char **xpm = ms_xpmIndicators[indType][indState][indStatus];
if ( xpm )
}
rectInt.Deflate(2);
-#if !defined(__WXMGL__)
static const char *stipple_xpm[] = {
/* columns rows colors chars-per-pixel */
"2 2 2 1",
"w ",
" w",
};
-#else
- // VS: MGL can only do 8x8 stipple brushes
- static const char *stipple_xpm[] = {
- /* columns rows colors chars-per-pixel */
- "8 8 2 1",
- " c None",
- "w c white",
- /* pixels */
- "w w w w ",
- " w w w w",
- "w w w w ",
- " w w w w",
- "w w w w ",
- " w w w w",
- "w w w w ",
- " w w w w",
- };
-#endif
dc.SetBrush(wxBrush(stipple_xpm));
dc.SetTextForeground(wxSCHEME_COLOUR(m_scheme, SHADOW_HIGHLIGHT));
// draw the bitmap: use the bitmap provided or the standard checkmark for
// the checkable items
wxBitmap bmp = bitmap;
- if ( !bmp.Ok() && (flags & wxCONTROL_CHECKED) )
+ if ( !bmp.IsOk() && (flags & wxCONTROL_CHECKED) )
{
bmp = GetIndicator(IndicatorType_Menu, flags);
}
- if ( bmp.Ok() )
+ if ( bmp.IsOk() )
{
rect.SetRight(geometryInfo.GetLabelOffset());
wxControlRenderer::DrawBitmap(dc, bmp, rect);
}
const wxBitmap& bmp = item->GetBitmap();
- if ( bmp.Ok() )
+ if ( bmp.IsOk() )
{
wxCoord widthBmp = bmp.GetWidth();
if ( widthBmp > widthBmpMax )
#if wxUSE_SCROLLBAR
if ( wxDynamicCast(window, wxScrollBar) )
{
- // we only set the width of vert scrollbars and height of the
- // horizontal ones
- if ( window->GetWindowStyle() & wxSB_HORIZONTAL )
- size->y = m_sizeScrollbarArrow.y;
- else
- size->x = m_sizeScrollbarArrow.x;
-
- // skip border width adjustments, they don't make sense for us
+ /*
+ Don't adjust the size for a scrollbar as its DoGetBestClientSize
+ already has the correct size set. Any size changes here would get
+ added to the best size, making the scrollbar larger.
+ Also skip border width adjustments, they don't make sense for us.
+ */
return;
}
#endif // wxUSE_SCROLLBAR
wxBitmap wxWin32Renderer::GetFrameButtonBitmap(FrameButtonType type)
{
wxBitmap& bmp = m_bmpFrameButtons[type];
- if ( !bmp.Ok() )
+ if ( !bmp.IsOk() )
{
bmp = wxBitmap(ms_xpmFrameButtons[type]);
}
if ( window->GetWindowStyle() & wxMAXIMIZE_BOX )
menu.Append(wxID_MAXIMIZE_FRAME , _("Ma&ximize"));
menu.AppendSeparator();
- menu.Append(wxID_CLOSE_FRAME, _("Close\tAlt-F4"));
+ menu.Append(wxID_CLOSE_FRAME, _("&Close") + wxT("\t") + _("Alt+") + wxT("F4"));
if ( window->GetWindowStyle() & wxMAXIMIZE_BOX )
{