wxFindReplaceDialogImpl *GetImpl() const { return m_impl; }
// override some base class virtuals
- virtual bool Show(bool show = TRUE);
+ virtual bool Show(bool show = true);
virtual void SetTitle( const wxString& title);
virtual wxString GetTitle() const;
// Enumerate the fonts.
bool Enumerate();
- // Stop enumeration if FALSE is returned.
+ // Stop enumeration if false is returned.
// By default, the enumerator stores the facenames in a list for
// retrieval via GetFacenames().
virtual bool OnFont(const wxFont& font);
// Toolbar
#if wxUSE_TOOLBAR
virtual wxToolBar* CreateToolBar(long style = -1,
- wxWindowID id = -1,
+ wxWindowID id = wxID_ANY,
const wxString& name = wxToolBarNameStr);
virtual void PositionToolBar();
virtual void SendSizeEvent();
virtual wxPoint GetClientAreaOrigin() const;
-
+
protected:
// common part of all ctors
void Init();
// handle WM_INITMENUPOPUP message
bool HandleInitMenuPopup(WXHMENU hMenu);
- virtual bool IsMDIChild() const { return FALSE; }
+ virtual bool IsMDIChild() const { return false; }
// get default (wxWidgets) icon for the frame
virtual WXHICON GetDefaultIcon() const;
bool wxEnhMetaFile::Play(wxDC *dc, wxRect *rectBound)
{
- wxCHECK_MSG( Ok(), FALSE, _T("can't play invalid enhanced metafile") );
+ wxCHECK_MSG( Ok(), false, _T("can't play invalid enhanced metafile") );
wxCHECK_MSG( dc, FALSE, _T("invalid wxDC in wxEnhMetaFile::Play") );
RECT rect;
{
wxLogLastError(_T("PlayEnhMetaFile"));
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
wxSize wxEnhMetaFile::GetSize() const
return wxTheClipboard->AddData(new wxEnhMetaFileDataObject(*this));
#else // !wxUSE_DRAG_AND_DROP
wxFAIL_MSG(_T("not implemented"));
- return FALSE;
+ return false;
#endif // wxUSE_DRAG_AND_DROP/!wxUSE_DRAG_AND_DROP
}
{
ScreenHDC hdcRef;
RECT rect;
- RECT *pRect;
+ RECT *pRect;
if ( width && height )
{
rect.top =
// CreateEnhMetaFile() wants them in HIMETRIC
PixelToHIMETRIC(&rect.right, &rect.bottom);
-
+
pRect = ▭
}
else
bool wxEnhMetaFileDataObject::GetDataHere(const wxDataFormat& format, void *buf) const
{
- wxCHECK_MSG( m_metafile.Ok(), FALSE, _T("copying invalid enh metafile") );
+ wxCHECK_MSG( m_metafile.Ok(), false, _T("copying invalid enh metafile") );
HENHMETAFILE hEMF = (HENHMETAFILE)m_metafile.GetHENHMETAFILE();
{
wxLogLastError(_T("CopyEnhMetaFile"));
- return FALSE;
+ return false;
}
*(HENHMETAFILE *)buf = hEMFCopy;
free(bits);
- return FALSE;
+ return false;
}
// and finally convert them to the WMF
{
wxLogLastError(_T("SetMetaFileBitsEx"));
- return FALSE;
+ return false;
}
METAFILEPICT *mfpict = (METAFILEPICT *)buf;
PixelToHIMETRIC(&mfpict->xExt, &mfpict->yExt);
}
- return TRUE;
+ return true;
}
bool wxEnhMetaFileDataObject::SetData(const wxDataFormat& format,
free(bits);
- return FALSE;
+ return false;
}
ScreenHDC hdcRef;
{
wxLogLastError(_T("SetWinMetaFileBits"));
- return FALSE;
+ return false;
}
}
m_metafile.SetHENHMETAFILE((WXHANDLE)hEMF);
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
bool wxEnhMetaFileSimpleDataObject::GetDataHere(void *buf) const
{
- wxCHECK_MSG( m_metafile.Ok(), FALSE, _T("copying invalid enh metafile") );
+ wxCHECK_MSG( m_metafile.Ok(), false, _T("copying invalid enh metafile") );
HENHMETAFILE hEMF = (HENHMETAFILE)m_metafile.GetHENHMETAFILE();
{
wxLogLastError(_T("CopyEnhMetaFile"));
- return FALSE;
+ return false;
}
*(HENHMETAFILE *)buf = hEMFCopy;
- return TRUE;
+ return true;
}
bool wxEnhMetaFileSimpleDataObject::SetData(size_t WXUNUSED(len),
wxCHECK_MSG( hEMF, FALSE, _T("pasting invalid enh metafile") );
m_metafile.SetHENHMETAFILE((WXHANDLE)hEMF);
- return TRUE;
+ return true;
}
FINDREPLACE *GetPtrFindReplace() { return &m_findReplace; }
// set/query the "closed by user" flag
- void SetClosedByUser() { m_wasClosedByUser = TRUE; }
+ void SetClosedByUser() { m_wasClosedByUser = true; }
bool WasClosedByUser() const { return m_wasClosedByUser; }
private:
// the find replace data used by the dialog
FINDREPLACE m_findReplace;
- // TRUE if the user closed us, FALSE otherwise
+ // true if the user closed us, false otherwise
bool m_wasClosedByUser;
// registered Message for Dialog
m_hwndOwner = NULL;
m_oldParentWndProc = NULL;
- m_wasClosedByUser = FALSE;
+ m_wasClosedByUser = false;
wxZeroMemory(m_findReplace);
// map flags from Windows
wxEventType evtType;
- bool replace = FALSE;
+ bool replace = false;
if ( pFR->Flags & FR_DIALOGTERM )
{
// we have to notify the dialog that it's being closed by user and
{
evtType = wxEVT_COMMAND_FIND_REPLACE;
- replace = TRUE;
+ replace = true;
}
else if ( pFR->Flags & FR_REPLACEALL )
{
evtType = wxEVT_COMMAND_FIND_REPLACE_ALL;
- replace = TRUE;
+ replace = true;
}
else
{
m_FindReplaceData = NULL;
// as we're created in the hidden state, bring the internal flag in sync
- m_isShown = FALSE;
+ m_isShown = false;
}
wxFindReplaceDialog::wxFindReplaceDialog(wxWindow *parent,
delete m_impl;
// prevent the base class dtor from trying to hide us!
- m_isShown = FALSE;
+ m_isShown = false;
// and from destroying our window [again]
m_hWnd = (WXHWND)NULL;
if ( !wxWindowBase::Show(show) )
{
// visibility status didn't change
- return FALSE;
+ return false;
}
// do we already have the dialog window?
// yes, just use it
(void)::ShowWindow(GetHwnd(), show ? SW_SHOW : SW_HIDE);
- return TRUE;
+ return true;
}
if ( !show )
{
// well, it doesn't exist which is as good as being hidden
- return TRUE;
+ return true;
}
- wxCHECK_MSG( m_FindReplaceData, FALSE, _T("call Create() first!") );
+ wxCHECK_MSG( m_FindReplaceData, false, _T("call Create() first!") );
wxASSERT_MSG( !m_impl, _T("why don't we have the window then?") );
delete m_impl;
m_impl = NULL;
- return FALSE;
+ return false;
}
// subclass parent window in order to get FINDMSGSTRING message
m_hWnd = (WXHWND)hwnd;
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
// forward slashes) and also squeeze multiple consecutive slashes into one
// as it doesn't like two backslashes in a row neither
- wxString dir;
- size_t i, len = m_dir.length();
+ wxString dir;
+ size_t i, len = m_dir.length();
dir.reserve(len);
for ( i = 0; i < len; i++ )
{
#if wxUSE_EXTENDED_RTTI
wxBEGIN_ENUM( wxFontFamily )
- wxENUM_MEMBER( wxDEFAULT )
- wxENUM_MEMBER( wxDECORATIVE )
- wxENUM_MEMBER( wxROMAN )
- wxENUM_MEMBER( wxSCRIPT )
- wxENUM_MEMBER( wxSWISS )
- wxENUM_MEMBER( wxMODERN )
- wxENUM_MEMBER( wxTELETYPE )
+ wxENUM_MEMBER( wxDEFAULT )
+ wxENUM_MEMBER( wxDECORATIVE )
+ wxENUM_MEMBER( wxROMAN )
+ wxENUM_MEMBER( wxSCRIPT )
+ wxENUM_MEMBER( wxSWISS )
+ wxENUM_MEMBER( wxMODERN )
+ wxENUM_MEMBER( wxTELETYPE )
wxEND_ENUM( wxFontFamily )
wxBEGIN_ENUM( wxFontStyle )
- wxENUM_MEMBER( wxNORMAL )
- wxENUM_MEMBER( wxITALIC )
- wxENUM_MEMBER( wxSLANT )
+ wxENUM_MEMBER( wxNORMAL )
+ wxENUM_MEMBER( wxITALIC )
+ wxENUM_MEMBER( wxSLANT )
wxEND_ENUM( wxFontStyle )
wxBEGIN_ENUM( wxFontWeight )
- wxENUM_MEMBER( wxNORMAL )
- wxENUM_MEMBER( wxLIGHT )
- wxENUM_MEMBER( wxBOLD )
+ wxENUM_MEMBER( wxNORMAL )
+ wxENUM_MEMBER( wxLIGHT )
+ wxENUM_MEMBER( wxBOLD )
wxEND_ENUM( wxFontWeight )
IMPLEMENT_DYNAMIC_CLASS_WITH_COPY_XTI(wxFont, wxGDIObject,"wx/font.h")
wxBEGIN_PROPERTIES_TABLE(wxFont)
- wxPROPERTY( Size,int, SetPointSize, GetPointSize, 12 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
- wxPROPERTY( Family, int , SetFamily, GetFamily, (int)wxDEFAULT , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontFamily
- wxPROPERTY( Style, int , SetStyle, GetStyle, (int)wxNORMAL , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontStyle
- wxPROPERTY( Weight, int , SetWeight, GetWeight, (int)wxNORMAL , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontWeight
- wxPROPERTY( Underlined, bool , SetUnderlined, GetUnderlined, false , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
- wxPROPERTY( Face, wxString , SetFaceName, GetFaceName, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
- wxPROPERTY( Encoding, wxFontEncoding , SetEncoding, GetEncoding, wxFONTENCODING_DEFAULT , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
+ wxPROPERTY( Size,int, SetPointSize, GetPointSize, 12 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
+ wxPROPERTY( Family, int , SetFamily, GetFamily, (int)wxDEFAULT , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontFamily
+ wxPROPERTY( Style, int , SetStyle, GetStyle, (int)wxNORMAL , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontStyle
+ wxPROPERTY( Weight, int , SetWeight, GetWeight, (int)wxNORMAL , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontWeight
+ wxPROPERTY( Underlined, bool , SetUnderlined, GetUnderlined, false , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
+ wxPROPERTY( Face, wxString , SetFaceName, GetFaceName, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
+ wxPROPERTY( Encoding, wxFontEncoding , SetEncoding, GetEncoding, wxFONTENCODING_DEFAULT , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxEND_PROPERTIES_TABLE()
-wxCONSTRUCTOR_6( wxFont , int , Size , int , Family , int , Style , int , Weight , bool , Underlined , wxString , Face )
+wxCONSTRUCTOR_6( wxFont , int , Size , int , Family , int , Style , int , Weight , bool , Underlined , wxString , Face )
wxBEGIN_HANDLERS_TABLE(wxFont)
wxEND_HANDLERS_TABLE()
#else
- IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
+ IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
#endif
wxFontRefData()
{
Init(-1, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
- FALSE, wxEmptyString, wxFONTENCODING_DEFAULT);
+ false, wxEmptyString, wxFONTENCODING_DEFAULT);
}
wxFontRefData(int size,
m_hFont = 0;
- m_nativeFontInfoOk = FALSE;
+ m_nativeFontInfoOk = false;
}
void wxFontRefData::Init(const wxNativeFontInfo& info, WXHFONT hFont)
// to LOGFONT back to HFONT)
m_hFont = hFont;
- m_nativeFontInfoOk = TRUE;
+ m_nativeFontInfoOk = true;
m_nativeFontInfo = info;
// This is the best we can do since we don't have the
// correct information at this point.
if ( !m_nativeFontInfoOk )
{
wxFillLogFont(&m_nativeFontInfo.lf, font);
- m_nativeFontInfoOk = TRUE;
+ m_nativeFontInfoOk = true;
}
HFONT hfont = ::CreateFontIndirect(&m_nativeFontInfo.lf);
{
wxLogLastError(wxT("CreateFont"));
- return FALSE;
+ return false;
}
m_hFont = (WXHFONT)hfont;
- return TRUE;
+ return true;
}
void wxFontRefData::Free()
// first the version
wxString token = tokenizer.GetNextToken();
if ( token != _T('0') )
- return FALSE;
+ return false;
token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) )
- return FALSE;
+ return false;
lf.lfHeight = l;
token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) )
- return FALSE;
+ return false;
lf.lfWidth = l;
token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) )
- return FALSE;
+ return false;
lf.lfEscapement = l;
token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) )
- return FALSE;
+ return false;
lf.lfOrientation = l;
token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) )
- return FALSE;
+ return false;
lf.lfWeight = l;
token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) )
- return FALSE;
+ return false;
lf.lfItalic = (BYTE)l;
token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) )
- return FALSE;
+ return false;
lf.lfUnderline = (BYTE)l;
token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) )
- return FALSE;
+ return false;
lf.lfStrikeOut = (BYTE)l;
token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) )
- return FALSE;
+ return false;
lf.lfCharSet = (BYTE)l;
token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) )
- return FALSE;
+ return false;
lf.lfOutPrecision = (BYTE)l;
token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) )
- return FALSE;
+ return false;
lf.lfClipPrecision = (BYTE)l;
token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) )
- return FALSE;
+ return false;
lf.lfQuality = (BYTE)l;
token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) )
- return FALSE;
+ return false;
lf.lfPitchAndFamily = (BYTE)l;
token = tokenizer.GetNextToken();
if(!token)
- return FALSE;
+ return false;
wxStrcpy(lf.lfFaceName, token.c_str());
- return TRUE;
+ return true;
}
wxString wxNativeFontInfo::ToString() const
RealizeResource();
- return TRUE;
+ return true;
}
wxFont::wxFont(const wxString& fontdesc)
RealizeResource();
- return TRUE;
+ return true;
}
wxFont::~wxFont()
{
if ( GetResourceHandle() )
{
- // VZ: the old code returned FALSE in this case, but it doesn't seem
+ // VZ: the old code returned false in this case, but it doesn't seem
// to make sense because the font _was_ created
- return TRUE;
+ return true;
}
return M_FONTDATA->Alloc(this);
{
M_FONTDATA->Free();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
WXHANDLE wxFont::GetResourceHandle() const
bool wxFont::GetUnderlined() const
{
- wxCHECK_MSG( Ok(), FALSE, wxT("invalid font") );
+ wxCHECK_MSG( Ok(), false, wxT("invalid font") );
return M_FONTDATA->GetUnderlined();
}
// if not empty, enum only the fonts in this family
wxString m_family;
- // if TRUE, enum only fixed fonts
+ // if true, enum only fixed fonts
bool m_fixedOnly;
- // if TRUE, we enumerate the encodings, not fonts
+ // if true, we enumerate the encodings, not fonts
bool m_enumEncodings;
// the list of charsets we already found while enumerating charsets
{
m_fontEnum = fontEnum;
m_charset = DEFAULT_CHARSET;
- m_fixedOnly = FALSE;
- m_enumEncodings = FALSE;
+ m_fixedOnly = false;
+ m_enumEncodings = false;
}
void wxFontEnumeratorHelper::SetFamily(const wxString& family)
{
- m_enumEncodings = TRUE;
+ m_enumEncodings = true;
m_family = family;
}
#endif // wxUSE_FONTMAP
{
// no such encodings at all
- return FALSE;
+ return false;
}
}
m_facename = info.facename;
}
- return TRUE;
+ return true;
}
#if defined(__GNUWIN32__) && !defined(__CYGWIN10__) && !wxCHECK_W32API_VERSION( 1, 1 ) && !wxUSE_NORLANDER_HEADERS
else
{
// continue enumeration
- return TRUE;
+ return true;
}
}
if ( tm->tmPitchAndFamily & TMPF_FIXED_PITCH )
{
// not a fixed pitch font
- return TRUE;
+ return true;
}
}
// check that we have the right encoding
if ( lf->lfCharSet != m_charset )
{
- return TRUE;
+ return true;
}
}
else // enumerating fonts in all charsets
if ( m_facenames.Index(lf->lfFaceName) != wxNOT_FOUND )
{
// continue enumeration
- return TRUE;
+ return true;
}
wxConstCast(this, wxFontEnumeratorHelper)->
}
// else: no such fonts, unknown encoding
- return TRUE;
+ return true;
}
bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
fe.SetFamily(family);
fe.DoEnumerate();
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
if ( wxSscanf(tmp, _T("%u"), &charset) != 1 )
{
// should be a number!
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
wxString wxNativeEncodingInfo::ToString() const
bool wxGetNativeFontEncoding(wxFontEncoding encoding,
wxNativeEncodingInfo *info)
{
- wxCHECK_MSG( info, FALSE, _T("bad pointer in wxGetNativeFontEncoding") );
+ wxCHECK_MSG( info, NULL, _T("bad pointer in wxGetNativeFontEncoding") );
if ( encoding == wxFONTENCODING_DEFAULT )
{
extern WXDLLIMPEXP_BASE long wxEncodingToCharset(wxFontEncoding encoding);
info->charset = wxEncodingToCharset(encoding);
if ( info->charset == -1 )
- return FALSE;
+ return false;
info->encoding = encoding;
- return TRUE;
+ return true;
}
bool wxTestFontEncoding(const wxNativeEncodingInfo& info)
if ( !hfont )
{
// no such font
- return FALSE;
+ return false;
}
::DeleteObject((HGDIOBJ)hfont);
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
-
+
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxBEGIN_HANDLERS_TABLE(wxFrame)
wxEND_HANDLERS_TABLE()
-wxCONSTRUCTOR_6( wxFrame , wxWindow* , Parent , wxWindowID , Id , wxString , Title , wxPoint , Position , wxSize , Size , long , WindowStyle)
+wxCONSTRUCTOR_6( wxFrame , wxWindow* , Parent , wxWindowID , Id , wxString , Title , wxPoint , Position , wxSize , Size , long , WindowStyle)
#else
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
#if wxUSE_STATUSBAR
#if wxUSE_NATIVE_STATUSBAR
- bool wxFrame::m_useNativeStatusBar = TRUE;
+ bool wxFrame::m_useNativeStatusBar = true;
#else
- bool wxFrame::m_useNativeStatusBar = FALSE;
+ bool wxFrame::m_useNativeStatusBar = false;
#endif
#endif // wxUSE_NATIVE_STATUSBAR
m_fsStatusBarHeight = 0;
m_fsToolBarHeight = 0;
- m_wasMinimized = FALSE;
+ m_wasMinimized = false;
}
bool wxFrame::Create(wxWindow *parent,
wxFrame::~wxFrame()
{
- m_isBeingDeleted = TRUE;
+ m_isBeingDeleted = true;
DeleteAllBars();
}
#elif defined(WINCE_WITHOUT_COMMANDBAR)
if (!GetToolBar())
{
- wxToolBar* toolBar = new wxToolBar(this, -1,
+ wxToolBar* toolBar = new wxToolBar(this, wxID_ANY,
wxDefaultPosition, wxDefaultSize,
wxBORDER_NONE | wxTB_HORIZONTAL,
wxToolBarNameStr, menubar);
// adjust for menu / titlebar height
rc.bottom -= (2*menuHeight-1);
- MoveWindow((HWND) GetHWND(), rc.left, rc.top, rc.right, rc.bottom, FALSE);
+ ::MoveWindow((HWND) GetHWND(), rc.left, rc.top, rc.right, rc.bottom, FALSE);
}
#endif
wxWindow::OnSysColourChanged(event);
}
-// Pass TRUE to show full screen, FALSE to restore.
+// Pass true to show full screen, false to restore.
bool wxFrame::ShowFullScreen(bool show, long style)
{
if ( IsFullScreen() == show )
- return FALSE;
+ return false;
if (show)
{
if ((style & wxFULLSCREEN_NOTOOLBAR) && theToolBar)
{
- theToolBar->SetSize(-1,0);
- theToolBar->Show(FALSE);
+ theToolBar->SetSize(wxDefaultCoord,0);
+ theToolBar->Show(false);
}
#endif // __WXWINCE__
#endif // wxUSE_TOOLBAR
//m_fsStatusBarFields = theStatusBar->GetFieldsCount();
//SetStatusBar((wxStatusBar*) NULL);
//delete theStatusBar;
- theStatusBar->Show(FALSE);
+ theStatusBar->Show(false);
}
else
m_fsStatusBarFields = 0;
else
{
#if wxUSE_TOOLBAR
-#if defined(WINCE_WITHOUT_COMMANDBAR)
+#if defined(WINCE_WITHOUT_COMMANDBAR)
// TODO: show commandbar
#else
wxToolBar *theToolBar = GetToolBar();
// restore the toolbar, menubar, and statusbar
if (theToolBar && (m_fsStyle & wxFULLSCREEN_NOTOOLBAR))
{
- theToolBar->SetSize(-1, m_fsToolBarHeight);
- theToolBar->Show(TRUE);
+ theToolBar->SetSize(wxDefaultCoord, m_fsToolBarHeight);
+ theToolBar->Show(true);
}
#endif // __WXWINCE__
#endif // wxUSE_TOOLBAR
//CreateStatusBar(m_fsStatusBarFields);
if (GetStatusBar())
{
- GetStatusBar()->Show(TRUE);
+ GetStatusBar()->Show(true);
PositionStatusBar();
}
}
int tw, th;
toolbar->GetPosition(&tx, &ty);
toolbar->GetSize(&tw, &th);
-
+
// Adjust
if (ty < 0 && (-ty == th))
ty = 0;
if (tx < 0 && (-tx == tw))
- tx = 0;
-
+ tx = 0;
+
int desiredW = tw;
int desiredH = th;
desiredW = width;
// if ( toolbar->GetWindowStyleFlag() & wxTB_FLAT )
// desiredW -= 3;
- }
+ }
// use the 'real' MSW position here, don't offset relativly to the
// client area origin
// Optimise such that we don't have to always resize the toolbar
- // when the frame changes, otherwise we'll get a lot of flicker.
+ // when the frame changes, otherwise we'll get a lot of flicker.
bool heightChanging wxDUMMY_INITIALIZE(true);
bool widthChanging wxDUMMY_INITIALIZE(true);
-
+
if ( toolbar->GetWindowStyleFlag() & wxTB_VERTICAL )
{
// It's OK if the current height is greater than what can be shown.
heightChanging = (desiredH > th) ;
widthChanging = (desiredW != tw) ;
-
- // The next time around, we may not have to set the size
+
+ // The next time around, we may not have to set the size
if (heightChanging)
desiredH = desiredH + 200;
}
widthChanging = (desiredW > tw) ;
heightChanging = (desiredH != th) ;
- // The next time around, we may not have to set the size
+ // The next time around, we may not have to set the size
if (widthChanging)
desiredW = desiredW + 200;
}
-
+
if (tx != 0 || ty != 0 || widthChanging || heightChanging)
toolbar->SetSize(x, y, desiredW, desiredH, wxSIZE_NO_ADJUSTMENTS);
-
+
#endif // __WXWINCE__
}
}
bool wxFrame::MSWTranslateMessage(WXMSG* pMsg)
{
if ( wxWindow::MSWTranslateMessage(pMsg) )
- return TRUE;
+ return true;
#if wxUSE_MENUS && wxUSE_ACCEL && !defined(__WXUNIVERSAL__)
// try the menu bar accels
wxMenuBar *menuBar = GetMenuBar();
if ( !menuBar )
- return FALSE;
+ return false;
const wxAcceleratorTable& acceleratorTable = menuBar->GetAccelTable();
return acceleratorTable.Translate(this, pMsg);
#else
- return FALSE;
+ return false;
#endif // wxUSE_MENUS && wxUSE_ACCEL
}
bool wxFrame::HandlePaint()
{
RECT rect;
- if ( GetUpdateRect(GetHwnd(), &rect, FALSE) )
+ if ( ::GetUpdateRect(GetHwnd(), &rect, FALSE) )
{
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
if ( m_iconized )
::EndPaint(GetHwnd(), &ps);
- return TRUE;
+ return true;
}
else
#endif
else
{
// nothing to paint - processed
- return TRUE;
+ return true;
}
}
bool wxFrame::HandleSize(int x, int y, WXUINT id)
{
- bool processed = FALSE;
+ bool processed = false;
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
switch ( id )
break;
// restore all child frames too
- IconizeChildFrames(FALSE);
+ IconizeChildFrames(false);
- (void)SendIconizeEvent(FALSE);
+ (void)SendIconizeEvent(false);
// fall through
case SIZEICONIC:
// iconize all child frames too
- IconizeChildFrames(TRUE);
+ IconizeChildFrames(true);
(void)SendIconizeEvent();
- m_iconized = TRUE;
+ m_iconized = true;
break;
}
#endif
if ( ProcessCommand(id) )
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
bool wxFrame::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu)
// items opening popup menus (they don't have them anyhow) but do clear
// the status line - otherwise, we would be left with the help message
// for the previous item which doesn't apply any more
- DoGiveHelp(wxEmptyString, FALSE);
+ DoGiveHelp(wxEmptyString, false);
- return FALSE;
+ return false;
}
wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, item);
WXLRESULT wxFrame::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{
WXLRESULT rc = 0;
- bool processed = FALSE;
+ bool processed = false;
switch ( message )
{
}
}
}
-
+
wxMenuEvent event(wxEVT_MENU_OPEN, 0, menu);
event.SetEventObject(this);