#ifndef WX_PRECOMP
#include "wx/window.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif // WX_PRECOMP
#include "wx/cocoa/ObjcPose.h"
@end // implementation wxPoserNSComboBox
-#include "wx/app.h"
#include "wx/combobox.h"
#include "wx/cocoa/autorelease.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: cocoa/main.cpp
+// Name: src/cocoa/main.cpp
// Purpose: Entry point
// Author: David Elliott
// Modified by:
// Created: 2002/11/11
// RCS-ID: $Id:
// Copyright: (c) 2002 David Elliott
-// Licence: wxWindows license
+// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
/* DFE: ^^^^^ Was that really necessary :-) */
-#include "wx/app.h"
+#include "wx/wxprec.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
WXDLLEXPORT int main(int argc, char* argv[])
{
- return wxEntry(argc, argv);
+ return wxEntry(argc, argv);
}
-
#include "wx/wxprec.h"
#include "wx/utils.h"
-#include "wx/app.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/apptrait.h"
#include "wx/display.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif //WX_PRECOMP
#include "wx/arrstr.h"
#if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || wxUSE_CONFIG_NATIVE)
-#include "wx/app.h"
#include "wx/file.h"
#include "wx/utils.h"
#include "wx/math.h"
#if wxUSE_HELP
#ifndef WX_PRECOMP
+ #include "wx/app.h"
#endif
#include "wx/tipwin.h"
-#include "wx/app.h"
#include "wx/module.h"
#include "wx/cshelp.h"
#include "wx/string.h"
#include "wx/utils.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#ifdef DBDEBUG_CONSOLE
#include "wx/db.h"
// DLL options compatibility check:
-#include "wx/app.h"
WX_CHECK_BUILD_OPTIONS("wxODBC")
WXDLLIMPEXP_DATA_ODBC(wxDbList*) PtrBegDbList = 0;
///////////////////////////////////////////////////////////////////////////////
-// Name: dbgrid.cpp
+// Name: src/common/dbgrid.cpp
// Purpose: Displays a wxDbTable in a wxGrid.
// Author: Roger Gammans, Paul Gammans
// Modified by:
#pragma hdrstop
#endif
-
-#if wxUSE_ODBC
-#if wxUSE_GRID
+#if wxUSE_ODBC && wxUSE_GRID
#ifndef WX_PRECOMP
#include "wx/textctrl.h"
#include "wx/dc.h"
+ #include "wx/app.h"
#endif // WX_PRECOMP
#include "wx/generic/gridctrl.h"
#include "wx/dbgrid.h"
// DLL options compatibility check:
-#include "wx/app.h"
WX_CHECK_BUILD_OPTIONS("wxDbGrid")
case SQL_C_CHAR:
#ifdef SQL_C_WCHAR
case SQL_C_WCHAR:
-#endif
+#endif
return wxGRID_VALUE_STRING;
case SQL_C_SHORT:
case SQL_C_SSHORT:
WX_DEFINE_EXPORTED_OBJARRAY(keyarray)
-#endif // #if wxUSE_GRID
-#endif // #if wxUSE_ODBC
-
+#endif // wxUSE_GRID && wxUSE_ODBC
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif //WX_PRECOMP
#include "wx/filefn.h"
#include "wx/utils.h"
#include "wx/filename.h" // for SplitPath()
-#include "wx/app.h"
#include "wx/apptrait.h"
#include "wx/arrimpl.cpp"
}
#elif defined(__WXPM__) || defined(__EMX__)
- char err[256] = "";
+ char err[256] = "";
DosLoadModule(err, sizeof(err), (PSZ)libname.c_str(), &m_handle);
#else // this should be the only remaining branch eventually
m_handle = RawLoad(libname, flags);
#endif
#include "wx/evtloop.h"
-#include "wx/app.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif //WX_PRECOMP
// ----------------------------------------------------------------------------
// globals
#include "wx/string.h"
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif //WX_PRECOMP
-#include "wx/app.h"
#include "wx/file.h"
#include "wx/textfile.h"
#include "wx/memtext.h"
#include "wx/utils.h" // for wxGetHomeDir
#if defined(__WXMAC__)
- #include "wx/mac/private.h" // includes mac headers
- #include "wx/filename.h" // for MacSetTypeAndCreator
+ #include "wx/mac/private.h" // includes mac headers
+ #include "wx/filename.h" // for MacSetTypeAndCreator
#endif
#if defined(__WXMSW__)
- #include "wx/msw/private.h"
+ #include "wx/msw/private.h"
#endif //windows.h
#if defined(__WXPM__)
- #define INCL_DOS
- #include <os2.h>
+ #define INCL_DOS
+ #include <os2.h>
#endif
#include <stdlib.h>
// ----------------------------------------------------------------------------
#ifndef MAX_PATH
- #define MAX_PATH 512
+ #define MAX_PATH 512
#endif
#define FILECONF_TRACE_MASK _T("fileconf")
int CompareEntries(wxFileConfigEntry *p1, wxFileConfigEntry *p2)
{
- #if wxCONFIG_CASE_SENSITIVE
+#if wxCONFIG_CASE_SENSITIVE
return wxStrcmp(p1->Name(), p2->Name());
- #else
+#else
return wxStricmp(p1->Name(), p2->Name());
- #endif
+#endif
}
int CompareGroups(wxFileConfigGroup *p1, wxFileConfigGroup *p2)
{
- #if wxCONFIG_CASE_SENSITIVE
+#if wxCONFIG_CASE_SENSITIVE
return wxStrcmp(p1->Name(), p2->Name());
- #else
+#else
return wxStricmp(p1->Name(), p2->Name());
- #endif
+#endif
}
// ----------------------------------------------------------------------------
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#include "wx/gdicmn.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/event.h"
+ #include "wx/app.h"
#endif
#include "wx/brush.h"
#include "wx/cursor.h"
#include "wx/font.h"
#include "wx/palette.h"
-#include "wx/app.h"
#include "wx/dc.h"
#include "wx/utils.h"
#include "wx/settings.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: http.cpp
+// Name: src/common/http.cpp
// Purpose: HTTP protocol
// Author: Guilhem Lavaux
// Modified by: Simo Virokannas (authentication, Dec 2005)
#include "wx/wxprec.h"
#ifdef __BORLANDC__
- #pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_PROTOCOL_HTTP
#include <stdlib.h>
#ifndef WX_PRECOMP
-#include "wx/string.h"
-#include "wx/app.h"
+ #include "wx/string.h"
+ #include "wx/app.h"
#endif
#include "wx/tokenzr.h"
toencode.Printf(wxT("%s:%s"),user.c_str(),pass.c_str());
- size_t len = toencode.Length();
+ size_t len = toencode.length();
const wxChar *from = toencode.c_str();
while (len >= 3) { // encode full blocks first
buf << wxString::Format(wxT("%c%c"), base64[(from[0] >> 2) & 0x3f], base64[((from[0] << 4) & 0x30) | ((from[1] >> 4) & 0xf)]);
if (m_perr != wxPROTO_NOERR)
return false;
- if (line.Length() == 0)
+ if (line.length() == 0)
break;
wxString left_str = line.BeforeFirst(':');
SetHeader(wxT("User-Agent"), wxT("wxWidgets 2.x"));
// Send authentication information
- if (m_username.Length()>0 || m_password.Length()>0) {
+ if (!m_username.empty() || !m_password.empty()) {
SetHeader(wxT("Authorization"), GenerateAuthString(m_username, m_password));
}
}
#endif // wxUSE_PROTOCOL_HTTP
-
#include "wx/log.h"
#include "wx/debug.h"
#include "wx/utils.h"
+ #include "wx/app.h"
#endif // WX_PRECOMP
#ifndef __WXWINCE__
#include <ctype.h>
#include <stdlib.h>
#ifdef HAVE_LANGINFO_H
- #include <langinfo.h>
+ #include <langinfo.h>
#endif
#ifdef __WIN32__
#include "wx/encconv.h"
#include "wx/hashmap.h"
#include "wx/ptr_scpd.h"
-#include "wx/app.h"
#include "wx/apptrait.h"
#include "wx/stdpaths.h"
#if defined(__WXMAC__)
- #include "wx/mac/private.h" // includes mac headers
+ #include "wx/mac/private.h" // includes mac headers
#endif
// ----------------------------------------------------------------------------
///////////////////////////////////////////////////////////////////////////////
-// Name: common/popupcmn.cpp
+// Name: src/common/popupcmn.cpp
// Purpose: implementation of wxPopupTransientWindow
// Author: Vadim Zeitlin
// Modified by:
#include "wx/combobox.h" // wxComboControl
#include "wx/app.h" // wxPostEvent
#include "wx/log.h"
- #include "wx/app.h"
#endif //WX_PRECOMP
#ifdef __WXUNIVERSAL__
}
#endif // wxUSE_POPUPWIN
-
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/event.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/apptrait.h"
#include "wx/timer.h"
#include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif // WX_PRECOMP
#include "wx/dcmemory.h"
#include "wx/utils.h"
-#include "wx/app.h"
#include "wx/image.h"
#include "wx/prntbase.h"
#include "wx/generic/prntdlgg.h"
const wxChar *paper;
switch (m_printData.GetPaperId())
{
- case wxPAPER_LETTER: paper = wxT("Letter"); break; // Letter: paper ""; 8 1/2 by 11 inches
- case wxPAPER_LEGAL: paper = wxT("Legal"); break; // Legal, 8 1/2 by 14 inches
- case wxPAPER_A4: paper = wxT("A4"); break; // A4 Sheet, 210 by 297 millimeters
+ case wxPAPER_LETTER: paper = wxT("Letter"); break; // Letter: paper ""; 8 1/2 by 11 inches
+ case wxPAPER_LEGAL: paper = wxT("Legal"); break; // Legal, 8 1/2 by 14 inches
+ case wxPAPER_A4: paper = wxT("A4"); break; // A4 Sheet, 210 by 297 millimeters
case wxPAPER_TABLOID: paper = wxT("Tabloid"); break; // Tabloid, 11 by 17 inches
- case wxPAPER_LEDGER: paper = wxT("Ledger"); break; // Ledger, 17 by 11 inches
- case wxPAPER_STATEMENT: paper = wxT("Statement"); break; // Statement, 5 1/2 by 8 1/2 inches
- case wxPAPER_EXECUTIVE: paper = wxT("Executive"); break; // Executive, 7 1/4 by 10 1/2 inches
- case wxPAPER_A3: paper = wxT("A3"); break; // A3 sheet, 297 by 420 millimeters
- case wxPAPER_A5: paper = wxT("A5"); break; // A5 sheet, 148 by 210 millimeters
- case wxPAPER_B4: paper = wxT("B4"); break; // B4 sheet, 250 by 354 millimeters
- case wxPAPER_B5: paper = wxT("B5"); break; // B5 sheet, 182-by-257-millimeter paper
- case wxPAPER_FOLIO: paper = wxT("Folio"); break; // Folio, 8-1/2-by-13-inch paper
- case wxPAPER_QUARTO: paper = wxT("Quaro"); break; // Quarto, 215-by-275-millimeter paper
- case wxPAPER_10X14: paper = wxT("10x14"); break; // 10-by-14-inch sheet
+ case wxPAPER_LEDGER: paper = wxT("Ledger"); break; // Ledger, 17 by 11 inches
+ case wxPAPER_STATEMENT: paper = wxT("Statement"); break; // Statement, 5 1/2 by 8 1/2 inches
+ case wxPAPER_EXECUTIVE: paper = wxT("Executive"); break; // Executive, 7 1/4 by 10 1/2 inches
+ case wxPAPER_A3: paper = wxT("A3"); break; // A3 sheet, 297 by 420 millimeters
+ case wxPAPER_A5: paper = wxT("A5"); break; // A5 sheet, 148 by 210 millimeters
+ case wxPAPER_B4: paper = wxT("B4"); break; // B4 sheet, 250 by 354 millimeters
+ case wxPAPER_B5: paper = wxT("B5"); break; // B5 sheet, 182-by-257-millimeter paper
+ case wxPAPER_FOLIO: paper = wxT("Folio"); break; // Folio, 8-1/2-by-13-inch paper
+ case wxPAPER_QUARTO: paper = wxT("Quaro"); break; // Quarto, 215-by-275-millimeter paper
+ case wxPAPER_10X14: paper = wxT("10x14"); break; // 10-by-14-inch sheet
default: paper = wxT("A4");
}
PsPrintf( wxT("%%%%DocumentPaperSizes: %s\n"), paper );
/////////////////////////////////////////////////////////////////////////////
-// Name: cursor.cpp
+// Name: src/gtk/cursor.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
#include "wx/wxprec.h"
#include "wx/cursor.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/utils.h"
-#include "wx/app.h"
#include "wx/gtk/private.h" //for idle stuff
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/debug.h"
#include "wx/mstream.h"
#include "wx/image.h"
memcpy( buf, filenames.mbc_str(), filenames.Len() + 1 );
- return TRUE;
+ return true;
}
size_t wxFileDataObject::GetDataSize() const
}
}
- return TRUE;
+ return true;
}
void wxFileDataObject::AddFile( const wxString &filename )
{
wxFAIL_MSG( wxT("attempt to copy empty bitmap failed") );
- return FALSE;
+ return false;
}
memcpy(buf, m_pngData, m_pngSize);
- return TRUE;
+ return true;
}
bool wxBitmapDataObject::SetData(size_t size, const void *buf)
Clear();
wxCHECK_MSG( wxImage::FindHandler(wxBITMAP_TYPE_PNG) != NULL,
- FALSE, wxT("You must call wxImage::AddHandler(new wxPNGHandler); to be able to use clipboard with bitmaps!") );
+ false, wxT("You must call wxImage::AddHandler(new wxPNGHandler); to be able to use clipboard with bitmaps!") );
m_pngSize = size;
m_pngData = malloc(m_pngSize);
wxImage image;
if ( !image.LoadFile( mstream, wxBITMAP_TYPE_PNG ) )
{
- return FALSE;
+ return false;
}
m_bitmap = wxBitmap(image);
/////////////////////////////////////////////////////////////////////////////
-// Name: dialog.cpp
+// Name: src/gtk/dialog.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
#include "wx/wxprec.h"
#include "wx/dialog.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/frame.h"
-#include "wx/app.h"
#include "wx/cursor.h"
#include "wx/evtloop.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/window.h"
-#include "wx/app.h"
#include "wx/gdicmn.h"
#include "wx/utils.h"
}
else
{
- wxLogTrace(TRACE_DND, wxT( "Drop target: OnDrop returned TRUE") );
+ wxLogTrace(TRACE_DND, wxT( "Drop target: OnDrop returned true") );
#if wxUSE_THREADS
/* disable GUI threads */
if ( wxIsDragResultOk( drop_target->OnData( x, y, result ) ) )
{
- wxLogTrace(TRACE_DND, wxT( "Drop target: OnData returned TRUE") );
+ wxLogTrace(TRACE_DND, wxT( "Drop target: OnData returned true") );
/* tell GTK that data transfer was successful */
gtk_drag_finish( context, TRUE, FALSE, time );
///////////////////////////////////////////////////////////////////////////////
-// Name: gtk/evtloop.cpp
+// Name: src/gtk/evtloop.cpp
// Purpose: implements wxEventLoop for GTK+
// Author: Vadim Zeitlin
// Modified by:
#endif
#include "wx/evtloop.h"
-#include "wx/app.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
#include <gtk/gtk.h>
bool wxEventLoop::Dispatch()
{
- wxCHECK_MSG( IsRunning(), FALSE, _T("can't call Dispatch() if not running") );
+ wxCHECK_MSG( IsRunning(), false, _T("can't call Dispatch() if not running") );
gtk_main_iteration();
- return TRUE;
+ return true;
}
-
// ----------------------------------------------------------------------------
#include "wx/frame.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/dialog.h"
#include "wx/control.h"
-#include "wx/app.h"
#include "wx/menu.h"
#if wxUSE_TOOLBAR
#include "wx/toolbar.h"
#include "wx/glcanvas.h"
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/frame.h"
#include "wx/colour.h"
#include "wx/module.h"
-#include "wx/app.h"
extern "C"
{
event.SetEventObject( win );
win->GetEventHandler()->ProcessEvent( event );
- win->m_exposed = FALSE;
+ win->m_exposed = false;
win->GetUpdateRegion().Clear();
}
if (g_isIdle)
wxapp_install_idle_handler();
- win->m_exposed = TRUE;
+ win->m_exposed = true;
win->GetUpdateRegion().Union( gdk_event->area.x,
gdk_event->area.y,
m_sharedContextOf = (wxGLCanvas*)shared_context_of; // const_cast
m_glContext = (wxGLContext*) NULL;
- m_exposed = FALSE;
- m_noExpose = TRUE;
- m_nativeSizeEvent = TRUE;
+ m_exposed = false;
+ m_noExpose = true;
+ m_nativeSizeEvent = true;
m_fbc = NULL;
m_vi = NULL;
if (wxTheApp->m_glFBCInfo != NULL)
{
fbc = (GLXFBConfig *) wxTheApp->m_glFBCInfo;
- m_canFreeFBC = FALSE; // owned by wxTheApp - don't free upon destruction
+ m_canFreeFBC = false; // owned by wxTheApp - don't free upon destruction
}
else
{
fbc = (GLXFBConfig *) wxGLCanvas::ChooseGLFBC(attribList);
- m_canFreeFBC = TRUE;
+ m_canFreeFBC = true;
}
m_fbc = fbc; // save for later use
- wxCHECK_MSG( m_fbc, FALSE, _T("required FBConfig couldn't be found") );
+ wxCHECK_MSG( m_fbc, false, _T("required FBConfig couldn't be found") );
}
XVisualInfo *vi = NULL;
if (wxTheApp->m_glVisualInfo != NULL)
{
vi = (XVisualInfo *)wxTheApp->m_glVisualInfo;
- m_canFreeVi = FALSE; // owned by wxTheApp - don't free upon destruction
+ m_canFreeVi = false; // owned by wxTheApp - don't free upon destruction
}
else
{
// GLX <= 1.2
vi = (XVisualInfo *) ChooseGLVisual(attribList);
- m_canFreeVi = TRUE;
+ m_canFreeVi = true;
}
m_vi = vi; // save for later use
- wxCHECK_MSG( m_vi, FALSE, _T("required visual couldn't be found") );
+ wxCHECK_MSG( m_vi, false, _T("required visual couldn't be found") );
GdkVisual *visual;
GdkColormap *colormap;
if (GTK_WIDGET_MAPPED(m_wxwindow))
gtk_glwindow_map_callback( m_wxwindow, this );
- return TRUE;
+ return true;
}
wxGLCanvas::~wxGLCanvas()
event.SetEventObject( this );
GetEventHandler()->ProcessEvent( event );
- m_exposed = FALSE;
+ m_exposed = false;
GetUpdateRegion().Clear();
}
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/bitmap.h"
#if wxUSE_ACCEL
void wxMenuBar::Init(size_t n, wxMenu *menus[], const wxString titles[], long style)
{
// the parent window is known after wxFrame::SetMenu()
- m_needParent = FALSE;
+ m_needParent = false;
m_style = style;
m_invokingWindow = (wxWindow*) NULL;
bool wxMenuBar::Append( wxMenu *menu, const wxString &title )
{
if ( !wxMenuBarBase::Append( menu, title ) )
- return FALSE;
+ return false;
return GtkAppend(menu, title);
}
frame->UpdateMenuBarSize();
}
- return TRUE;
+ return true;
}
bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
{
if ( !wxMenuBarBase::Insert(pos, menu, title) )
- return FALSE;
+ return false;
// TODO
if ( !GtkAppend(menu, title, (int)pos) )
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title)
bool wxMenuItem::IsChecked() const
{
- wxCHECK_MSG( m_menuItem, FALSE, wxT("invalid menu item") );
+ wxCHECK_MSG( m_menuItem, false, wxT("invalid menu item") );
- wxCHECK_MSG( IsCheckable(), FALSE,
+ wxCHECK_MSG( IsCheckable(), false,
wxT("can't get state of uncheckable item!") );
return ((GtkCheckMenuItem*)m_menuItem)->active != 0;
// gtk_widget_lock_accelerators(mitem->GetMenuItem());
}
- return TRUE;
+ return true;
}
wxMenuItem* wxMenu::DoAppend(wxMenuItem *mitem)
extern "C" WXDLLIMPEXP_CORE
void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting )
{
- *is_waiting = FALSE;
+ *is_waiting = false;
}
WXDLLIMPEXP_CORE void SetInvokingWindow( wxMenu *menu, wxWindow* win )
/////////////////////////////////////////////////////////////////////////////
-// Name: popupwin.cpp
+// Name: src/gtk/popupwin.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
#if wxUSE_POPUPWIN
#include "wx/popupwin.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/frame.h"
-#include "wx/app.h"
#include "wx/cursor.h"
#include <gdk/gdk.h>
bool wxPopupWindow::Create( wxWindow *parent, int style )
{
- m_needParent = FALSE;
+ m_needParent = false;
if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) ||
!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("popup") ))
{
wxFAIL_MSG( wxT("wxPopupWindow creation failed") );
- return FALSE;
+ return false;
}
// Unlike windows, top level windows are created hidden by default.
g_signal_connect (m_widget, "button_press_event",
G_CALLBACK (gtk_popup_button_press), this);
- return TRUE;
+ return true;
}
void wxPopupWindow::DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width), int WXUNUSED(height) )
wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid dialog") );
if (m_resizing) return; /* I don't like recursions */
- m_resizing = TRUE;
+ m_resizing = true;
int old_x = m_x;
int old_y = m_y;
/* actual resizing is deferred to GtkOnSize in idle time and
when showing the dialog */
- m_sizeSet = FALSE;
+ m_sizeSet = false;
}
- m_resizing = FALSE;
+ m_resizing = false;
}
void wxPopupWindow::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height )
(GdkWindowHints) flag );
- m_sizeSet = TRUE;
+ m_sizeSet = true;
wxSizeEvent event( wxSize(m_width,m_height), GetId() );
event.SetEventObject( this );
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/dialog.h"
#include "wx/control.h"
-#include "wx/app.h"
#include "wx/dcclient.h"
#include "wx/gtk/private.h"
#include "wx/timer.h"
#include "wx/list.h"
#include "wx/string.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/config.h"
-#include "wx/app.h"
//-----------------------------------------------------------------------------
// resource functions
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/dcclient.h"
#include "wx/frame.h"
-#include "wx/app.h"
#include "wx/layout.h"
#include "wx/utils.h"
#include "wx/dialog.h"
// reset the event object and id in case win changed.
event.SetEventObject( win );
event.SetId( win->GetId() );
-
+
if (win->GetEventHandler()->ProcessEvent( event ))
{
g_signal_stop_emission_by_name (widget, "button_press_event");
#include "wx/wxprec.h"
#include "wx/bitmap.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/palette.h"
#include "wx/icon.h"
#include "wx/filefn.h"
#include "wx/image.h"
#include "wx/dcmemory.h"
-#include "wx/app.h"
#include <gdk/gdk.h>
#include <gtk/gtk.h>
/////////////////////////////////////////////////////////////////////////////
-// Name: cursor.cpp
+// Name: src/gtk1/cursor.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
#include "wx/wxprec.h"
#include "wx/cursor.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/utils.h"
-#include "wx/app.h"
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/debug.h"
#include "wx/mstream.h"
#include "wx/image.h"
memcpy( buf, filenames.mbc_str(), filenames.Len() + 1 );
- return TRUE;
+ return true;
}
size_t wxFileDataObject::GetDataSize() const
}
}
- return TRUE;
+ return true;
}
void wxFileDataObject::AddFile( const wxString &filename )
{
wxFAIL_MSG( wxT("attempt to copy empty bitmap failed") );
- return FALSE;
+ return false;
}
memcpy(buf, m_pngData, m_pngSize);
- return TRUE;
+ return true;
}
bool wxBitmapDataObject::SetData(size_t size, const void *buf)
Clear();
wxCHECK_MSG( wxImage::FindHandler(wxBITMAP_TYPE_PNG) != NULL,
- FALSE, wxT("You must call wxImage::AddHandler(new wxPNGHandler); to be able to use clipboard with bitmaps!") );
+ false, wxT("You must call wxImage::AddHandler(new wxPNGHandler); to be able to use clipboard with bitmaps!") );
m_pngSize = size;
m_pngData = malloc(m_pngSize);
wxImage image;
if ( !image.LoadFile( mstream, wxBITMAP_TYPE_PNG ) )
{
- return FALSE;
+ return false;
}
m_bitmap = wxBitmap(image);
/////////////////////////////////////////////////////////////////////////////
-// Name: dialog.cpp
+// Name: src/gtk1/dialog.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
#include "wx/wxprec.h"
#include "wx/dialog.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/frame.h"
-#include "wx/app.h"
#include "wx/cursor.h"
#include "wx/evtloop.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/window.h"
-#include "wx/app.h"
#include "wx/gdicmn.h"
#include "wx/utils.h"
///////////////////////////////////////////////////////////////////////////////
-// Name: gtk/evtloop.cpp
+// Name: src/gtk1/evtloop.cpp
// Purpose: implements wxEventLoop for GTK+
// Author: Vadim Zeitlin
// Modified by:
#endif
#include "wx/evtloop.h"
-#include "wx/app.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
#include <gtk/gtk.h>
bool wxEventLoop::Dispatch()
{
- wxCHECK_MSG( IsRunning(), FALSE, _T("can't call Dispatch() if not running") );
+ wxCHECK_MSG( IsRunning(), false, _T("can't call Dispatch() if not running") );
gtk_main_iteration();
- return TRUE;
+ return true;
}
-
// ----------------------------------------------------------------------------
#include "wx/frame.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/dialog.h"
#include "wx/control.h"
-#include "wx/app.h"
#include "wx/menu.h"
#if wxUSE_TOOLBAR
#include "wx/toolbar.h"
#include "wx/glcanvas.h"
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/frame.h"
#include "wx/colour.h"
#include "wx/module.h"
-#include "wx/app.h"
extern "C"
{
event.SetEventObject( win );
win->GetEventHandler()->ProcessEvent( event );
- win->m_exposed = FALSE;
+ win->m_exposed = false;
win->GetUpdateRegion().Clear();
}
if (g_isIdle)
wxapp_install_idle_handler();
- win->m_exposed = TRUE;
+ win->m_exposed = true;
win->GetUpdateRegion().Union( gdk_event->area.x,
gdk_event->area.y,
if (g_isIdle)
wxapp_install_idle_handler();
- win->m_exposed = TRUE;
+ win->m_exposed = true;
win->GetUpdateRegion().Union( rect->x, rect->y,
rect->width, rect->height );
m_sharedContextOf = (wxGLCanvas*)shared_context_of; // const_cast
m_glContext = (wxGLContext*) NULL;
- m_exposed = FALSE;
- m_noExpose = TRUE;
- m_nativeSizeEvent = TRUE;
+ m_exposed = false;
+ m_noExpose = true;
+ m_nativeSizeEvent = true;
m_fbc = NULL;
m_vi = NULL;
if (wxTheApp->m_glFBCInfo != NULL)
{
fbc = (GLXFBConfig *) wxTheApp->m_glFBCInfo;
- m_canFreeFBC = FALSE; // owned by wxTheApp - don't free upon destruction
+ m_canFreeFBC = false; // owned by wxTheApp - don't free upon destruction
}
else
{
fbc = (GLXFBConfig *) wxGLCanvas::ChooseGLFBC(attribList);
- m_canFreeFBC = TRUE;
+ m_canFreeFBC = true;
}
m_fbc = fbc; // save for later use
- wxCHECK_MSG( m_fbc, FALSE, _T("required FBConfig couldn't be found") );
+ wxCHECK_MSG( m_fbc, false, _T("required FBConfig couldn't be found") );
}
XVisualInfo *vi = NULL;
if (wxTheApp->m_glVisualInfo != NULL)
{
vi = (XVisualInfo *)wxTheApp->m_glVisualInfo;
- m_canFreeVi = FALSE; // owned by wxTheApp - don't free upon destruction
+ m_canFreeVi = false; // owned by wxTheApp - don't free upon destruction
}
else
{
// GLX <= 1.2
vi = (XVisualInfo *) ChooseGLVisual(attribList);
- m_canFreeVi = TRUE;
+ m_canFreeVi = true;
}
m_vi = vi; // save for later use
- wxCHECK_MSG( m_vi, FALSE, _T("required visual couldn't be found") );
+ wxCHECK_MSG( m_vi, false, _T("required visual couldn't be found") );
GdkVisual *visual;
GdkColormap *colormap;
if (GTK_WIDGET_MAPPED(m_wxwindow))
gtk_glwindow_map_callback( m_wxwindow, this );
- return TRUE;
+ return true;
}
wxGLCanvas::~wxGLCanvas()
event.SetEventObject( this );
GetEventHandler()->ProcessEvent( event );
- m_exposed = FALSE;
+ m_exposed = false;
GetUpdateRegion().Clear();
}
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/bitmap.h"
#if wxUSE_ACCEL
extern "C" WXDLLIMPEXP_CORE
void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting )
{
- *is_waiting = FALSE;
+ *is_waiting = false;
}
WXDLLIMPEXP_CORE void SetInvokingWindow( wxMenu *menu, wxWindow* win )
/////////////////////////////////////////////////////////////////////////////
-// Name: popupwin.cpp
+// Name: src/gtk1/popupwin.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
#if wxUSE_POPUPWIN
#include "wx/popupwin.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/frame.h"
-#include "wx/app.h"
#include "wx/cursor.h"
#include <gdk/gdk.h>
bool wxPopupWindow::Create( wxWindow *parent, int style )
{
- m_needParent = FALSE;
+ m_needParent = false;
if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) ||
!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("popup") ))
{
wxFAIL_MSG( wxT("wxPopupWindow creation failed") );
- return FALSE;
+ return false;
}
// Unlike windows, top level windows are created hidden by default.
wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid dialog") );
if (m_resizing) return; /* I don't like recursions */
- m_resizing = TRUE;
+ m_resizing = true;
int old_x = m_x;
int old_y = m_y;
/* actual resizing is deferred to GtkOnSize in idle time and
when showing the dialog */
- m_sizeSet = FALSE;
+ m_sizeSet = false;
}
- m_resizing = FALSE;
+ m_resizing = false;
}
void wxPopupWindow::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height )
(GdkWindowHints) flag );
- m_sizeSet = TRUE;
+ m_sizeSet = true;
wxSizeEvent event( wxSize(m_width,m_height), GetId() );
event.SetEventObject( this );
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/dialog.h"
#include "wx/control.h"
-#include "wx/app.h"
#include "wx/dcclient.h"
#include "wx/gtk1/private.h"
#include "wx/timer.h"
#include "wx/list.h"
#include "wx/string.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/config.h"
-#include "wx/app.h"
//-----------------------------------------------------------------------------
// resource functions
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/dcclient.h"
#include "wx/frame.h"
-#include "wx/app.h"
#include "wx/layout.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/dynarray.h"
#include "wx/log.h"
#include "wx/intl.h"
+ #include "wx/app.h"
#endif
#include "wx/tokenzr.h"
#endif
// DLL options compatibility check:
-#include "wx/app.h"
WX_CHECK_BUILD_OPTIONS("wxHTML")
const wxChar *wxTRACE_HTML_DEBUG = _T("htmldebug");
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/event.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/apptrait.h"
#include "wx/timer.h"
#include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/frame.h"
#include "wx/bitmap.h"
#include "wx/utils.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: control.cpp
+// Name: src/mac/carbon/control.cpp
// Purpose: wxControl class
// Author: Stefan Csomor
// Modified by:
#include "wx/wxprec.h"
#include "wx/control.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/panel.h"
-#include "wx/app.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
#include "wx/notebook.h"
m_peer->HandleKey( keyCode, charCode, modifiers );
}
-
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
-#include "wx/app.h"
#include "wx/cursor.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/icon.h"
#include "wx/image.h"
#include "wx/xpmdecod.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/mac/uma.h"
#include "wx/dcmemory.h"
#include "wx/dcprint.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/mac/uma.h"
#include "wx/dcmemory.h"
#include "wx/dcprint.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: dialog.cpp
+// Name: src/mac/carbon/dialog.cpp
// Purpose: wxDialog class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#include "wx/dialog.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/utils.h"
#include "wx/frame.h"
-#include "wx/app.h"
#include "wx/settings.h"
#include "wx/mac/uma.h"
if ( !wxTopLevelWindow::Create( parent, id, title, pos, size, style, name ) )
return false;
-
+
#if TARGET_API_MAC_OSX
HIViewRef growBoxRef = 0 ;
OSStatus err = HIViewFindByID( HIViewGetRoot( (WindowRef)m_macWindow ), kHIViewWindowGrowBoxID, &growBoxRef );
wxModalDialogs.Append(this);
SetFocus() ;
-
+
#if TARGET_CARBON
BeginAppModalStateForWindow( (WindowRef) MacGetWindowRef()) ;
#else
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
Refresh();
}
-
///////////////////////////////////////////////////////////////////////////////
-// Name: dnd.cpp
+// Name: src/mac/carbon/dnd.cpp
// Purpose: wxDropTarget, wxDropSource implementations
// Author: Stefan Csomor
// Modified by:
#if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/window.h"
#include "wx/toplevel.h"
-#include "wx/app.h"
#include "wx/gdicmn.h"
#include "wx/mac/private.h"
HFSFlavor* theFile = (HFSFlavor*)theData;
wxString name = wxMacFSSpec2MacFilename( &theFile->fileSpec );
- if (!name.IsEmpty())
+ if (!name.empty())
filenamesPassed += name + wxT("\n");
}
break;
///////////////////////////////////////////////////////////////////////////////
-// Name: mac/carbon/evtloop.cpp
+// Name: src/mac/carbon/evtloop.cpp
// Purpose: implementation of wxEventLoop for wxMac
// Author: Vadim Zeitlin
// Modified by:
#endif
#include "wx/evtloop.h"
-#include "wx/app.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
#ifdef __DARWIN__
#include <Carbon/Carbon.h>
wxTheApp->MacDoOneEvent();
return true;
}
-
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/tokenzr.h"
#include "wx/mac/private.h"
#ifndef __DARWIN__
- #include <Navigation.h>
- #include "PLStringFuncs.h"
+ #include <Navigation.h>
+ #include "PLStringFuncs.h"
#endif
#include "MoreFilesX.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: frame.cpp
+// Name: src/mac/carbon/frame.cpp
// Purpose: wxFrame
// Author: Stefan Csomor
// Modified by:
#include "wx/wxprec.h"
#include "wx/frame.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/statusbr.h"
#include "wx/toolbar.h"
#include "wx/menuitem.h"
#include "wx/dcclient.h"
#include "wx/dialog.h"
#include "wx/settings.h"
-#include "wx/app.h"
#include "wx/mac/uma.h"
}
#endif
-
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/button.h"
#include "wx/settings.h"
#include "wx/toplevel.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/menuitem.h"
#include "wx/window.h"
#include "wx/log.h"
///////////////////////////////////////////////////////////////////////////////
-// Name: menuitem.cpp
+// Name: src/mac/carbon/menuitem.cpp
// Purpose: wxMenuItem implementation
// Author: Stefan Csomor
// Modified by:
#include "wx/wxprec.h"
-#include "wx/app.h"
-#include "wx/menu.h"
#include "wx/menuitem.h"
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
+#include "wx/menu.h"
+
#include "wx/mac/uma.h"
IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject)
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/mac/uma.h"
wxMacCFStringHolder cfNoString( _("No"), m_font.GetEncoding() );
wxMacCFStringHolder cfYesString( _("Yes"), m_font.GetEncoding() );
- wxMacCFStringHolder cfOKString( _("OK") , m_font.GetEncoding()) ;
+ wxMacCFStringHolder cfOKString( _("OK") , m_font.GetEncoding()) ;
wxMacCFStringHolder cfCancelString( _("Cancel"), m_font.GetEncoding() );
int buttonId[4] = { 0, 0, 0, wxID_CANCEL /* time-out */ };
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/string.h"
#include "wx/imaglist.h"
#include "wx/image.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: printwin.cpp
+// Name: src/mac/carbon/printwin.cpp
// Purpose: wxMacPrinter framework
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#if wxUSE_PRINTING_ARCHITECTURE
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#ifndef WX_PRECOMP
-#include "wx/utils.h"
-#include "wx/dc.h"
-#include "wx/app.h"
-#include "wx/msgdlg.h"
+ #include "wx/utils.h"
+ #include "wx/dc.h"
+ #include "wx/app.h"
+ #include "wx/msgdlg.h"
#endif
#include "wx/math.h"
IMPLEMENT_DYNAMIC_CLASS(wxMacPrinter, wxPrinterBase)
IMPLEMENT_CLASS(wxMacPrintPreview, wxPrintPreviewBase)
-bool wxMacCarbonPrintData::Ok() const
+bool wxMacCarbonPrintData::Ok() const
{
return (m_macPageFormat != kPMNoPageFormat) && (m_macPrintSettings != kPMNoPrintSettings) && (m_macPrintSession != kPMNoReference);
}
(void)PMRelease(m_macPrintSettings);
m_macPrintSettings = kPMNoPrintSettings;
}
-
+
if ( m_macPrintSession != kPMNoReference )
{
(void)PMRelease(m_macPrintSession);
}
}
-void wxMacCarbonPrintData::ValidateOrCreate()
+void wxMacCarbonPrintData::ValidateOrCreate()
{
OSStatus err = noErr ;
if ( m_macPrintSession == kPMNoReference )
if ( m_macPageFormat == kPMNoPageFormat)
{
err = PMCreatePageFormat((PMPageFormat *) &m_macPageFormat);
-
+
// Note that PMPageFormat is not session-specific, but calling
// PMSessionDefaultPageFormat assigns values specific to the printer
// associated with the current printing session.
(PMPageFormat) m_macPageFormat,
kPMDontWantBoolean);
}
-
+
// Set up a valid PrintSettings object.
if ( m_macPrintSettings == kPMNoPrintSettings)
{
err = PMCreatePrintSettings((PMPrintSettings *) &m_macPrintSettings);
-
+
// Note that PMPrintSettings is not session-specific, but calling
// PMSessionDefaultPrintSettings assigns values specific to the printer
// associated with the current printing session.
kPMLandscape : kPMPortrait , false ) ;
// collate cannot be set
#if 0 // not yet tested
- if ( m_printerName.Length() > 0 )
+ if ( !m_printerName.empty() )
PMSessionSetCurrentPrinter( (PMPrintSession) m_macPrintSession , wxMacCFStringHolder( m_printerName , wxFont::GetDefaultEncoding() ) ) ;
#endif
PMColorMode color ;
}
else
PMSetColorMode( (PMPrintSettings) m_macPrintSettings, kPMBlackAndWhite ) ;
-
+
// PMDuplexMode not yet accessible via API
// PMQualityMode not yet accessible via API
// todo paperSize
bool wxMacCarbonPrintData::TransferTo( wxPrintData &data )
{
OSStatus err = noErr ;
-
+
UInt32 copies ;
err = PMGetCopies( m_macPrintSettings , &copies ) ;
if ( err == noErr )
- data.SetNoCopies( copies ) ;
-
+ data.SetNoCopies( copies ) ;
+
PMOrientation orientation ;
err = PMGetOrientation( m_macPageFormat , &orientation ) ;
if ( err == noErr )
m_printerName = name.AsString() ;
}
#endif
-
+
PMColorMode color ;
err = PMGetColorMode( m_macPrintSettings, &color ) ;
if ( err == noErr )
data.SetColour( !(color == kPMBlackAndWhite) ) ;
-
+
// PMDuplexMode not yet accessible via API
// PMQualityMode not yet accessible via API
// todo paperSize
- PMRect rPaper;
+ PMRect rPaper;
err = PMGetUnadjustedPaperRect( m_macPageFormat, &rPaper);
if ( err == noErr )
{
if ( err == noErr )
{
data->SetMinMarginTopLeft( wxPoint (
- (int)(((double) rPage.left - rPaper.left ) * pt2mm) ,
- (int)(((double) rPage.top - rPaper.top ) * pt2mm) ) ) ;
-
- data->SetMinMarginBottomRight( wxPoint (
+ (int)(((double) rPage.left - rPaper.left ) * pt2mm) ,
+ (int)(((double) rPage.top - rPaper.top ) * pt2mm) ) ) ;
+
+ data->SetMinMarginBottomRight( wxPoint (
(wxCoord)(((double) rPaper.right - rPage.right ) * pt2mm),
(wxCoord)(((double) rPaper.bottom - rPage.bottom ) * pt2mm)) ) ;
if ( data->GetMarginBottomRight().y < data->GetMinMarginBottomRight().y )
data->SetMarginBottomRight( wxPoint( data->GetMarginBottomRight().x ,
data->GetMinMarginBottomRight().y) );
- }
- }
+ }
+ }
}
void wxMacCarbonPrintData::TransferTo( wxPrintDialogData* data )
if (m_printDialogData.GetMaxPage() < 1)
m_printDialogData.SetMaxPage(9999);
- // Create a suitable device context
+ // Create a suitable device context
wxDC *dc = NULL;
if (prompt)
{
break;
int pn;
- for (pn = m_printDialogData.GetFromPage();
+ for (pn = m_printDialogData.GetFromPage();
keepGoing && (pn <= m_printDialogData.GetToPage()) && printout->HasPage(pn);
pn++)
{
}
printout->OnEndDocument();
}
-
+
printout->OnEndPrinting();
-
+
if (sm_abortWindow)
{
sm_abortWindow->Show(false);
delete sm_abortWindow;
sm_abortWindow = NULL;
}
-
+
wxEndBusyCursor();
-
+
delete dc;
-
+
return true;
}
wxDC* wxMacPrinter::PrintDialog(wxWindow *parent)
{
wxDC* dc = (wxDC*) NULL;
-
+
wxPrintDialog dialog(parent, & m_printDialogData);
int ret = dialog.ShowModal();
-
+
if (ret == wxID_OK)
{
dc = dialog.GetPrintDC();
m_printDialogData = dialog.GetPrintDialogData();
}
-
+
return dc;
}
#if 0
wxPrintDialog dialog(parent, & m_printDialogData);
dialog.GetPrintDialogData().SetSetupDialog(true);
-
+
int ret = dialog.ShowModal();
-
+
if (ret == wxID_OK)
m_printDialogData = dialog.GetPrintDialogData();
-
+
return (ret == wxID_OK);
#endif
{
int screenWidth , screenHeight ;
wxDisplaySize( &screenWidth , &screenHeight ) ;
-
+
m_previewPrintout->SetPPIScreen( 72 , 72 ) ;
m_previewPrintout->SetPPIPrinter( 72 , 72 ) ;
m_previewPrintout->SetPageSizeMM( (int) (8.0 * 25.6), (int) (11.0 * 25.6) );
m_pageWidth = 8 * 72 ;
m_pageHeight = 11 * 72 ;
m_previewScale = 1 ;
-
+
// Get a device context for the currently selected printer
wxPrinterDC printerDC(m_printDialogData.GetPrintData());
if (printerDC.Ok())
// m_previewScale = (float)((float)screenWidth/(float)printerWidth);
// m_previewScale = m_previewScale * (float)((float)screenXRes/(float)printerXRes);
- m_previewScale = 1 ;
+ m_previewScale = 1 ;
}
#endif
#if wxUSE_STATTEXT
-#include "wx/app.h"
#include "wx/stattext.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/notebook.h"
#include "wx/tabctrl.h"
#include "wx/dc.h"
if ( m_font.MacGetThemeFontID() != kThemeCurrentPortFont )
{
err = GetThemeTextDimensions(
- (m_label.Length() > 0 ? (CFStringRef)str : CFSTR(" ")),
+ (!m_label.empty() ? (CFStringRef)str : CFSTR(" ")),
m_font.MacGetThemeFontID(), kThemeStateActive, false, &bounds, &baseline );
verify_noerr( err );
}
::TextFace( m_font.MacGetFontStyle() );
err = GetThemeTextDimensions(
- (m_label.Length() > 0 ? (CFStringRef)str : CFSTR(" ")),
+ (!m_label.empty() ? (CFStringRef)str : CFSTR(" ")),
kThemeCurrentPortFont, kThemeStateActive, false, &bounds, &baseline );
verify_noerr( err );
}
- if ( m_label.Length() == 0 )
+ if ( m_label.empty() )
bounds.h = 0;
bounds.h += MacGetLeftBorderSize() + MacGetRightBorderSize();
}
#endif //if wxUSE_STATTEXT
-
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/app.h"
#endif
#ifdef __DARWIN__
#endif
#endif
-#include "wx/app.h"
#include "wx/dc.h"
#include "wx/button.h"
#include "wx/toplevel.h"
#include "wx/menu.h"
#if defined(__BORLANDC__) && !defined(__WIN32__)
- #include <alloc.h>
+ #include <alloc.h>
#elif !defined(__MWERKS__) && !defined(__GNUWIN32) && !defined(__DARWIN__)
- #include <malloc.h>
+ #include <malloc.h>
#endif
#ifndef __DARWIN__
/////////////////////////////////////////////////////////////////////////////
-// Name: tooltip.cpp
+// Name: src/mac/carbon/tooltip.cpp
// Purpose: wxToolTip implementation
// Author: Stefan Csomor
// Id: $Id$
#if wxUSE_TOOLTIPS
-#include "wx/app.h"
+#include "wx/tooltip.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/dc.h"
#include "wx/window.h"
-#include "wx/tooltip.h"
#include "wx/timer.h"
#include "wx/geometry.h"
#include "wx/mac/uma.h"
public :
wxMacToolTip() ;
~wxMacToolTip() ;
-
+
void Setup( WindowRef window , const wxString& text , const wxPoint& localPosition ) ;
void Draw() ;
void Clear() ;
wxString m_label ;
wxPoint m_position ;
Rect m_rect ;
- WindowRef m_window ;
+ WindowRef m_window ;
PicHandle m_backpict ;
bool m_shown ;
long m_mark ;
void Notify()
{
if ( m_mark == m_tip->GetMark() )
- m_tip->Draw() ;
+ m_tip->Draw() ;
}
protected:
void wxToolTip::SetTip( const wxString &tip )
{
m_text = tip;
-
+
if ( m_window )
{
#if 0
// update it immediately
wxToolInfo ti(GetHwndOf(m_window));
ti.lpszText = (wxChar *)m_text.c_str();
-
- (void)SendTooltipMessage(GetToolTipCtrl(), TTM_UPDATETIPTEXT, 0, &ti);
+
+ (void)SendTooltipMessage(GetToolTipCtrl(), TTM_UPDATETIPTEXT, 0, &ti);
#endif
}
}
if ( s_ShowToolTips != flag )
{
s_ShowToolTips = flag ;
-
+
if ( s_ShowToolTips )
{
}
s_ToolTip.Clear() ;
s_ToolTipArea = wxRect2DInt( event.m_x - 2 , event.m_y - 2 , 4 , 4 ) ;
s_LastWindowEntered = win ;
-
+
WindowRef window = MAC_WXHWND( win->MacGetTopLevelWindowRef() ) ;
int x = event.m_x ;
int y = event.m_y ;
m_shown = false ;
}
-void wxMacToolTip::Setup( WindowRef win , const wxString& text , const wxPoint& localPosition )
+void wxMacToolTip::Setup( WindowRef win , const wxString& text , const wxPoint& localPosition )
{
m_mark++ ;
m_timer = new wxMacToolTipTimer( this , s_ToolTipDelay ) ;
}
-wxMacToolTip::~wxMacToolTip()
+wxMacToolTip::~wxMacToolTip()
{
if ( m_timer )
{
m_timer = NULL;
}
- if ( m_backpict )
+ if ( m_backpict )
Clear() ;
}
void wxMacToolTip::Draw()
{
- if ( m_label.Length() == 0 )
+ if ( m_label.empty() )
return ;
-
+
if ( m_window == s_ToolTipWindowRef )
{
m_shown = true ;
short height = 0 ;
int i = 0 ;
- int length = m_label.Length() ;
+ int length = m_label.length() ;
int width = 0 ;
int thiswidth = 0 ;
int laststop = 0 ;
m_rect.bottom = r.bottom ;
}
- GWorldPtr port ;
- CGrafPtr origPort ;
- GDHandle origDevice ;
+ GWorldPtr port ;
+ CGrafPtr origPort ;
+ GDHandle origDevice ;
ClipRect( &m_rect ) ;
BackColor( whiteColor ) ;
m_backpict = OpenPicture(&m_rect);
- CopyBits(GetPortBitMapForCopyBits(GetWindowPort(m_window)),
- GetPortBitMapForCopyBits(port),
- &m_rect,
- &m_rect,
- srcCopy,
+ CopyBits(GetPortBitMapForCopyBits(GetWindowPort(m_window)),
+ GetPortBitMapForCopyBits(port),
+ &m_rect,
+ &m_rect,
+ srcCopy,
NULL);
ClosePicture();
SetGWorld( origPort , origDevice ) ;
FrameRect( &m_rect ) ;
SetThemeTextColor(kThemeTextColorNotification,wxDisplayDepth(),true) ;
::MoveTo( m_rect.left + kTipBorder , m_rect.top + fontInfo.ascent + kTipBorder);
-
+
i = 0 ;
laststop = 0 ;
height = 0 ;
-
+
while ( i < length )
{
if ( text[i] == 13 || text[i] == 10)
}
::DrawText( text , laststop , i - laststop ) ;
- ::TextMode( srcOr ) ;
+ ::TextMode( srcOr ) ;
#endif
}
}
-void wxToolTip::NotifyWindowDelete( WXHWND win )
+void wxToolTip::NotifyWindowDelete( WXHWND win )
{
if ( win == s_ToolTipWindowRef )
s_ToolTipWindowRef = NULL ;
if ( !m_shown )
return ;
-
+
#if TARGET_CARBON
HMHideTag() ;
m_helpTextRef.Release() ;
-#else
+#else
if ( m_window == s_ToolTipWindowRef && m_backpict )
{
wxMacPortStateHelper help( (GrafPtr)GetWindowPort( m_window ) ) ;
}
#endif
-
#include "wx/mac/uma.h"
#include "wx/mac/aga.h"
-#include "wx/app.h"
#include "wx/tooltip.h"
#include "wx/dnd.h"
unsigned char charCode ;
wxChar uniChar[2] ;
- uniChar[0] = 0;
- uniChar[1] = 0;
-
+ uniChar[0] = 0;
+ uniChar[1] = 0;
+
UInt32 keyCode ;
UInt32 modifiers ;
Point point ;
if ( numChars * 2 > 4 )
charBuf = new UniChar[ numChars ] ;
GetEventParameter( event, kEventParamKeyUnicodes, typeUnicodeText, NULL, dataSize , NULL , charBuf ) ;
- charBuf[ numChars - 1 ] = 0;
+ charBuf[ numChars - 1 ] = 0;
#if SIZEOF_WCHAR_T == 2
uniChar = charBuf[0] ;
return 0;
}
-
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/apptrait.h"
#if wxUSE_GUI
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/menu.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
#include "wx/utils.h"
-#include "wx/app.h"
#include "wx/panel.h"
#include "wx/layout.h"
#include "wx/dialog.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/frame.h"
#include "wx/bitmap.h"
#include "wx/utils.h"
bool wxClipboard::Flush()
{
- return FALSE;
+ return false;
}
bool wxClipboard::Open()
{
- wxCHECK_MSG( !m_open, FALSE, wxT("clipboard already open") );
+ wxCHECK_MSG( !m_open, false, wxT("clipboard already open") );
m_open = true ;
return true ;
}
bool wxClipboard::SetData( wxDataObject *data )
{
- wxCHECK_MSG( m_open, FALSE, wxT("clipboard not open") );
+ wxCHECK_MSG( m_open, false, wxT("clipboard not open") );
- wxCHECK_MSG( data, FALSE, wxT("data is invalid") );
+ wxCHECK_MSG( data, false, wxT("data is invalid") );
Clear();
// as we can only store one wxDataObject, this is the same in this
bool wxClipboard::AddData( wxDataObject *data )
{
- wxCHECK_MSG( m_open, FALSE, wxT("clipboard not open") );
+ wxCHECK_MSG( m_open, false, wxT("clipboard not open") );
- wxCHECK_MSG( data, FALSE, wxT("data is invalid") );
+ wxCHECK_MSG( data, false, wxT("data is invalid") );
/* we can only store one wxDataObject */
Clear();
{
if (( err = GetScrapFlavorSize( scrapRef, dataFormat.GetFormatId(), &byteCount )) == noErr)
{
- return TRUE ;
+ return true ;
}
}
}
- return FALSE;
+ return false;
#else
long offset ;
bool wxClipboard::GetData( wxDataObject& data )
{
- wxCHECK_MSG( m_open, FALSE, wxT("clipboard not open") );
+ wxCHECK_MSG( m_open, false, wxT("clipboard not open") );
size_t formatcount = data.GetFormatCount() + 1 ;
wxDataFormat *array = new wxDataFormat[ formatcount ];
#endif
#include "wx/control.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/panel.h"
-#include "wx/app.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
#include "wx/notebook.h"
{
if ( IsKindOf( CLASSINFO( wxButton ) ) )
{
- m_width = m_label.Length() * 8 + 12 ;
+ m_width = m_label.length() * 8 + 12 ;
if ( m_width < 70 )
m_width = 70 ;
}
else if ( IsKindOf( CLASSINFO( wxStaticText ) ) )
{
- m_width = m_label.Length() * 8 ;
+ m_width = m_label.length() * 8 ;
}
else
m_width = bestsize.right - bestsize.left ;
#pragma hdrstop
#endif
-#include "wx/app.h"
#include "wx/cursor.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/icon.h"
#include "wx/image.h"
#include "wx/xpmdecod.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/mac/uma.h"
#include "wx/dcmemory.h"
#include "wx/dcprint.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: dialog.cpp
+// Name: src/mac/classic/dialog.cpp
// Purpose: wxDialog class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#include "wx/wxprec.h"
+
#include "wx/dialog.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/utils.h"
#include "wx/frame.h"
-#include "wx/app.h"
#include "wx/settings.h"
#include "wx/mac/uma.h"
if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) )
- return FALSE;
+ return false;
MacCreateRealWindow( title , pos , size , MacRemoveBordersFromStyle(style) & ~(wxYES|wxOK|wxNO|wxCANCEL) , name ) ;
m_macWindowBackgroundTheme = kThemeBrushDialogBackgroundActive ;
SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ;
- return TRUE;
+ return true;
}
void wxDialog::SetModal(bool flag)
wxDialog::~wxDialog()
{
- m_isBeingDeleted = TRUE;
- Show(FALSE);
+ m_isBeingDeleted = true;
+ Show(false);
}
// By default, pressing escape cancels the dialog , on mac command-stop does the same thing
if ( !wxDialogBase::Show(show) )
{
// nothing to do
- return FALSE;
+ return false;
}
if ( show )
}
else // end of modal dialog
{
- // this will cause IsModalShowing() return FALSE and our local
+ // this will cause IsModalShowing() return false and our local
// message loop will terminate
wxModalDialogs.DeleteObject(this);
}
}
- return TRUE;
+ return true;
}
#if !TARGET_CARBON
}
-// Replacement for Show(TRUE) for modal dialogs - returns return code
+// Replacement for Show(true) for modal dialogs - returns return code
int wxDialog::ShowModal()
{
if ( !IsModal() )
{
- SetModal(TRUE);
+ SetModal(true);
}
- Show(TRUE);
+ Show(true);
return GetReturnCode();
}
// dialogs and should work for both of them
void wxDialog::EndModal(int retCode)
{
- SetReturnCode(retCode);
- Show(FALSE);
+ SetReturnCode(retCode);
+ Show(false);
}
// Standard buttons
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
Refresh();
}
-
#if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/window.h"
#include "wx/toplevel.h"
-#include "wx/app.h"
#include "wx/gdicmn.h"
#include "wx/mac/private.h"
{
theData[dataSize]=0 ;
wxString convert( theData , wxConvLocal ) ;
- m_dataObject->SetData( format, convert.Length() * sizeof(wxChar), (const wxChar*) convert );
+ m_dataObject->SetData( format, convert.length() * sizeof(wxChar), (const wxChar*) convert );
}
else if ( theType == kDragFlavorTypeHFS )
{
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/tokenzr.h"
#include "wx/filename.h"
#ifndef __DARWIN__
- #include "PLStringFuncs.h"
+ #include "PLStringFuncs.h"
#endif
IMPLEMENT_CLASS(wxFileDialog, wxFileDialogBase)
wxString file = wxMacMakeStringFromPascal( spec.name ) ;
display = CheckFile( file , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
}
- #if TARGET_CARBON
+#if TARGET_CARBON
else if ( theItem->descriptorType == typeFSRef )
{
FSRef fsref ;
/////////////////////////////////////////////////////////////////////////////
-// Name: frame.cpp
+// Name: src/mac/classic/frame.cpp
// Purpose: wxFrame
// Author: Stefan Csomor
// Modified by:
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#include "wx/wxprec.h"
+
#include "wx/frame.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/statusbr.h"
#include "wx/toolbar.h"
#include "wx/menuitem.h"
#include "wx/dcclient.h"
#include "wx/dialog.h"
#include "wx/settings.h"
-#include "wx/app.h"
#include "wx/mac/uma.h"
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
-#define WX_MAC_STATUSBAR_HEIGHT 15
+#define WX_MAC_STATUSBAR_HEIGHT 15
// ----------------------------------------------------------------------------
// creation/destruction
// ----------------------------------------------------------------------------
void wxFrame::Init()
{
m_frameMenuBar = NULL;
-
+
#if wxUSE_TOOLBAR
m_frameToolBar = NULL ;
#endif
m_frameStatusBar = NULL;
m_winLastFocused = NULL ;
-
- m_iconized = FALSE;
-
+
+ m_iconized = false;
+
#if wxUSE_TOOLTIPS
m_hwndToolTip = 0;
#endif
const wxString& name)
{
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE));
-
+
if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) )
- return FALSE;
-
+ return false;
+
MacCreateRealWindow( title, pos , size , MacRemoveBordersFromStyle(style) , name ) ;
m_macWindowBackgroundTheme = kThemeBrushDocumentWindowBackground ;
SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ;
wxModelessWindows.Append(this);
-
- return TRUE;
+
+ return true;
}
wxFrame::~wxFrame()
{
- m_isBeingDeleted = TRUE;
+ m_isBeingDeleted = true;
DeleteAllBars();
}
bool wxFrame::Enable(bool enable)
{
if ( !wxWindow::Enable(enable) )
- return FALSE;
+ return false;
if ( m_frameMenuBar && m_frameMenuBar == wxMenuBar::MacGetInstalledMenuBar() )
{
- int iMaxMenu = m_frameMenuBar->GetMenuCount();
+ int iMaxMenu = m_frameMenuBar->GetMenuCount();
for ( int i = 0 ; i < iMaxMenu ; ++ i )
{
m_frameMenuBar->EnableTop( i , enable ) ;
}
}
- return TRUE;
+ return true;
}
wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
GetClientSize(&w, &h);
int sw, sh;
m_frameStatusBar->GetSize(&sw, &sh);
-
+
// Since we wish the status bar to be directly under the client area,
// we use the adjusted sizes without using wxSIZE_NO_ADJUSTMENTS.
m_frameStatusBar->SetSize(0, h, w, sh);
void wxFrame::DoGetClientSize(int *x, int *y) const
{
wxWindow::DoGetClientSize( x , y ) ;
-
+
#if wxUSE_STATUSBAR
if ( GetStatusBar() && y )
{
*y -= statusY;
}
#endif // wxUSE_STATUSBAR
-
+
wxPoint pt(GetClientAreaOrigin());
if ( y )
*y -= pt.y;
- if ( x )
+ if ( x )
*x -= pt.x;
}
{
int currentclientwidth , currentclientheight ;
int currentwidth , currentheight ;
-
+
GetClientSize( ¤tclientwidth , ¤tclientheight ) ;
GetSize( ¤twidth , ¤theight ) ;
-
+
// find the current client size
// Find the difference between the entire window (title bar and all)
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/button.h"
#include "wx/settings.h"
#include "wx/toplevel.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/menuitem.h"
#include "wx/window.h"
#include "wx/utils.h"
void wxMenu::Init()
{
- m_doBreak = FALSE;
+ m_doBreak = false;
m_startRadioGroup = -1;
// create the menu
{
GetMenuBar()->Refresh();
}
- return TRUE ;
+ return true ;
}
void wxMenu::EndRadioGroup()
{
wxCHECK_MSG( item, NULL, _T("NULL item in wxMenu::DoAppend") );
- bool check = FALSE;
+ bool check = false;
if ( item->GetKind() == wxITEM_RADIO )
{
item->SetRadioGroupEnd(m_startRadioGroup);
// ensure that we have a checked item in the radio group
- check = TRUE;
+ check = true;
}
else // extend the current radio group
{
if ( check )
{
// check the item initially
- item->Check(TRUE);
+ item->Check(true);
}
return item;
}
bool wxMenu::ProcessCommand(wxCommandEvent & event)
{
- bool processed = FALSE;
+ bool processed = false;
// Try the menu's event handler
if ( !processed && GetEventHandler())
{
wxMenu *menuOld = wxMenuBarBase::Replace(pos, menu, title);
if ( !menuOld )
- return FALSE;
+ return NULL;
m_titles[pos] = title;
if ( IsAttached() )
bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
{
if ( !wxMenuBarBase::Insert(pos, menu, title) )
- return FALSE;
+ return false;
m_titles.Insert(title, pos);
Refresh();
}
- return TRUE;
+ return true;
}
wxMenu *wxMenuBar::Remove(size_t pos)
bool wxMenuBar::Append(wxMenu *menu, const wxString& title)
{
WXHMENU submenu = menu ? menu->GetHMenu() : 0;
- wxCHECK_MSG( submenu, FALSE, wxT("can't append invalid menu to menubar") );
+ wxCHECK_MSG( submenu, false, wxT("can't append invalid menu to menubar") );
if ( !wxMenuBarBase::Append(menu, title) )
- return FALSE;
+ return false;
m_titles.Add(title);
if (m_invokingWindow)
wxMenubarSetInvokingWindow( menu, m_invokingWindow );
- return TRUE;
+ return true;
}
static void wxMenubarUnsetInvokingWindow( wxMenu *menu )
///////////////////////////////////////////////////////////////////////////////
-// Name: menuitem.cpp
+// Name: src/mac/classic/menuitem.cpp
// Purpose: wxMenuItem implementation
// Author: Stefan Csomor
-// Modified by:
+// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// headers & declarations
// ============================================================================
-#include "wx/app.h"
-#include "wx/menu.h"
+#include "wx/wxprec.h"
+
#include "wx/menuitem.h"
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
+#include "wx/menu.h"
+
#include "wx/mac/uma.h"
// ============================================================================
// implementation
const wxString& text,
const wxString& strHelp,
wxItemKind kind,
- wxMenu *pSubMenu)
+ wxMenu *pSubMenu)
: wxMenuItemBase(pParentMenu, id, text, strHelp, kind, pSubMenu)
{
// TO DISCUSS on dev : whether we can veto id 0
// wxASSERT_MSG( id != 0 || pSubMenu != NULL , wxT("A MenuItem ID of Zero does not work under Mac") ) ;
-
+
// In other languages there is no difference in naming the Exit/Quit menu item between MacOS and Windows guidelines
// therefore these item must not be translated
if ( wxStripMenuCodes(m_text).Upper() == wxT("EXIT") )
}
m_radioGroup.start = -1;
- m_isRadioGroupStart = FALSE;
+ m_isRadioGroupStart = false;
}
-wxMenuItem::~wxMenuItem()
+wxMenuItem::~wxMenuItem()
{
}
// change item state
// -----------------
-void wxMenuItem::SetBitmap(const wxBitmap& bitmap)
-{
- m_bitmap = bitmap;
+void wxMenuItem::SetBitmap(const wxBitmap& bitmap)
+{
+ m_bitmap = bitmap;
UpdateItemBitmap() ;
}
-void wxMenuItem::UpdateItemBitmap()
+void wxMenuItem::UpdateItemBitmap()
{
if ( !m_parentMenu )
return ;
-
+
MenuHandle mhandle = MAC_WXHMENU(m_parentMenu->GetHMenu()) ;
MenuItemIndex index = m_parentMenu->MacGetIndexFromItem( this ) ;
if( mhandle == NULL || index == 0)
return ;
-
+
if ( m_bitmap.Ok() )
{
ControlButtonContentInfo info ;
if ( info.contentType != kControlNoContent )
{
if ( info.contentType == kControlContentCIconHandle )
- SetMenuItemIconHandle( mhandle , index ,
+ SetMenuItemIconHandle( mhandle , index ,
kMenuColorIconType , (Handle) info.u.cIconHandle ) ;
}
-
+
}
}
-void wxMenuItem::UpdateItemStatus()
+void wxMenuItem::UpdateItemStatus()
{
if ( !m_parentMenu )
return ;
-
+
#if TARGET_CARBON
if ( UMAGetSystemVersion() >= 0x1000 && GetId() == wxApp::s_macPreferencesMenuItemId)
{
EnableMenuCommand( NULL , kHICommandQuit ) ;
}
#endif
- {
+ {
MenuHandle mhandle = MAC_WXHMENU(m_parentMenu->GetHMenu()) ;
MenuItemIndex index = m_parentMenu->MacGetIndexFromItem( this ) ;
if( mhandle == NULL || index == 0)
else
::SetItemMark( mhandle , index , 0 ) ; // no mark
- UMASetMenuItemText( mhandle , index , m_text , wxFont::GetDefaultEncoding() ) ;
+ UMASetMenuItemText( mhandle , index , m_text , wxFont::GetDefaultEncoding() ) ;
wxAcceleratorEntry *entry = wxGetAccelFromString( m_text ) ;
UMASetMenuItemShortcut( mhandle , index , entry ) ;
delete entry ;
}
}
-void wxMenuItem::UpdateItemText()
+void wxMenuItem::UpdateItemText()
{
if ( !m_parentMenu )
return ;
-
+
MenuHandle mhandle = MAC_WXHMENU(m_parentMenu->GetHMenu()) ;
MenuItemIndex index = m_parentMenu->MacGetIndexFromItem( this ) ;
if( mhandle == NULL || index == 0)
return ;
- UMASetMenuItemText( mhandle , index , m_text , wxFont::GetDefaultEncoding() ) ;
- wxAcceleratorEntry *entry = wxGetAccelFromString( m_text ) ;
+ UMASetMenuItemText( mhandle , index , m_text , wxFont::GetDefaultEncoding() ) ;
+ wxAcceleratorEntry *entry = wxGetAccelFromString( m_text ) ;
UMASetMenuItemShortcut( mhandle , index , entry ) ;
delete entry ;
}
void wxMenuItem::Enable(bool bDoEnable)
{
- if ( m_isEnabled != bDoEnable )
+ if ( m_isEnabled != bDoEnable )
{
wxMenuItemBase::Enable( bDoEnable ) ;
UpdateItemStatus() ;
}
void wxMenuItem::UncheckRadio()
{
- if ( m_isChecked )
+ if ( m_isChecked )
{
wxMenuItemBase::Check( false ) ;
UpdateItemStatus() ;
{
wxCHECK_RET( IsCheckable(), wxT("only checkable items may be checked") );
- if ( m_isChecked != bDoCheck )
+ if ( m_isChecked != bDoCheck )
{
if ( GetKind() == wxITEM_RADIO )
{
{
wxMenuItemBase::Check( bDoCheck ) ;
UpdateItemStatus() ;
-
+
// get the index of this item in the menu
const wxMenuItemList& items = m_parentMenu->GetMenuItems();
int pos = items.IndexOf(this);
return;
wxMenuItemBase::SetText(text);
-
+
UpdateItemText() ;
}
void wxMenuItem::SetAsRadioGroupStart()
{
- m_isRadioGroupStart = TRUE;
+ m_isRadioGroupStart = true;
}
void wxMenuItem::SetRadioGroupStart(int start)
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_METAFILE
+#include "wx/metafile.h"
+
#ifndef WX_PRECOMP
-#include "wx/utils.h"
-#include "wx/app.h"
+ #include "wx/utils.h"
+ #include "wx/app.h"
#endif
-#include "wx/metafile.h"
#include "wx/clipbrd.h"
#include "wx/mac/private.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/mac/uma.h"
IMPLEMENT_CLASS(wxMessageDialog, wxDialog)
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/imaglist.h"
#include "wx/image.h"
#include "wx/mac/uma.h"
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#include "wx/app.h"
+#include "wx/wxprec.h"
+
#include "wx/stattext.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/notebook.h"
#include "wx/tabctrl.h"
#include "wx/dc.h"
#if wxUSE_TEXTCTRL
+#include "wx/textctrl.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#ifdef __DARWIN__
- #include <sys/types.h>
- #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
#else
- #include <stat.h>
+ #include <stat.h>
#endif
#include "wx/msgdlg.h"
#endif
#endif
-#include "wx/app.h"
#include "wx/dc.h"
#include "wx/button.h"
#include "wx/toplevel.h"
-#include "wx/textctrl.h"
#include "wx/notebook.h"
#include "wx/tabctrl.h"
#include "wx/settings.h"
#include "wx/utils.h"
#if defined(__BORLANDC__) && !defined(__WIN32__)
- #include <alloc.h>
+ #include <alloc.h>
#elif !defined(__MWERKS__) && !defined(__GNUWIN32) && !defined(__DARWIN__)
- #include <malloc.h>
+ #include <malloc.h>
#endif
#ifndef __DARWIN__
#if wxUSE_TOOLTIPS
-#include "wx/app.h"
+#include "wx/tooltip.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/dc.h"
#include "wx/window.h"
-#include "wx/tooltip.h"
#include "wx/timer.h"
#include "wx/geometry.h"
#include "wx/mac/uma.h"
void wxMacToolTip::Draw()
{
- if ( m_label.Length() == 0 )
+ if ( m_label.empty() )
return ;
if ( m_window == s_ToolTipWindowRef )
short height = 0 ;
int i = 0 ;
- int length = m_label.Length() ;
+ int length = m_label.length() ;
int width = 0 ;
int thiswidth = 0 ;
int laststop = 0 ;
#include "wx/mac/uma.h"
#include "wx/mac/aga.h"
-#include "wx/app.h"
#include "wx/tooltip.h"
#include "wx/dnd.h"
#if wxUSE_SYSTEM_OPTIONS
m_macUsesCompositing = false ;
#if TARGET_CARBON
m_macEventHandler = NULL ;
- #endif
+#endif
}
class wxMacDeferredWindowDeleter : public wxObject
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/apptrait.h"
#if wxUSE_GUI
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/menu.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
#include "wx/utils.h"
-#include "wx/app.h"
#include "wx/panel.h"
#include "wx/layout.h"
#include "wx/dialog.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: app.cpp
+// Name: src/mgl/app.cpp
// Author: Vaclav Slavik
// based on GTK and MSW implementations
// Id: $Id$
#pragma hdrstop
#endif
+#include "wx/app.h"
#ifndef WX_PRECOMP
#include "wx/settings.h"
#include "wx/intl.h"
#endif
-#include "wx/app.h"
#include "wx/evtloop.h"
#include "wx/module.h"
#include "wx/fontutil.h"
wxModule::RegisterModule(new wxMGLFinalCleanup);
}
-
#if wxUSE_CLIPBOARD
-#include "wx/app.h"
+#include "wx/clipbrd.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/bitmap.h"
#include "wx/utils.h"
-#include "wx/clipbrd.h"
#include "wx/dataobj.h"
#include "wx/ptr_scpd.h"
#include "wx/colour.h"
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/gdicmn.h"
-#include "wx/app.h"
#ifdef __VMS__
#pragma message disable nosimpint
#endif
#include "wx/cursor.h"
-#include "wx/app.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/utils.h"
#include "wx/window.h"
#if wxUSE_CLIPBOARD
#include "wx/dataobj.h"
-#include "wx/app.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/utils.h"
#ifdef __VMS__
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/dcmemory.h"
#include "wx/window.h"
-#include "wx/app.h"
#include "wx/image.h"
#include "wx/math.h"
#endif
#include "wx/dialog.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/utils.h"
-#include "wx/app.h"
#include "wx/settings.h"
#include "wx/evtloop.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/window.h"
-#include "wx/app.h"
#include "wx/gdicmn.h"
#include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/event.h"
+ #include "wx/app.h"
#endif //WX_PRECOMP
#include "wx/evtloop.h"
-#include "wx/app.h"
#include "wx/window.h"
#ifdef __VMS__
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/app.h"
#endif
#include "wx/utils.h"
-#include "wx/app.h"
#include "wx/settings.h"
#include "wx/tokenzr.h"
#include "wx/stockitem.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/statusbr.h"
#include "wx/menu.h"
#include "wx/settings.h"
#include "wx/utils.h"
-#include "wx/app.h"
#include "wx/icon.h"
#ifdef __VMS__
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/menuitem.h"
#include "wx/utils.h"
-#include "wx/app.h"
#include "wx/frame.h"
#include "wx/settings.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/motif/private.h"
#include "wx/settings.h"
#include "wx/wxprec.h"
#include "wx/palette.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/window.h"
-#include "wx/app.h"
#include "wx/utils.h"
#ifdef __VMS__
/////////////////////////////////////////////////////////////////////////////
-// Name: popupwin.cpp
+// Name: src/motif/popupwin.cpp
// Purpose: wxPopupWindow implementation
// Author: Mattia barbon
// Modified by:
// Created: 28.08.03
// RCS-ID: $Id$
// Copyright: (c) Mattia barbon
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/popupwin.h"
-#include "wx/app.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
#ifdef __VMS__
#pragma message disable nosimpint
#include "wx/wxprec.h"
#include "wx/settings.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/gdicmn.h"
-#include "wx/app.h"
#ifdef __VMS__
#pragma message disable nosimpint
/////////////////////////////////////////////////////////////////////////////
-// Name: timer.cpp
+// Name: src/motif/timer.cpp
// Purpose: wxTimer implementation
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/timer.h"
-#include "wx/app.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/hashmap.h"
#ifdef __VMS__
return;
if (timer->m_id == 0)
- return; // Avoid to process spurious timer events
+ return; // Avoid to process spurious timer events
if (!timer->m_oneShot)
timer->m_id = XtAppAddTimeOut((XtAppContext) wxTheApp->GetAppContext(),
}
m_milli = 0 ;
}
-
-
#define XtDisplay XTDISPLAY
#endif
+#include "wx/toolbar.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/settings.h"
-#include "wx/app.h"
#include "wx/timer.h"
-#include "wx/toolbar.h"
#include "wx/frame.h"
#ifdef __VMS__
/************************************************************/
XtPopup (help_popup, XtGrabNone);
}
-
#include "wx/wxprec.h"
#include "wx/toplevel.h"
-#include "wx/app.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
#ifdef __VMS__
#define XtDisplay XTDISPLAY
#endif
#include "wx/utils.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/apptrait.h"
-#include "wx/app.h"
#include "wx/dcmemory.h"
#include "wx/bitmap.h"
#include "wx/evtloop.h"
#ifndef WX_PRECOMP
#include "wx/hash.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/menu.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
#include "wx/utils.h"
-#include "wx/app.h"
#include "wx/layout.h"
#include "wx/button.h"
#include "wx/settings.h"
#include "wx/string.h"
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/apptrait.h"
#include "wx/process.h"
#include "wx/confbase.h" // for wxExpandEnvVars()
-#include "wx/app.h"
#include "wx/cmdline.h"
#include "wx/filename.h"
#include "wx/wfstream.h"
#if wxUSE_COMBOBOX
+#include "wx/combobox.h"
+
#ifndef WX_PRECOMP
#include "wx/settings.h"
#include "wx/log.h"
// for wxEVT_COMMAND_TEXT_ENTER
#include "wx/textctrl.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
-#include "wx/combobox.h"
#include "wx/brush.h"
#include "wx/clipbrd.h"
#include "wx/msw/private.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: msw/dialup.cpp
+// Name: src/msw/dialup.cpp
// Purpose: MSW implementation of network/dialup classes and functions
// Author: Vadim Zeitlin
// Modified by:
#if wxUSE_DIALUP_MANAGER
+#include "wx/dialup.h"
+
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/intl.h"
#include "wx/event.h"
+ #include "wx/app.h"
#endif
#include "wx/timer.h"
-#include "wx/app.h"
#include "wx/generic/choicdgg.h"
#include "wx/dynlib.h"
-#include "wx/dialup.h"
#include "wx/module.h"
DEFINE_EVENT_TYPE(wxEVT_DIALUP_CONNECTED)
#endif // __BORLANDC__
#endif // wxUSE_DIALUP_MANAGER
-
///////////////////////////////////////////////////////////////////////////////
-// Name: msw/gdiimage.cpp
+// Name: src/msw/gdiimage.cpp
// Purpose: wxGDIImage implementation
// Author: Vadim Zeitlin
// Modified by:
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif // WX_PRECOMP
#include "wx/msw/private.h"
-#include "wx/app.h"
-
#include "wx/bitmap.h"
#include "wx/msw/gdiimage.h"
}
#endif // __WXMICROWIN__
-
#ifndef WX_PRECOMP
#include "wx/event.h"
+ #include "wx/app.h"
#endif //WX_PRECOMP
-#include "wx/app.h"
#include "wx/cmdline.h"
#include "wx/scopeguard.h"
#include "wx/dc.h"
#include "wx/log.h"
#include "wx/event.h"
+ #include "wx/app.h"
#endif // WX_PRECOMP
#include "wx/imaglist.h"
#include "wx/control.h"
-#include "wx/app.h"
#include "wx/sysopt.h"
#include "wx/dcclient.h"
#include "wx/dcmemory.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/event.h"
+ #include "wx/app.h"
#endif //WX_PRECOMP
-#include "wx/app.h"
-
#include "wx/msw/registry.h"
#include "wx/msw/regconf.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: msw/spinbutt.cpp
+// Name: src/msw/spinbutt.cpp
// Purpose: wxSpinButton
// Author: Julian Smart
// Modified by:
#endif
#ifndef WX_PRECOMP
-#include "wx/app.h"
+ #include "wx/app.h"
#endif
#if wxUSE_SPINBTN
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_TAB_DIALOG
#ifndef WX_PRECOMP
-#include "wx/wx.h"
+ #include "wx/wx.h"
+ #include "wx/app.h"
#endif
#include "wx/msw/private.h"
#include "wx/msw/wrapcctl.h"
#include "wx/tabctrl.h"
-#include "wx/app.h"
#include "wx/msw/imaglist.h"
IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl)
#include "wx/bitmap.h"
#include "wx/dcmemory.h"
#include "wx/control.h"
+ #include "wx/app.h" // for GetComCtl32Version
#endif
#include "wx/toolbar.h"
// include <commctrl.h> "properly"
#include "wx/msw/wrapcctl.h"
-#include "wx/app.h" // for GetComCtl32Version
-
// this define controls whether the code for button colours remapping (only
// useful for 16 or 256 colour images) is active at all, it's always turned off
// for CE where it doesn't compile (and is probably not needed anyhow) and may
#pragma hdrstop
#endif
+#if wxUSE_THREADS
+
+#include "wx/thread.h"
+
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/app.h"
#endif
-#if wxUSE_THREADS
-
#include "wx/apptrait.h"
#include "wx/scopeguard.h"
#include "wx/except.h"
#include "wx/module.h"
-#include "wx/thread.h"
// must have this symbol defined to get _beginthread/_endthread declarations
#ifndef _MT
#include "wx/thrimpl.cpp"
#endif // wxUSE_THREADS
-
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/msw/private.h"
// comctl32.dll versions
#define wxUSE_COMCTL32_SAFELY 0
-#include "wx/app.h"
#include "wx/imaglist.h"
#include "wx/settings.h"
#include "wx/msw/dragimag.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#include "wx/accel.h"
+
#ifndef WX_PRECOMP
-#include <stdio.h>
-#include "wx/window.h"
-#include "wx/app.h"
-#include "wx/frame.h"
+ #include <stdio.h>
+ #include "wx/window.h"
+ #include "wx/app.h"
+ #include "wx/frame.h"
#endif
-#include "wx/os2/accel.h"
-
#include "wx/os2/private.h"
wxAcceleratorRefData::wxAcceleratorRefData()
{
- m_ok = FALSE;
+ m_ok = false;
m_hAccel = 0;
} // end of wxAcceleratorRefData::wxAcceleratorRefData
return (WXHACCEL) M_ACCELDATA->m_hAccel;
}
-bool wxAcceleratorTable::Translate(
- WXHWND hWnd
-, WXMSG* pWxmsg
-) const
+bool wxAcceleratorTable::Translate( WXHWND hWnd,
+ WXMSG* pWxmsg ) const
{
- PQMSG pMsg = (PQMSG)pWxmsg;
- BOOL rc = FALSE;
+ PQMSG pMsg = (PQMSG)pWxmsg;
+ BOOL rc = FALSE;
rc = ::WinTranslateAccel( vHabmain
,(HWND)hWnd
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/window.h"
-#include "wx/app.h"
#include "wx/os2/private.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: dcmemory.cpp
+// Name: src/os2/dcmemory.cpp
// Purpose: wxMemoryDC class
// Author: David Webster
// Modified by:
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
-#include "wx/utils.h"
-#include "wx/app.h"
-#include "wx/log.h"
+ #include "wx/utils.h"
+ #include "wx/app.h"
+ #include "wx/log.h"
#endif
#include "wx/os2/private.h"
{
m_hPS = NULLHANDLE;
m_hDC = NULLHANDLE;
- m_ok = FALSE;
- m_bOwnsDC = FALSE;
+ m_ok = false;
+ m_bOwnsDC = false;
}
}
else
{
m_hPS = NULLHANDLE;
m_hDC = NULLHANDLE;
- m_ok = FALSE;
- m_bOwnsDC = FALSE;
+ m_ok = false;
+ m_bOwnsDC = false;
}
//
#if wxUSE_DRAG_AND_DROP
+#include "wx/dnd.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/window.h"
-#include "wx/app.h"
#include "wx/gdicmn.h"
-#include "wx/dnd.h"
#define INCL_PM
#define INCL_DOS
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/app.h"
#endif // WX_PRECOMP
#include "wx/os2/private.h"
-#include "wx/app.h"
#include "wx/os2/gdiimage.h"
#include "wx/listimpl.cpp"
#if wxUSE_METAFILE
#ifndef WX_PRECOMP
-#include "wx/utils.h"
-#include "wx/app.h"
+ #include "wx/utils.h"
+ #include "wx/app.h"
#endif
#include "wx/metafile.h"
if (!alreadyOpen)
{
wxOpenClipboard();
- if (!wxEmptyClipboard()) return FALSE;
+ if (!wxEmptyClipboard()) return false;
}
bool success = wxSetClipboardData(wxDF_METAFILE, this, width,height);
if (!alreadyOpen) wxCloseClipboard();
bool wxMetafile::Play(wxDC *dc)
{
if (!m_refData)
- return FALSE;
+ return false;
// if (dc->GetHDC() && M_METAFILEDATA->m_metafile)
// PlayMetaFile((HDC) dc->GetHDC(), (HMETAFILE) M_METAFILEDATA->m_metafile);
FILE *fd = fopen(filename.fn_str(), "rb");
if (!fd)
- return FALSE;
+ return false;
wxChar tempFileBuf[256];
wxGetTempFileName(wxT("mf"), tempFileBuf);
FILE *fHandle = fopen(wxConvFile.cWX2MB(tempFileBuf), "wb");
if (!fHandle)
- return FALSE;
+ return false;
fwrite((void *)&header, sizeof(unsigned char), sizeof(mfPLACEABLEHEADER), fHandle);
// Calculate origin and extent
/////////////////////////////////////////////////////////////////////////////
-// File: region.cpp
+// File: src/os2/region.cpp
// Purpose: Region class
// Author: David Webster
// Modified by:
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/app.h"
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/os2/region.h"
#include "wx/gdicmn.h"
#include "wx/window.h"
#include "wx/os2/private.h"
- IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject)
- IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator, wxObject)
+IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject)
+IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator, wxObject)
//-----------------------------------------------------------------------------
// wxRegionRefData implementation
//# Modify region
//-----------------------------------------------------------------------------
-bool wxRegion::Offset(
- wxCoord x
-, wxCoord y
-)
+bool wxRegion::Offset( wxCoord x, wxCoord y )
{
if ( !x && !y )
{
// nothing to do
- return TRUE;
+ return true;
}
AllocExclusive();
{
wxLogLastError(_T("OffsetRgn"));
- return FALSE;
+ return false;
}
#endif
- return TRUE;
+ return true;
}
//
//
// Union region with this.
//
-bool wxRegion::Combine(
- const wxRegion& rRegion
-, wxRegionOp eOp
-)
+bool wxRegion::Combine( const wxRegion& rRegion, wxRegionOp eOp )
{
//
// We can't use the API functions if we don't have a valid region handle
case wxRGN_AND:
case wxRGN_DIFF:
// leave empty/invalid
- return FALSE;
+ return false;
}
}
else // we have a valid region
,lMode
) != RGN_ERROR);
}
- return TRUE;
+ return true;
} // end of wxRegion::Combine
bool wxRegion::Combine(
//
bool wxRegion::Empty() const
{
- wxCoord x;
- wxCoord y;
- wxCoord vWidth;
- wxCoord vHeight;
+ wxCoord x;
+ wxCoord y;
+ wxCoord vWidth;
+ wxCoord vHeight;
if (M_REGION == 0)
- return TRUE;
+ return true;
GetBox( x
,y
return m_pRects[m_lCurrent].height;
return 0L;
} // end of wxRegionIterator::GetH
-
/////////////////////////////////////////////////////////////////////////////
-// Name: statbox.cpp
+// Name: src/os2/statbox.cpp
// Purpose: wxStaticBox
// Author: David Webster
// Modified by:
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/window.h"
-#include "wx/os2/private.h"
+#include "wx/statbox.h"
#ifndef WX_PRECOMP
-#include "wx/app.h"
-#include "wx/dcclient.h"
+ #include "wx/app.h"
+ #include "wx/dcclient.h"
#endif
-#include "wx/statbox.h"
+#include "wx/window.h"
+#include "wx/os2/private.h"
IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
-bool wxStaticBox::Create(
- wxWindow* pParent
-, wxWindowID vId
-, const wxString& rsLabel
-, const wxPoint& rPos
-, const wxSize& rSize
-, long lStyle
-, const wxString& rsName
-)
+bool wxStaticBox::Create( wxWindow* pParent,
+ wxWindowID vId,
+ const wxString& rsLabel,
+ const wxPoint& rPos,
+ const wxSize& rSize,
+ long lStyle,
+ const wxString& rsName )
{
if(!CreateControl( pParent
,vId
,rsName
))
{
- return FALSE;
+ return false;
}
- wxPoint vPos(0,0);
- wxSize vSize(0,0);
+ wxPoint vPos(0,0);
+ wxSize vSize(0,0);
if (!OS2CreateControl( wxT("STATIC")
,SS_GROUPBOX
,rsLabel
))
{
- return FALSE;
+ return false;
}
//
,rSize.x
,rSize.y
);
- return TRUE;
+ return true;
} // end of wxStaticBox::Create
wxSize wxStaticBox::DoGetBestSize() const
);
} // end of wxStaticBox::DoGetBestSize
-MRESULT wxStaticBox::OS2WindowProc(
- WXUINT nMsg
-, WXWPARAM wParam
-, WXLPARAM lParam
-)
+MRESULT wxStaticBox::OS2WindowProc( WXUINT nMsg,
+ WXWPARAM wParam,
+ WXLPARAM lParam )
{
return wxControl::OS2WindowProc(nMsg, wParam, lParam);
} // end of wxStaticBox::OS2WindowProc
-
-
/////////////////////////////////////////////////////////////////////////////
-// Name: tabctrl.cpp
+// Name: src/os2/tabctrl.cpp
// Purpose: wxTabCtrl
// Author: David Webster
// Modified by:
#if wxUSE_TAB_DIALOG
#ifndef WX_PRECOMP
-#include "wx/wx.h"
+ #include "wx/wx.h"
+ #include "wx/app.h"
#endif
#include "malloc.h"
//#include "wx/msw/dib.h"
#include "wx/os2/tabctrl.h"
-#include "wx/app.h"
#include "wx/os2/private.h"
#include "wx/generic/imaglist.h"
SubclassWin((WXHWND) hWndTabCtrl);
- return FALSE;
+ return false;
}
wxTabCtrl::~wxTabCtrl()
/////////////////////////////////////////////////////////////////////////////
-// Name: textctrl.cpp
+// Name: src/os2/textctrl.cpp
// Purpose: wxTextCtrl
// Author: David Webster
// Modified by:
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#include "wx/textctrl.h"
+
#ifndef WX_PRECOMP
- #include "wx/textctrl.h"
#include "wx/scrolwin.h"
#include "wx/settings.h"
#include "wx/brush.h"
#include "wx/utils.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
-
#if wxUSE_CLIPBOARD
#include "wx/clipbrd.h"
#endif
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif //WX_PRECOMP
-#include "wx/app.h"
#include "wx/apptrait.h"
#include "wx/module.h"
#include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/os2/private.h"
-#include "wx/app.h"
#include "wx/imaglist.h"
#include "wx/settings.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/dynlib.h"
#define _WX_DEFINE_DATE_EVENTS_
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif // WX_PRECOMP
-#include "wx/app.h"
-
#include "wx/bitmap.h"
#include "wx/palmos/gdiimage.h"
void wxGDIImage::InitStandardHandlers()
{
}
-
-
#ifndef WX_PRECOMP
#include "wx/event.h"
+ #include "wx/app.h"
#endif //WX_PRECOMP
-#include "wx/app.h"
#include "wx/cmdline.h"
#if wxUSE_GUI
#pragma hdrstop
#endif
-#ifndef WX_PRECOMP
-#include "wx/app.h"
-#endif
-
#if wxUSE_SPINBTN
#include "wx/spinbutt.h"
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
// ============================================================================
#endif
// wxUSE_SPINCTN
-
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_TAB_DIALOG
#ifndef WX_PRECOMP
-#include "wx/wx.h"
+ #include "wx/wx.h"
+ #include "wx/app.h"
#endif
#if defined(__WIN95__)
#include "wx/tabctrl.h"
-#include "wx/app.h"
#include "wx/palmos/imaglist.h"
IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl)
#if wxUSE_TOOLBAR && wxUSE_TOOLBAR_NATIVE
+#include "wx/toolbar.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/frame.h"
#include "wx/bitmap.h"
#include "wx/dcmemory.h"
#include "wx/control.h"
+ #include "wx/app.h" // for GetComCtl32Version
#endif
-#include "wx/toolbar.h"
#include "wx/sysopt.h"
#include "wx/palmos/private.h"
#include "wx/palmos/wrapcctl.h"
-#include "wx/app.h" // for GetComCtl32Version
-
// ----------------------------------------------------------------------------
// conditional compilation
// ----------------------------------------------------------------------------
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/palmos/private.h"
-#include "wx/app.h"
#include "wx/imaglist.h"
#include "wx/settings.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/event.h"
+ #include "wx/app.h"
#endif // !PCH
#include "wx/timer.h"
#include "wx/utils.h"
#include "wx/ffile.h"
#include "wx/process.h"
-#include "wx/app.h"
#include "wx/wxchar.h"
#include <stdlib.h>
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/string.h"
+ #include "wx/app.h"
#endif
#include "wx/regex.h"
#include "wx/utils.h"
-#include "wx/app.h"
#include "wx/fontmap.h"
#include "wx/fontutil.h"
#include "wx/encinfo.h"
#ifndef WX_PRECOMP
#include "wx/log.h" // wxLogDebug/wxLogSysError/wxLogTrace
+ #include "wx/app.h" // wxTheApp->argc, wxTheApp->argv
#endif
-#include "wx/app.h" // wxTheApp->argc, wxTheApp->argv
#include "wx/thread.h" // wxMutex/wxMutexLocker
#include "wx/timer.h" // wxTimer
#include "wx/string.h"
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/apptrait.h"
#include "wx/process.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/iconbndl.h"
// check current state of a key
// ----------------------------------------------------------------------------
-#include "wx/app.h"
-
bool wxGetKeyState(wxKeyCode key)
{
wxASSERT_MSG(key != WXK_LBUTTON && key != WXK_RBUTTON && key !=
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/icon.h"
#include "wx/image.h"
-#include "wx/app.h"
#if wxUSE_NANOX
#include "wx/dcmemory.h"
#endif
#include "wx/colour.h"
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/gdicmn.h"
-#include "wx/app.h"
#include "wx/x11/private.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: cursor.cpp
+// Name: src/x11/cursor.cpp
// Purpose: wxCursor class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
#include "wx/cursor.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/gdicmn.h"
#include "wx/icon.h"
-#include "wx/app.h"
#include "wx/utils.h"
#include "wx/x11/private.h"
#if wxUSE_NANOX
// TODO Create some standard cursors from bitmaps.
-
-
+
+
#else
// !wxUSE_NANOX
-
+
M_CURSORDATA->m_display = wxGlobalDisplay();
wxASSERT_MSG( M_CURSORDATA->m_display, wxT("No display") );
-
+
int x_cur = XC_left_ptr;
switch (cursorId)
{
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/mstream.h"
-#include "wx/app.h"
#include "wx/image.h"
#include "wx/utils.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: x11/dcclient.cpp
+// Name: src/x11/dcclient.cpp
// Purpose: wxClientDC class
// Author: Julian Smart, Robert Roebling
// Modified by:
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
#include "wx/dcclient.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/dcmemory.h"
#include "wx/window.h"
-#include "wx/app.h"
#include "wx/image.h"
#include "wx/module.h"
#include "wx/fontutil.h"
GC gc = XCreateGC( xdisplay, new_pixmap, 0, NULL );
XSetForeground( xdisplay, gc, BlackPixel(xdisplay,xscreen) );
-
+
XSetFillStyle( xdisplay, gc, FillSolid );
XFillRectangle( xdisplay, new_pixmap, gc, 0, 0, ww, hh );
PangoLayout *layout = pango_layout_new( m_context );
if (m_fontdesc)
- pango_layout_set_font_description(layout, m_fontdesc);
+ pango_layout_set_font_description(layout, m_fontdesc);
else
- pango_layout_set_font_description(layout, this->GetFont().GetNativeFontInfo()->description);
-
+ pango_layout_set_font_description(layout, this->GetFont().GetNativeFontInfo()->description);
+
pango_layout_set_text(layout, "H", 1 );
int w,h;
pango_layout_get_pixel_size(layout, &w, &h);
PangoLayout *layout = pango_layout_new( m_context );
if (m_fontdesc)
- pango_layout_set_font_description(layout, m_fontdesc);
+ pango_layout_set_font_description(layout, m_fontdesc);
else
- pango_layout_set_font_description(layout, this->GetFont().GetNativeFontInfo()->description);
-
+ pango_layout_set_font_description(layout, this->GetFont().GetNativeFontInfo()->description);
+
pango_layout_set_text(layout, "H", 1 );
int w,h;
pango_layout_get_pixel_size(layout, &w, &h);
wxCHECK_RET( Ok(), wxT("invalid dc") );
m_font = font;
-
+
return;
-
+
#if wxUSE_UNICODE
m_fontdesc = font.GetNativeFontInfo()->description;
#endif
/////////////////////////////////////////////////////////////////////////////
-// Name: dcscreen.cpp
+// Name: src/x11/dcscreen.cpp
// Purpose: wxScreenDC class
// Author: Julian Smart, Robert Roebling
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart, Robert Roebling
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#include "wx/dcscreen.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/window.h"
#include "wx/frame.h"
-#include "wx/dcscreen.h"
#include "wx/utils.h"
-#include "wx/app.h"
#include "wx/fontutil.h"
#include "wx/x11/private.h"
wxScreenDC::wxScreenDC()
{
- m_ok = FALSE;
-
+ m_ok = false;
+
m_display = (WXDisplay *) wxGlobalDisplay();
-
+
int screen = DefaultScreen( (Display*) m_display );
m_cmap = (WXColormap) DefaultColormap( (Display*) m_display, screen );
-
+
m_window = (WXWindow) RootWindow( (Display*) m_display, screen );
- m_isScreenDC = TRUE;
+ m_isScreenDC = true;
#if wxUSE_UNICODE
m_context = wxTheApp->GetPangoContext();
}
#endif // 0
- return TRUE;
+ return true;
}
bool wxScreenDC::EndDrawingOnTop()
{
- return TRUE;
+ return true;
}
void wxScreenDC::DoGetSize(int *width, int *height) const
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/window.h"
-#include "wx/app.h"
#include "wx/gdicmn.h"
#include "wx/utils.h"
UnregisterWindow();
- g_blockEventsOnDrag = FALSE;
+ g_blockEventsOnDrag = false;
return m_retValue;
#endif
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#include "wx/evtloop.h"
+
#ifndef WX_PRECOMP
#include "wx/hash.h"
+ #include "wx/app.h"
#endif
#include "wx/window.h"
-#include "wx/app.h"
-#include "wx/evtloop.h"
#include "wx/tooltip.h"
#include "wx/timer.h"
#include "wx/module.h"
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_GLCANVAS
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/utils.h"
-#include "wx/app.h"
#ifdef __VMS
# pragma message disable nosimpint
attribList = (int*) data;
// Get an appropriate visual
vi = glXChooseVisual(display, DefaultScreen(display), attribList);
- if(!vi) return FALSE;
+ if(!vi) return false;
// Here we should make sure that vi is the same visual as the
// one used by the xwindow drawable in wxCanvas. However,
XGetWindowAttributes(display, (Window)wxGetClientAreaWindow(this), &xwa);
vi_templ.visualid = XVisualIDFromVisual(xwa.visual);
vi = XGetVisualInfo(display, VisualIDMask, &vi_templ, &n);
- if(!vi) return FALSE;
+ if(!vi) return false;
glXGetConfig(display, vi, GLX_USE_GL, &val);
- if(!val) return FALSE;
+ if(!val) return false;
// Basically, this is it. It should be possible to use vi
// in glXCreateContext() below. But this fails with Mesa.
// I notified the Mesa author about it; there may be a fix.
a_list[n] = None;
// XFree(vi);
vi = glXChooseVisual(display, DefaultScreen(display), a_list);
- if(!vi) return FALSE;
+ if(!vi) return false;
#endif /* OLD_MESA */
}
m_vi = vi; // safe for later use
- wxCHECK_MSG( m_vi, FALSE, wxT("required visual couldn't be found") );
+ wxCHECK_MSG( m_vi, false, wxT("required visual couldn't be found") );
// Create the GLX context and make it current
not the functionality that wxPalette::Create() aims to provide.
*/
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
#include "wx/palette.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/window.h"
-#include "wx/app.h"
#include "wx/utils.h"
#ifdef __VMS__
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
-#include "wx/app.h"
#include "wx/settings.h"
#include "wx/x11/private.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/evtloop.h"
-#include "wx/app.h"
#include "wx/timer.h"
#include "wx/x11/private.h"
static bool Xerror;
static Atom WM_STATE = 0;
-bool wxReparenter::sm_done = FALSE;
+bool wxReparenter::sm_done = false;
wxAdoptedWindow* wxReparenter::sm_toReparent = NULL;
wxWindow* wxReparenter::sm_newParent = NULL;
wxString wxReparenter::sm_name;
-bool wxReparenter::sm_exactMatch = FALSE;
+bool wxReparenter::sm_exactMatch = false;
static int ErrorHandler(Display* dpy, XErrorEvent* event)
{
}
// Wait for an appropriate window to be created.
-// If exactMatch is FALSE, a substring match is OK.
+// If exactMatch is false, a substring match is OK.
// If windowName is empty, then wait for the next overrideRedirect window.
bool wxReparenter::WaitAndReparent(wxWindow* newParent, wxAdoptedWindow* toReparent,
const wxString& windowName,
wxLogDebug(_T("Waiting for window %s"), windowName.c_str());
#endif
- sm_done = FALSE;
+ sm_done = false;
wxEventLoop eventLoop;
while (!sm_done)
return sm_done;
}
}
- return FALSE;
+ return false;
}
WXWindow wxReparenter::FindAClientWindow(WXWindow window, const wxString& name)
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
-#pragma hdrstop
+ #pragma hdrstop
#endif
// ============================================================================
// ----------------------------------------------------------------------------
#include "wx/utils.h"
-#include "wx/app.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif
+
#include "wx/apptrait.h"
#include "wx/msgdlg.h"
#include "wx/cursor.h"
bool wxCheckForInterrupt(wxWindow *wnd)
{
- wxASSERT_MSG(FALSE, wxT("wxCheckForInterrupt not yet implemented."));
- return FALSE;
+ wxFAIL_MSG(wxT("wxCheckForInterrupt not yet implemented."));
+ return false;
}
// ----------------------------------------------------------------------------
#endif
};
-// Return TRUE if we have a colour display
+// Return true if we have a colour display
bool wxColourDisplay()
{
return wxDisplayDepth() > 1;
return true;
}
else
- return FALSE;
+ return false;
}
}
#ifndef WX_PRECOMP
#include "wx/hash.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/menu.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
#include "wx/utils.h"
-#include "wx/app.h"
#include "wx/panel.h"
#include "wx/layout.h"
#include "wx/dialog.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/app.h"
#endif
#include "wx/wfstream.h"
#include "expat.h" // from Expat
// DLL options compatibility check:
-#include "wx/app.h"
WX_CHECK_BUILD_OPTIONS("wxXML")