Replaced TRUE and FALSE with true and false

(or True and False when calling Motif APIs).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2005-02-06 17:38:33 +00:00
parent f6e9a8189c
commit 96be256b3e
60 changed files with 341 additions and 341 deletions

View File

@@ -57,7 +57,7 @@ public:
virtual void Exit();
virtual bool Yield(bool onlyIfNeeded = FALSE);
virtual bool Yield(bool onlyIfNeeded = false);
virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp
virtual bool OnInitGui();

View File

@@ -61,7 +61,7 @@ public:
// items may be checked
bool IsChecked(size_t uiIndex) const;
void Check(size_t uiIndex, bool bCheck = TRUE);
void Check(size_t uiIndex, bool bCheck = true);
// override base class functions
virtual int DoAppend(const wxString& item);

View File

@@ -100,7 +100,7 @@ public:
void SetFocus();
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeFont(bool keepOriginalSize = true);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
WXWidget GetTopWidget() const { return m_formWidget; }

View File

@@ -93,8 +93,8 @@ protected:
// note that this function will call colour.SetPixel,
// and will do one of curCol = colour, curCol = wxWHITE, curCol = wxBLACK
// roundToWhite has an effect for monochrome display only
// if roundToWhite == TRUE then the colour will be set to white unless
// it is RGB 0x000000;if roundToWhite == FALSE the colour wull be set to
// if roundToWhite == true then the colour will be set to white unless
// it is RGB 0x000000;if roundToWhite == true the colour wull be set to
// black unless it id RGB 0xffffff
int CalculatePixel(wxColour& colour, wxColour& curCol,
bool roundToWhite) const;
@@ -129,7 +129,7 @@ protected:
virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc,
int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
virtual void DoSetClippingRegionAsRegion(const wxRegion& region);
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,

View File

@@ -24,7 +24,7 @@ public:
DECLARE_CLASS(wxPrinterDC)
// Create a printer DC
wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = TRUE, int orientation = wxPORTRAIT);
wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = true, int orientation = wxPORTRAIT);
~wxPrinterDC();
};

View File

@@ -38,7 +38,7 @@ public:
}
bool Create(wxWindow *parent, wxWindowID id,
const wxString& title, // bool modal = FALSE, // TODO make this a window style?
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
@@ -48,7 +48,7 @@ public:
virtual bool Destroy();
virtual bool Show(bool show = TRUE);
virtual bool Show(bool show = true);
void SetTitle(const wxString& title);
@@ -61,7 +61,7 @@ public:
virtual void EndModal(int retCode);
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeFont(bool keepOriginalSize = true);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
inline WXWidget GetTopWidget() const { return m_mainWidget; }

View File

@@ -153,7 +153,7 @@ public:
void SetData( wxDataObject &data );
wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly);
virtual bool GiveFeedback( wxDragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; };
virtual bool GiveFeedback( wxDragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return true; };
// implementation
#if 0

View File

@@ -30,7 +30,7 @@ public:
int family,
int style,
int weight,
bool underlined = FALSE,
bool underlined = false,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
{
@@ -45,7 +45,7 @@ public:
int family,
int style,
int weight,
bool underlined = FALSE,
bool underlined = false,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
@@ -113,7 +113,7 @@ protected:
void Init();
// VZ: IMHO, we don't need it at all...
bool RealizeResource() { return TRUE; }
bool RealizeResource() { return true; }
void Unshare();
private:

View File

@@ -31,7 +31,7 @@ class WXDLLEXPORT wxGDIObject: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxGDIObject)
public:
inline wxGDIObject() { m_visible = FALSE; };
inline wxGDIObject() { m_visible = false; };
inline ~wxGDIObject() {};
inline bool IsNull() const { return (m_refData == 0); }

View File

@@ -84,7 +84,7 @@ public:
virtual wxString GetString(int n) const;
// implementation of wxListBoxbase
virtual void SetSelection(int n, bool select = TRUE);
virtual void SetSelection(int n, bool select = true);
virtual void DoInsertItems(const wxArrayString& items, int pos);
virtual void DoSetItems(const wxArrayString& items, void **clientData);
virtual void DoSetFirstItem(int n);

View File

@@ -161,15 +161,15 @@ public:
// MDI operations
virtual void Maximize();
virtual void Maximize(bool WXUNUSED(maximize)) { };
inline void Minimize() { Iconize(TRUE); };
inline void Minimize() { Iconize(true); };
virtual void Iconize(bool iconize);
virtual void Restore();
virtual void Activate();
virtual bool IsIconized() const ;
virtual bool IsTopLevel() const { return FALSE; }
virtual bool IsTopLevel() const { return false; }
// Is the frame maximized? Returns TRUE for
// Is the frame maximized? Returns true for
// wxMDIChildFrame due to the tabbed implementation.
virtual bool IsMaximized(void) const ;

View File

@@ -67,7 +67,7 @@ public:
WXWidget CreateMenu(wxMenuBar *menuBar, WXWidget parent, wxMenu *topMenu,
const wxString& title = wxEmptyString,
bool isPulldown = FALSE);
bool isPulldown = false);
// For popups, need to destroy, then recreate menu for a different (or
// possibly same) window, since the parent may change.
@@ -81,7 +81,7 @@ public:
void SetBackgroundColour(const wxColour& colour);
void SetForegroundColour(const wxColour& colour);
void SetFont(const wxFont& colour);
void ChangeFont(bool keepOriginalSize = FALSE);
void ChangeFont(bool keepOriginalSize = false);
WXWidget GetHandle() const { return m_menuWidget; }
@@ -158,7 +158,7 @@ public:
virtual bool SetBackgroundColour(const wxColour& colour);
virtual bool SetForegroundColour(const wxColour& colour);
virtual bool SetFont(const wxFont& colour);
void ChangeFont(bool keepOriginalSize = FALSE);
void ChangeFont(bool keepOriginalSize = false);
public:
// common part of all ctors

View File

@@ -38,8 +38,8 @@ public:
// accessors (some more are inherited from wxOwnerDrawn or are below)
virtual void SetText(const wxString& label);
virtual void Enable(bool enable = TRUE);
virtual void Check(bool check = TRUE);
virtual void Enable(bool enable = true);
virtual void Check(bool check = true);
// included SetBitmap and GetBitmap as copied from the GTK include file
// I'm not sure if this works but it silences the linker in the
// menu sample.

View File

@@ -30,7 +30,7 @@ public:
wxPrinter(wxPrintData *data = NULL);
~wxPrinter();
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE);
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true);
virtual bool PrintDialog(wxWindow *parent);
virtual bool Setup(wxWindow *parent);
};

View File

@@ -94,7 +94,7 @@ extern void wxDoChangeForegroundColour(WXWidget widget,
wxColour& foregroundColour);
extern void wxDoChangeBackgroundColour(WXWidget widget,
wxColour& backgroundColour,
bool changeArmColour = FALSE);
bool changeArmColour = false);
extern void wxDoChangeFont(WXWidget widget, wxFont& font);
#define wxNO_COLORS 0x00

View File

@@ -84,10 +84,10 @@ public:
void SetString(int item, const wxString& label) ;
wxString GetString(int item) const;
virtual bool Enable(bool enable = TRUE);
virtual bool Enable(bool enable = true);
void Enable(int item, bool enable);
void Show(int item, bool show) ;
virtual bool Show(bool show = TRUE) ;
virtual bool Show(bool show = true) ;
virtual wxString GetStringSelection() const;
virtual bool SetStringSelection(const wxString& s);
@@ -101,7 +101,7 @@ public:
void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeFont(bool keepOriginalSize = true);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
const wxWidgetArray& GetRadioButtons() const { return m_radioButtons; }

View File

@@ -48,12 +48,12 @@ public:
virtual void SetThumbPosition(int viewStart);
virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
bool refresh = TRUE);
bool refresh = true);
void Command(wxCommandEvent& event);
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeFont(bool keepOriginalSize = true);
virtual void ChangeBackgroundColour();
protected:

View File

@@ -58,7 +58,7 @@ public:
// Implementation
virtual void Command(wxCommandEvent& event)
{ (void)ProcessCommand(event); };
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeFont(bool keepOriginalSize = true);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
public:

View File

@@ -48,7 +48,7 @@ public:
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
{
return FALSE;
return false;
}
wxBitmap GetBitmap() const { return m_messageBitmap; }

View File

@@ -44,7 +44,7 @@ public:
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
{
return FALSE;
return false;
}
virtual WXWidget GetLabelWidget() const { return m_labelWidget; }

View File

@@ -46,7 +46,7 @@ public:
// operations
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
{
return FALSE;
return false;
}
virtual void SetLabel(const wxString& label);

View File

@@ -26,7 +26,7 @@ public:
{ Init(); }
~wxTimer();
virtual bool Start(int milliseconds = -1, bool oneShot = FALSE);
virtual bool Start(int milliseconds = -1, bool oneShot = false);
virtual void Stop();
virtual bool IsRunning() const { return m_id != 0; }

View File

@@ -44,9 +44,9 @@ public:
virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL );
virtual bool IsFullScreen() const;
virtual void Maximize(bool maximize = TRUE);
virtual void Maximize(bool maximize = true);
virtual void Restore();
virtual void Iconize(bool iconize = TRUE);
virtual void Iconize(bool iconize = true);
virtual bool IsMaximized() const;
virtual bool IsIconized() const;
@@ -79,7 +79,7 @@ private:
long style,
const wxString& name )
{
return FALSE;
return false;
}
virtual void DoDestroy() { }

View File

@@ -57,14 +57,14 @@ public:
virtual void Raise();
virtual void Lower();
virtual bool Show( bool show = TRUE );
virtual bool Enable( bool enable = TRUE );
virtual bool Show( bool show = true );
virtual bool Enable( bool enable = true );
virtual void SetFocus();
virtual void WarpPointer(int x, int y);
virtual void Refresh( bool eraseBackground = TRUE,
virtual void Refresh( bool eraseBackground = true,
const wxRect *rect = (const wxRect *) NULL );
virtual bool SetBackgroundColour( const wxColour &colour );
@@ -83,8 +83,8 @@ public:
const;
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = TRUE );
virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
int range, bool refresh = true );
virtual void SetScrollPos( int orient, int pos, bool refresh = true );
virtual int GetScrollPos( int orient ) const;
virtual int GetScrollThumb( int orient ) const;
virtual int GetScrollRange( int orient ) const;
@@ -196,7 +196,7 @@ public:
// Change properties
// Change to the current font (often overridden)
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeFont(bool keepOriginalSize = true);
// Change background and foreground colour using current background colour
// setting (Motif generates foreground based on background)
@@ -214,9 +214,9 @@ protected:
// wxWidgets wxKeyEvent form. Find a widget for the window. Now find a
// wxWindow for the widget. If there isn't one, go up the widget hierarchy
// trying to find one. Once one is found, call ProcessAccelerator for the
// window. If it returns TRUE (processed the event), skip the X event,
// window. If it returns true (processed the event), skip the X event,
// otherwise carry on up the wxWidgets window hierarchy calling
// ProcessAccelerator. If all return FALSE, process the X event as normal.
// ProcessAccelerator. If all return false, process the X event as normal.
// Eventually we can implement OnCharHook the same way, but concentrate on
// accelerators for now. ProcessAccelerator must look at the current
// accelerator table, and try to find what menu id or window (beneath it)
@@ -230,7 +230,7 @@ protected:
void UnmanageAndDestroy(WXWidget widget);
// map or unmap an X widget (passing NULL is ok),
// returns TRUE if widget was mapped/unmapped
// returns true if widget was mapped/unmapped
bool MapOrUnmap(WXWidget widget, bool map);
// scrolling stuff

View File

@@ -188,7 +188,7 @@ static char *fallbackResources[] = {
bool wxApp::OnInitGui()
{
if( !wxAppBase::OnInitGui() )
return FALSE;
return false;
XtToolkitInitialize() ;
wxTheApp->m_appContext = (WXAppContext) XtCreateApplicationContext();
@@ -228,7 +228,7 @@ bool wxApp::OnInitGui()
wxAddIdleCallback();
return TRUE;
return true;
}
WXColormap wxApp::GetMainColormap(WXDisplay* display)
@@ -360,7 +360,7 @@ void wxApp::SetTopLevelRealizedWidget(WXDisplay* display, WXWidget widget)
bool wxApp::Yield(bool onlyIfNeeded)
{
static bool s_inYield = FALSE;
static bool s_inYield = false;
if ( s_inYield )
{
@@ -369,17 +369,17 @@ bool wxApp::Yield(bool onlyIfNeeded)
wxFAIL_MSG( wxT("wxYield called recursively" ) );
}
return FALSE;
return false;
}
s_inYield = TRUE;
s_inYield = true;
while (wxTheApp && wxTheApp->Pending())
wxTheApp->Dispatch();
s_inYield = FALSE;
s_inYield = false;
return TRUE;
return true;
}
// ----------------------------------------------------------------------------

View File

@@ -87,7 +87,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id,
m_mainWidget = (WXWidget) buttonWidget;
ChangeFont(FALSE);
ChangeFont(false);
ChangeBackgroundColour ();
@@ -104,7 +104,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id,
AttachWidget (parent, m_mainWidget, (WXWidget) NULL,
pos.x, pos.y, best.x, best.y);
return TRUE;
return true;
}
wxBitmapButton::~wxBitmapButton()
@@ -250,7 +250,7 @@ void wxBitmapButton::DoSetBitmap()
void wxBitmapButton::ChangeBackgroundColour()
{
wxDoChangeBackgroundColour(m_mainWidget, m_backgroundColour, TRUE);
wxDoChangeBackgroundColour(m_mainWidget, m_backgroundColour, true);
// Must reset the bitmaps since the colours have changed.
DoSetBitmap();

View File

@@ -64,7 +64,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
{
if( !wxControl::CreateControl( parent, id, pos, size, style, validator,
name ) )
return FALSE;
return false;
wxString label1(wxStripMenuCodes(label));
wxXmString text( label1 );
@@ -85,13 +85,13 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
XmNvalueChangedCallback, (XtCallbackProc)wxCheckBoxCallback,
(XtPointer)this );
XmToggleButtonSetState ((Widget) m_mainWidget, FALSE, TRUE);
XmToggleButtonSetState ((Widget) m_mainWidget, False, True);
AttachWidget( parent, m_mainWidget, (WXWidget)NULL,
pos.x, pos.y, size.x, size.y );
ChangeBackgroundColour();
return TRUE;
return true;
}
void wxCheckBox::SetValue(bool val)

View File

@@ -58,7 +58,7 @@ static void CopyStringsAddingPrefix(const wxArrayString& orig,
copy.Clear();
for(size_t i = 0; i < orig.GetCount(); ++i )
copy.Add( Prefix(FALSE) + orig[i] );
copy.Add( Prefix(false) + orig[i] );
}
// def ctor: use Create() to really create the control
@@ -147,7 +147,7 @@ void wxCheckListBox::DoToggleItem( int n, int x )
else if( HasClientUntypedData() )
event.SetClientData( GetClientData(n) );
event.SetInt(n);
event.SetExtraLong(TRUE);
event.SetExtraLong(true);
event.SetEventObject(this);
event.SetString( GetString( n ) );
@@ -157,13 +157,13 @@ void wxCheckListBox::DoToggleItem( int n, int x )
int wxCheckListBox::DoAppend(const wxString& item)
{
return wxListBox::DoAppend( Prefix(FALSE) + item );
return wxListBox::DoAppend( Prefix(false) + item );
}
int wxCheckListBox::FindString(const wxString& s) const
{
int n1 = wxListBox::FindString(Prefix(FALSE) + s);
int n2 = wxListBox::FindString(Prefix(TRUE) + s);
int n1 = wxListBox::FindString(Prefix(false) + s);
int n2 = wxListBox::FindString(Prefix(true) + s);
int min = wxMin(n1, n2), max = wxMax(n1, n2);
// why this works:

View File

@@ -95,7 +95,7 @@ wxColour wxColour::CreateByName(const wxString& name)
col.m_red = xcol.red & 0xff;
col.m_green = xcol.green & 0xff;
col.m_blue = xcol.blue & 0xff;
col.m_isInit = TRUE;
col.m_isInit = true;
col.m_pixel = -1;
}

View File

@@ -324,7 +324,7 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
event.SetClientObject( item->GetClientObject(cbs->index - 1) );
else if ( item->HasClientUntypedData() )
event.SetClientData( item->GetClientData(cbs->index - 1) );
event.SetExtraLong(TRUE);
event.SetExtraLong(true);
event.SetEventObject(item);
item->ProcessCommand (event);
break;
@@ -334,7 +334,7 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
wxCommandEvent event (wxEVT_COMMAND_TEXT_UPDATED, item->GetId());
event.SetInt(-1);
event.SetString( item->GetValue() );
event.SetExtraLong(TRUE);
event.SetExtraLong(true);
event.SetEventObject(item);
item->ProcessCommand (event);
break;

View File

@@ -496,7 +496,7 @@ void wxEndBusyCursor()
}
}
// TRUE if we're between the above two calls
// true if we're between the above two calls
bool wxIsBusy()
{
return (wxBusyCursorCount > 0);

View File

@@ -138,17 +138,17 @@ void wxDataFormat::SetId( const wxChar *id )
m_type = wxDF_PRIVATE;
wxString tmp( id );
m_format = XInternAtom( wxGlobalDisplay(),
tmp.mbc_str(), FALSE );
tmp.mbc_str(), False );
}
void wxDataFormat::PrepareFormats()
{
if (!g_textAtom)
g_textAtom = XInternAtom( wxGlobalDisplay(), "STRING", FALSE );
g_textAtom = XInternAtom( wxGlobalDisplay(), "STRING", False );
if (!g_bitmapAtom)
g_bitmapAtom = XInternAtom( wxGlobalDisplay(), "PIXMAP", FALSE );
g_bitmapAtom = XInternAtom( wxGlobalDisplay(), "PIXMAP", False );
if (!g_fileAtom)
g_fileAtom = XInternAtom( wxGlobalDisplay(), "file:ALL", FALSE );
g_fileAtom = XInternAtom( wxGlobalDisplay(), "file:ALL", False );
}
// ----------------------------------------------------------------------------

View File

@@ -28,14 +28,14 @@
wxDC::wxDC()
{
m_ok = FALSE;
m_ok = false;
m_mm_to_pix_x = 1.0;
m_mm_to_pix_y = 1.0;
m_backgroundMode = wxTRANSPARENT;
m_isInteractive = FALSE;
m_isInteractive = false;
}
void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y)
@@ -43,7 +43,7 @@ void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y)
wxCHECK_RET( Ok(), "invalid dc" );
wxCHECK_RET( icon.Ok(), "invalid icon" );
DoDrawBitmap(icon, x, y, TRUE);
DoDrawBitmap(icon, x, y, true);
}
void wxDC::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask )
@@ -72,7 +72,7 @@ void wxDC::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useM
void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
{
m_clipping = TRUE;
m_clipping = true;
m_clipX1 = x;
m_clipY1 = y;
m_clipX2 = x + width;
@@ -128,8 +128,8 @@ void wxDC::SetMapMode( int mode )
}
if (mode != wxMM_TEXT)
{
m_needComputeScaleX = TRUE;
m_needComputeScaleY = TRUE;
m_needComputeScaleX = true;
m_needComputeScaleY = true;
}
}

View File

@@ -410,7 +410,7 @@ void wxWindowDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxCoord
if (m_brush.Ok() && m_brush.GetStyle () != wxTRANSPARENT)
{
m_autoSetting = TRUE; // must be reset
m_autoSetting = true; // must be reset
SetBrush (m_brush);
XFillArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd, wd, hd, start, end);
@@ -898,7 +898,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
source->LogicalToDeviceXRel(width),
source->LogicalToDeviceYRel(height),
XLOG2DEV_2 (xdest), YLOG2DEV_2 (ydest),
TRUE, &cache);
true, &cache);
if ( useMask && source->IsKindOf(CLASSINFO(wxMemoryDC)) )
{
@@ -917,7 +917,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
source->LogicalToDeviceXRel(width),
source->LogicalToDeviceYRel(height),
XLOG2DEV (xdest), YLOG2DEV (ydest),
FALSE, &cache);
False, &cache);
if ( useMask )
{
@@ -2261,7 +2261,7 @@ static void XCopyRemote(Display *src_display, Display *dest_display,
destcm = (Colormap) wxTheApp->GetMainColormap((WXDisplay*) dest_display);
cache_pos = 0;
all_cache = FALSE;
all_cache = False;
for (i = 0; i < w; i++)
for (j = 0; j < h; j++) {
@@ -2289,7 +2289,7 @@ static void XCopyRemote(Display *src_display, Display *dest_display,
if (++cache_pos >= CACHE_SIZE) {
cache_pos = 0;
all_cache = TRUE;
all_cache = true;
}
install:

View File

@@ -134,7 +134,7 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
}
else
{
m_ok = FALSE;
m_ok = false;
m_pixmap = (WXPixmap) 0;
};
};

View File

@@ -63,7 +63,7 @@ wxScreenDC::wxScreenDC()
&gcvalues);
m_backgroundPixel = (int) gcvalues.background;
m_ok = TRUE;
m_ok = true;
}
wxScreenDC::~wxScreenDC()
@@ -88,7 +88,7 @@ bool wxScreenDC::StartDrawingOnTop(wxWindow* window)
bool wxScreenDC::StartDrawingOnTop(wxRect* rect)
{
if (sm_overlayWindow)
return FALSE;
return false;
Display *dpy = (Display*) wxGetDisplay();
Pixmap screenPixmap = RootWindow(dpy, DefaultScreen(dpy));
@@ -118,10 +118,10 @@ bool wxScreenDC::StartDrawingOnTop(wxRect* rect)
if (sm_overlayWindow)
{
XMapWindow(dpy, (Window) sm_overlayWindow);
return TRUE;
return true;
}
else
return FALSE;
return false;
}
bool wxScreenDC::EndDrawingOnTop()
@@ -130,8 +130,8 @@ bool wxScreenDC::EndDrawingOnTop()
{
XDestroyWindow((Display*) wxGetDisplay(), (Window) sm_overlayWindow);
sm_overlayWindow = 0;
return TRUE;
return true;
}
else
return FALSE;
return false;
}

View File

@@ -84,7 +84,7 @@ END_EVENT_TABLE()
wxDialog::wxDialog()
{
m_modalShowing = FALSE;
m_modalShowing = false;
m_eventLoop = NULL;
m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
}
@@ -100,9 +100,9 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
if( !wxTopLevelWindow::Create( parent, id, title, pos, size, style,
name ) )
return FALSE;
return false;
m_modalShowing = FALSE;
m_modalShowing = false;
m_eventLoop = NULL;
m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
@@ -114,7 +114,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
SetTitle( title );
m_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
ChangeFont(FALSE);
ChangeFont(false);
// Can't remember what this was about... but I think it's necessary.
if (wxUSE_INVISIBLE_RESIZE)
@@ -136,19 +136,19 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
// is managed, so we manage without mapping to the screen.
// To show, we map the shell (actually it's parent).
if (!wxUSE_INVISIBLE_RESIZE)
XtVaSetValues(shell, XmNmappedWhenManaged, FALSE, NULL);
XtVaSetValues(shell, XmNmappedWhenManaged, False, NULL);
if (!wxUSE_INVISIBLE_RESIZE)
{
XtManageChild(dialogShell);
SetSize(pos.x, pos.y, size.x, size.y);
}
XtAddEventHandler(dialogShell,ExposureMask,FALSE,
XtAddEventHandler(dialogShell,ExposureMask,False,
wxUniversalRepaintProc, (XtPointer) this);
ChangeBackgroundColour();
return TRUE;
return true;
}
bool wxDialog::DoCreate( wxWindow* parent, wxWindowID id,
@@ -192,7 +192,7 @@ bool wxDialog::DoCreate( wxWindow* parent, wxWindowID id,
wxAddWindowToTable( (Widget)m_mainWidget, this );
return TRUE;
return true;
}
void wxDialog::SetModal(bool flag)
@@ -216,17 +216,17 @@ void wxDialog::SetModal(bool flag)
wxDialog::~wxDialog()
{
m_isBeingDeleted = TRUE;
m_isBeingDeleted = true;
delete m_eventLoop;
if (m_mainWidget)
{
XtRemoveEventHandler((Widget) m_mainWidget, ExposureMask, FALSE,
XtRemoveEventHandler((Widget) m_mainWidget, ExposureMask, False,
wxUniversalRepaintProc, (XtPointer) this);
}
m_modalShowing = FALSE;
m_modalShowing = false;
if (!wxUSE_INVISIBLE_RESIZE && m_mainWidget)
{
XtUnmapWidget((Widget) m_mainWidget);
@@ -315,10 +315,10 @@ bool wxDialog::Show( bool show )
XtUnmanageChild((Widget)m_mainWidget) ;
XFlush(XtDisplay((Widget)m_mainWidget));
XSync(XtDisplay((Widget)m_mainWidget), FALSE);
XSync(XtDisplay((Widget)m_mainWidget), False);
}
return TRUE;
return true;
}
// Shows a dialog modally, returning a return code
@@ -326,7 +326,7 @@ int wxDialog::ShowModal()
{
m_windowStyle |= wxDIALOG_MODAL;
Show(TRUE);
Show(true);
// after the event loop ran, the widget might already have been destroyed
WXDisplay* display = (WXDisplay*)XtDisplay( (Widget)m_mainWidget );
@@ -335,8 +335,8 @@ int wxDialog::ShowModal()
return 0;
m_eventLoop = new wxEventLoop;
m_modalShowing = TRUE;
XtAddGrab((Widget) m_mainWidget, TRUE, FALSE);
m_modalShowing = true;
XtAddGrab((Widget) m_mainWidget, True, False);
m_eventLoop->Run();
@@ -361,9 +361,9 @@ void wxDialog::EndModal(int retCode)
// Strangely, we don't seem to need this now.
// XtRemoveGrab((Widget) m_mainWidget);
Show(FALSE);
Show(false);
m_modalShowing = FALSE;
m_modalShowing = false;
m_eventLoop->Exit();
}
@@ -377,7 +377,7 @@ void wxDialog::OnOK(wxCommandEvent& WXUNUSED(event))
else
{
SetReturnCode(wxID_OK);
this->Show(FALSE);
this->Show(false);
}
}
}
@@ -396,7 +396,7 @@ void wxDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
else
{
SetReturnCode(wxID_CANCEL);
this->Show(FALSE);
this->Show(false);
}
}
@@ -435,7 +435,7 @@ bool wxDialog::Destroy()
{
if (!wxPendingDelete.Member(this))
wxPendingDelete.Append(this);
return TRUE;
return true;
}
void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))

View File

@@ -51,14 +51,14 @@ wxDropTarget::~wxDropTarget()
bool wxTextDropTarget::OnDrop( long x, long y, const void *data, size_t WXUNUSED(size) )
{
OnDropText( x, y, (const char*)data );
return TRUE;
return true;
}
bool wxTextDropTarget::OnDropText( long x, long y, const char *psz )
{
wxLogDebug( "Got dropped text: %s.", psz );
wxLogDebug( "At x: %d, y: %d.", (int)x, (int)y );
return TRUE;
return true;
}
size_t wxTextDropTarget::GetFormatCount() const
@@ -84,7 +84,7 @@ bool wxFileDropTarget::OnDropFiles( long x, long y, size_t nFiles, const char *
{
wxLogDebug( aszFiles[i] );
}
return TRUE;
return true;
}
bool wxFileDropTarget::OnDrop(long x, long y, const void *data, size_t size )
@@ -95,7 +95,7 @@ bool wxFileDropTarget::OnDrop(long x, long y, const void *data, size_t size )
for (i = 0; i < size; i++)
if (text[i] == 0) number++;
if (number == 0) return TRUE;
if (number == 0) return true;
char **files = new char*[number];
@@ -143,7 +143,7 @@ wxDropSource::wxDropSource( wxWindow *win )
wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win )
{
#if 0
g_blockEventsOnDrag = TRUE;
g_blockEventsOnDrag = true;
m_window = win;
m_widget = win->m_widget;
@@ -182,7 +182,7 @@ wxDragResult wxDropSource::DoDragDrop( int WXUNUSED(flags) )
UnregisterWindow();
g_blockEventsOnDrag = FALSE;
g_blockEventsOnDrag = false;
return m_retValue;
#endif

View File

@@ -60,21 +60,21 @@ IMPLEMENT_CLASS(wxFileDialog, wxFileDialogBase)
wxString wxFileDialog::m_fileSelectorAnswer = "";
bool wxFileDialog::m_fileSelectorReturned = FALSE;
bool wxFileDialog::m_fileSelectorReturned = false;
static void wxFileSelClose(Widget WXUNUSED(w),
void* WXUNUSED(client_data),
XmAnyCallbackStruct *WXUNUSED(call_data))
{
wxFileDialog::m_fileSelectorAnswer = "";
wxFileDialog::m_fileSelectorReturned = TRUE;
wxFileDialog::m_fileSelectorReturned = true;
}
void wxFileSelCancel( Widget WXUNUSED(fs), XtPointer WXUNUSED(client_data),
XmFileSelectionBoxCallbackStruct *WXUNUSED(cbs) )
{
wxFileDialog::m_fileSelectorAnswer = "";
wxFileDialog::m_fileSelectorReturned = TRUE;
wxFileDialog::m_fileSelectorReturned = true;
}
void wxFileSelOk(Widget WXUNUSED(fs), XtPointer WXUNUSED(client_data), XmFileSelectionBoxCallbackStruct *cbs)
@@ -82,13 +82,13 @@ void wxFileSelOk(Widget WXUNUSED(fs), XtPointer WXUNUSED(client_data), XmFileSel
char *filename = NULL;
if (!XmStringGetLtoR(cbs->value, XmSTRING_DEFAULT_CHARSET, &filename)) {
wxFileDialog::m_fileSelectorAnswer = "";
wxFileDialog::m_fileSelectorReturned = TRUE;
wxFileDialog::m_fileSelectorReturned = true;
} else {
if (filename) {
wxFileDialog::m_fileSelectorAnswer = filename;
XtFree(filename);
}
wxFileDialog::m_fileSelectorReturned = TRUE;
wxFileDialog::m_fileSelectorReturned = true;
}
}
@@ -129,7 +129,7 @@ static void wxChangeListBoxColours(wxWindow* WXUNUSED(win), Widget widget)
// Change colour of the scrolled areas of the listboxes
Widget listParent = XtParent (widget);
#if 0
wxDoChangeBackgroundColour((WXWidget) listParent, *wxWHITE, TRUE);
wxDoChangeBackgroundColour((WXWidget) listParent, *wxWHITE, true);
#endif
Widget hsb = (Widget) 0;
@@ -143,8 +143,8 @@ static void wxChangeListBoxColours(wxWindow* WXUNUSED(win), Widget widget)
* function to change them (by default, taken from wxSystemSettings)
*/
wxColour backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
wxDoChangeBackgroundColour((WXWidget) hsb, backgroundColour, TRUE);
wxDoChangeBackgroundColour((WXWidget) vsb, backgroundColour, TRUE);
wxDoChangeBackgroundColour((WXWidget) hsb, backgroundColour, true);
wxDoChangeBackgroundColour((WXWidget) vsb, backgroundColour, true);
if (hsb)
XtVaSetValues (hsb,
@@ -278,11 +278,11 @@ int wxFileDialog::ShowModal()
XtManageChild(fileSel);
m_fileSelectorAnswer = "";
m_fileSelectorReturned = FALSE;
m_fileSelectorReturned = false;
wxEndBusyCursor();
XtAddGrab(XtParent(fileSel), TRUE, FALSE);
XtAddGrab(XtParent(fileSel), True, False);
XtAppContext context = (XtAppContext) wxTheApp->GetAppContext();
XEvent event;
while (!m_fileSelectorReturned)

View File

@@ -76,7 +76,7 @@ public:
int family = wxDEFAULT,
int style = wxDEFAULT,
int weight = wxDEFAULT,
bool underlined = FALSE,
bool underlined = false,
const wxString& faceName = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
{
@@ -230,7 +230,7 @@ bool wxFont::Create(int pointSize,
RealizeResource();
return TRUE;
return true;
}
bool wxFont::Create(const wxString& fontname, wxFontEncoding enc)
@@ -238,7 +238,7 @@ bool wxFont::Create(const wxString& fontname, wxFontEncoding enc)
if( !fontname )
{
*this = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT);
return TRUE;
return true;
}
m_refData = new wxFontRefData();
@@ -331,9 +331,9 @@ bool wxFont::Create(const wxString& fontname, wxFontEncoding enc)
}
//else: unknown encoding - may be give a warning here?
else
return FALSE;
return false;
}
return TRUE;
return true;
}
wxFont::~wxFont()
@@ -476,7 +476,7 @@ int wxFont::GetWeight() const
bool wxFont::GetUnderlined() const
{
wxCHECK_MSG( Ok(), FALSE, wxT("invalid font") );
wxCHECK_MSG( Ok(), false, wxT("invalid font") );
return M_FONTDATA->m_underlined;
}

View File

@@ -111,7 +111,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
void wxFrame::Init()
{
m_iconized = FALSE;
m_iconized = false;
//// Motif-specific
m_frameShell = (WXWidget) NULL;
@@ -130,7 +130,7 @@ bool wxFrame::Create(wxWindow *parent,
{
if( !wxTopLevelWindow::Create( parent, id, title, pos, size, style,
name ) )
return FALSE;
return false;
m_backgroundColour =
wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE);
@@ -170,7 +170,7 @@ bool wxFrame::Create(wxWindow *parent,
"Created frame (0x%p) with work area 0x%p and client "
"area 0x%p", m_mainWidget, m_workArea, m_clientArea);
XtAddEventHandler((Widget) m_clientArea, ExposureMask,FALSE,
XtAddEventHandler((Widget) m_clientArea, ExposureMask,False,
wxUniversalRepaintProc, (XtPointer) this);
if (x > -1)
@@ -182,7 +182,7 @@ bool wxFrame::Create(wxWindow *parent,
if (height > -1)
XtVaSetValues((Widget) m_frameShell, XmNheight, height, NULL);
ChangeFont(FALSE);
ChangeFont(false);
ChangeBackgroundColour();
@@ -193,7 +193,7 @@ bool wxFrame::Create(wxWindow *parent,
GetEventHandler()->ProcessEvent(sizeEvent);
return TRUE;
return true;
}
bool wxFrame::DoCreate( wxWindow* parent, wxWindowID id,
@@ -214,7 +214,7 @@ bool wxFrame::DoCreate( wxWindow* parent, wxWindowID id,
XmNallowShellResize, True,
XmNdeleteResponse, XmDO_NOTHING,
XmNmappedWhenManaged, False,
XmNiconic, (style & wxICONIZE) ? TRUE : FALSE,
XmNiconic, (style & wxICONIZE) ? True : False,
NULL);
m_frameShell = (WXWidget)frameShell;
@@ -262,21 +262,21 @@ bool wxFrame::DoCreate( wxWindow* parent, wxWindowID id,
wxModelessWindows.Append( this );
return TRUE;
return true;
}
wxFrame::~wxFrame()
{
m_isBeingDeleted = TRUE;
m_isBeingDeleted = true;
if (m_clientArea)
{
XtRemoveEventHandler((Widget) m_clientArea, ExposureMask, FALSE,
XtRemoveEventHandler((Widget) m_clientArea, ExposureMask, False,
wxUniversalRepaintProc, (XtPointer) this);
}
if (GetMainWidget())
Show(FALSE);
Show(false);
if (m_frameMenuBar)
{
@@ -645,7 +645,7 @@ bool wxFrame::PreResize()
PositionStatusBar();
#endif // wxUSE_STATUSBAR
return TRUE;
return true;
}
WXWidget wxFrame::GetClientWidget() const

View File

@@ -142,14 +142,14 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
if( size.x != -1 ) best.x = size.x;
if( size.y != -1 ) best.y = size.y;
ChangeFont(FALSE);
ChangeFont(false);
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, x, y,
best.x, best.y);
ChangeBackgroundColour();
return TRUE;
return true;
}
wxSize wxGauge::DoGetBestSize() const
@@ -560,7 +560,7 @@ XmGaugeClassRec xmGaugeClassRec = {
sizeof(XmGaugeRec), /* widget_size */
NULL, /* class_initialize */
NULL, /* class_part_initialize */
FALSE, /* class_inited */
False, /* class_inited */
Initialize, /* initialize */
NULL, /* initialize_hook */
XtInheritRealize, /* realize */
@@ -569,10 +569,10 @@ XmGaugeClassRec xmGaugeClassRec = {
resources, /* resources */
XtNumber(resources), /* num_resources */
NULLQUARK, /* xrm_class */
TRUE, /* compress_motion */
TRUE, /* compress_exposure */
TRUE, /* compress_enterleave */
FALSE, /* visible_interest */
True, /* compress_motion */
True, /* compress_exposure */
True, /* compress_enterleave */
False, /* visible_interest */
Destroy, /* destroy */
NULL, /* resize */
ExposeProc, /* expose */

View File

@@ -66,5 +66,5 @@ bool wxIcon::LoadFile(const wxString& filename, wxBitmapType type,
return handler->LoadFile(this, filename, type,
desiredWidth, desiredHeight);
else
return FALSE;
return false;
}

View File

@@ -89,7 +89,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
{
if( !wxControl::CreateControl( parent, id, pos, size, style,
validator, name ) )
return FALSE;
return false;
m_noItems = n;
m_backgroundColour = * wxWHITE;
@@ -158,7 +158,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
ChangeBackgroundColour();
return TRUE;
return true;
}
bool wxListBox::Create(wxWindow *parent, wxWindowID id,
@@ -277,7 +277,7 @@ void wxListBox::DoSetItems(const wxArrayString& items, void** clientData)
if ( clientData )
for (i = 0; i < items.GetCount(); ++i)
m_clientDataDict.Set(i, (wxClientData*)clientData[i], FALSE);
m_clientDataDict.Set(i, (wxClientData*)clientData[i], false);
XmListAddItems (listBox, text, items.GetCount(), 0);
for (i = 0; i < items.GetCount(); i++)
@@ -339,7 +339,7 @@ void wxListBox::Clear()
void wxListBox::SetSelection(int N, bool select)
{
m_inSetValue = TRUE;
m_inSetValue = true;
if (select)
{
#if 0
@@ -358,9 +358,9 @@ void wxListBox::SetSelection(int N, bool select)
int i;
for (i = 0; i < n; i++)
XmListSelectPos ((Widget) m_mainWidget,
selections[i] + 1, FALSE);
selections[i] + 1, False);
XmListSelectPos ((Widget) m_mainWidget, N + 1, FALSE);
XmListSelectPos ((Widget) m_mainWidget, N + 1, False);
XtVaSetValues ((Widget) m_mainWidget,
XmNselectionPolicy, XmEXTENDED_SELECT,
@@ -368,13 +368,13 @@ void wxListBox::SetSelection(int N, bool select)
}
else
#endif // 0
XmListSelectPos ((Widget) m_mainWidget, N + 1, FALSE);
XmListSelectPos ((Widget) m_mainWidget, N + 1, False);
}
else
XmListDeselectPos ((Widget) m_mainWidget, N + 1);
m_inSetValue = FALSE;
m_inSetValue = false;
}
bool wxListBox::IsSelected(int N) const
@@ -383,20 +383,20 @@ bool wxListBox::IsSelected(int N) const
wxArrayInt theSelections;
int count = GetSelections (theSelections);
if (count == 0)
return FALSE;
return false;
else
{
int j;
for (j = 0; j < count; j++)
if (theSelections[j] == N)
return TRUE;
return true;
}
return FALSE;
return false;
}
void wxListBox::DoSetItemClientObject(int n, wxClientData* clientData)
{
m_clientDataDict.Set(n, clientData, FALSE);
m_clientDataDict.Set(n, clientData, false);
}
wxClientData* wxListBox::DoGetItemClientObject(int n) const
@@ -411,7 +411,7 @@ void *wxListBox::DoGetItemClientData(int N) const
void wxListBox::DoSetItemClientData(int N, void *Client_data)
{
m_clientDataDict.Set(N, (wxClientData*)Client_data, FALSE);
m_clientDataDict.Set(N, (wxClientData*)Client_data, false);
}
// Return number of selections and an array of selected integers
@@ -578,7 +578,7 @@ void wxListBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
else if ( item->HasClientUntypedData() )
event.SetClientData( item->GetClientData(n) );
event.SetInt(n);
event.SetExtraLong(TRUE);
event.SetExtraLong(true);
event.SetEventObject(item);
event.SetString( item->GetString( n ) );
@@ -635,8 +635,8 @@ void wxListBox::ChangeBackgroundColour()
* function to change them (by default, taken from wxSystemSettings)
*/
wxColour backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
wxDoChangeBackgroundColour((WXWidget) hsb, backgroundColour, TRUE);
wxDoChangeBackgroundColour((WXWidget) vsb, backgroundColour, TRUE);
wxDoChangeBackgroundColour((WXWidget) hsb, backgroundColour, true);
wxDoChangeBackgroundColour((WXWidget) vsb, backgroundColour, true);
XtVaSetValues (hsb,
XmNtroughColor, backgroundColour.AllocColour(XtDisplay(hsb)),
@@ -646,7 +646,7 @@ void wxListBox::ChangeBackgroundColour()
NULL);
// MBN: why change parent's background? It looks really ugly.
// wxDoChangeBackgroundColour((WXWidget) parent, m_backgroundColour, TRUE);
// wxDoChangeBackgroundColour((WXWidget) parent, m_backgroundColour, true);
}
void wxListBox::ChangeForegroundColour()

View File

@@ -106,10 +106,10 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
int w, h;
GetClientSize(& w, & h);
m_clientWindow->SetSize(0, 0, w, h);
return TRUE;
return true;
}
else
return FALSE;
return false;
}
wxMDIParentFrame::~wxMDIParentFrame()
@@ -232,11 +232,11 @@ bool wxMDIParentFrame::ProcessEvent(wxEvent& event)
// Stops the same event being processed repeatedly
static wxEventType inEvent = wxEVT_NULL;
if (inEvent == event.GetEventType())
return FALSE;
return false;
inEvent = event.GetEventType();
bool res = FALSE;
bool res = false;
if (m_activeChild && event.IsKindOf(CLASSINFO(wxCommandEvent)))
{
res = m_activeChild->GetEventHandler()->ProcessEvent(event);
@@ -367,7 +367,7 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
wxMDIChildFrame* oldActiveChild = parent->GetActiveChild();
if (oldActiveChild)
{
wxActivateEvent event(wxEVT_ACTIVATE, FALSE, oldActiveChild->GetId());
wxActivateEvent event(wxEVT_ACTIVATE, false, oldActiveChild->GetId());
event.SetEventObject( oldActiveChild );
oldActiveChild->GetEventHandler()->ProcessEvent(event);
}
@@ -391,7 +391,7 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
XmNresizePolicy, XmRESIZE_NONE,
NULL);
XtAddEventHandler((Widget) m_mainWidget, ExposureMask,FALSE,
XtAddEventHandler((Widget) m_mainWidget, ExposureMask,False,
wxUniversalRepaintProc, (XtPointer) this);
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
@@ -402,21 +402,21 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
SetTitle(title);
clientWindow->AddPage(this, title, TRUE);
clientWindow->AddPage(this, title, true);
clientWindow->Refresh();
// Positions the toolbar and status bar -- but we don't have any.
// PreResize();
wxModelessWindows.Append(this);
return TRUE;
return true;
}
wxMDIChildFrame::~wxMDIChildFrame()
{
if (m_mainWidget)
XtRemoveEventHandler((Widget) m_mainWidget, ExposureMask,FALSE,
XtRemoveEventHandler((Widget) m_mainWidget, ExposureMask,False,
wxUniversalRepaintProc, (XtPointer) this);
if (GetMDIParentFrame())
@@ -463,12 +463,12 @@ void wxMDIChildFrame::OnRaise()
if (oldActiveChild)
{
wxActivateEvent event(wxEVT_ACTIVATE, FALSE, oldActiveChild->GetId());
wxActivateEvent event(wxEVT_ACTIVATE, false, oldActiveChild->GetId());
event.SetEventObject( oldActiveChild );
oldActiveChild->GetEventHandler()->ProcessEvent(event);
}
wxActivateEvent event(wxEVT_ACTIVATE, TRUE, this->GetId());
wxActivateEvent event(wxEVT_ACTIVATE, true, this->GetId());
event.SetEventObject( this );
this->GetEventHandler()->ProcessEvent(event);
}
@@ -480,7 +480,7 @@ void wxMDIChildFrame::OnLower()
if (oldActiveChild == this)
{
wxActivateEvent event(wxEVT_ACTIVATE, FALSE, oldActiveChild->GetId());
wxActivateEvent event(wxEVT_ACTIVATE, false, oldActiveChild->GetId());
event.SetEventObject( oldActiveChild );
oldActiveChild->GetEventHandler()->ProcessEvent(event);
}
@@ -578,14 +578,14 @@ void wxMDIChildFrame::Iconize(bool WXUNUSED(iconize))
bool wxMDIChildFrame::IsIconized() const
{
return FALSE;
return false;
}
// Is it maximized? Always maximized under Motif, using the
// tabbed MDI implementation.
bool wxMDIChildFrame::IsMaximized(void) const
{
return TRUE;
return true;
}
void wxMDIChildFrame::Restore()
@@ -649,10 +649,10 @@ bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style)
{
wxFont font(10, wxSWISS, wxNORMAL, wxNORMAL);
SetFont(font);
return TRUE;
return true;
}
else
return FALSE;
return false;
}
int wxMDIClientWindow::FindPage(const wxNotebookPage* page)
@@ -705,7 +705,7 @@ void wxMDIClientWindow::OnPageChanged(wxNotebookEvent& event)
wxMDIChildFrame* oldChild = (wxMDIChildFrame*) GetPage(event.GetOldSelection());
if (oldChild)
{
wxActivateEvent event(wxEVT_ACTIVATE, FALSE, oldChild->GetId());
wxActivateEvent event(wxEVT_ACTIVATE, false, oldChild->GetId());
event.SetEventObject( oldChild );
oldChild->GetEventHandler()->ProcessEvent(event);
}
@@ -715,7 +715,7 @@ void wxMDIClientWindow::OnPageChanged(wxNotebookEvent& event)
wxMDIChildFrame* activeChild = (wxMDIChildFrame*) GetPage(event.GetSelection());
if (activeChild)
{
wxActivateEvent event(wxEVT_ACTIVATE, TRUE, activeChild->GetId());
wxActivateEvent event(wxEVT_ACTIVATE, true, activeChild->GetId());
event.SetEventObject( activeChild );
activeChild->GetEventHandler()->ProcessEvent(event);

View File

@@ -79,7 +79,7 @@ void wxMenu::Init()
m_buttonWidget = (WXWidget) NULL;
m_menuId = 0;
m_topLevelMenu = (wxMenu*) NULL;
m_ownedByMenuBar = FALSE;
m_ownedByMenuBar = false;
if ( !!m_title )
{
@@ -98,9 +98,9 @@ wxMenu::~wxMenu()
if (m_menuWidget)
{
if (m_menuParent)
DestroyMenu(TRUE);
DestroyMenu(true);
else
DestroyMenu(FALSE);
DestroyMenu(false);
}
// Not sure if this is right
@@ -135,7 +135,7 @@ wxMenuItem* wxMenu::DoAppend(wxMenuItem *pItem)
wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)
{
item->DestroyItem(TRUE);
item->DestroyItem(true);
return wxMenuBase::DoRemove(item);
}
@@ -171,14 +171,14 @@ void wxMenu::SetTitle(const wxString& label)
bool wxMenu::ProcessCommand(wxCommandEvent & event)
{
bool processed = FALSE;
bool processed = false;
#if wxUSE_MENU_CALLBACK
// Try a callback
if (m_callback)
{
(void) (*(m_callback)) (*this, event);
processed = TRUE;
processed = true;
}
#endif // wxUSE_MENU_CALLBACK
@@ -281,14 +281,14 @@ wxString wxMenuBar::GetLabelTop(size_t pos) const
bool wxMenuBar::Append(wxMenu * menu, const wxString& title)
{
wxCHECK_MSG( menu, FALSE, wxT("invalid menu") );
wxCHECK_MSG( !menu->GetParent() && !menu->GetButtonWidget(), FALSE,
wxCHECK_MSG( menu, false, wxT("invalid menu") );
wxCHECK_MSG( !menu->GetParent() && !menu->GetButtonWidget(), false,
wxT("menu already appended") );
if ( m_menuBarFrame )
{
WXWidget w = menu->CreateMenu(this, GetMainWidget(), menu, title, TRUE);
wxCHECK_MSG( w, FALSE, wxT("failed to create menu") );
WXWidget w = menu->CreateMenu(this, GetMainWidget(), menu, title, true);
wxCHECK_MSG( w, false, wxT("failed to create menu") );
menu->SetButtonWidget(w);
}
@@ -300,11 +300,11 @@ bool wxMenuBar::Append(wxMenu * menu, const wxString& title)
bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
{
if ( !wxMenuBarBase::Insert(pos, menu, title) )
return FALSE;
return false;
wxFAIL_MSG(wxT("TODO"));
return FALSE;
return false;
}
wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title)
@@ -324,7 +324,7 @@ wxMenu *wxMenuBar::Remove(size_t pos)
return NULL;
if ( m_menuBarFrame )
menu->DestroyMenu(TRUE);
menu->DestroyMenu(true);
menu->SetMenuBar(NULL);
@@ -375,7 +375,7 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent)
XtManageChild((Widget) m_mainWidget);
*/
XtMapWidget((Widget) m_mainWidget);
return TRUE;
return true;
}
Widget menuBarW = XmCreateMenuBar ((Widget) parent->GetMainWidget(), "MenuBar", NULL, 0);
@@ -386,7 +386,7 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent)
{
wxMenu *menu = GetMenu(i);
wxString title(m_titles[i]);
menu->SetButtonWidget(menu->CreateMenu (this, menuBarW, menu, title, TRUE));
menu->SetButtonWidget(menu->CreateMenu (this, menuBarW, menu, title, true));
if (strcmp (wxStripMenuCodes(title), "Help") == 0)
XtVaSetValues ((Widget) menuBarW, XmNmenuHelpWidget, (Widget) menu->GetButtonWidget(), NULL);
@@ -400,7 +400,7 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent)
NULL);
Widget tearOff = XmGetTearOffControl(GetWidget(menu));
wxDoChangeForegroundColour((Widget) tearOff, m_foregroundColour);
wxDoChangeBackgroundColour((Widget) tearOff, m_backgroundColour, TRUE);
wxDoChangeBackgroundColour((Widget) tearOff, m_backgroundColour, true);
#endif
}
}
@@ -414,7 +414,7 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent)
XtManageChild ((Widget) menuBarW);
SetMenuBarFrame(parent);
return TRUE;
return true;
}
// Destroy menubar, but keep data structures intact so we can recreate it.
@@ -423,7 +423,7 @@ bool wxMenuBar::DestroyMenuBar()
if (!m_mainWidget)
{
SetMenuBarFrame((wxFrame*) NULL);
return FALSE;
return false;
}
XtUnmanageChild ((Widget) m_mainWidget);
@@ -433,7 +433,7 @@ bool wxMenuBar::DestroyMenuBar()
for (size_t i = 0; i < menuCount; i++)
{
wxMenu *menu = GetMenu(i);
menu->DestroyMenu(TRUE);
menu->DestroyMenu(true);
}
XtDestroyWidget((Widget) m_mainWidget);
@@ -441,7 +441,7 @@ bool wxMenuBar::DestroyMenuBar()
SetMenuBarFrame((wxFrame*) NULL);
return TRUE;
return true;
}
// Since PopupMenu under Motif stills grab right mouse button events
@@ -469,7 +469,7 @@ void wxMenu::DestroyWidgetAndDetach()
}
}
DestroyMenu(TRUE);
DestroyMenu(true);
}
// Mark as no longer popped up
@@ -614,7 +614,7 @@ void wxMenu::SetBackgroundColour(const wxColour& col)
if (m_menuWidget)
wxDoChangeBackgroundColour(m_menuWidget, (wxColour&) col);
if (m_buttonWidget)
wxDoChangeBackgroundColour(m_buttonWidget, (wxColour&) col, TRUE);
wxDoChangeBackgroundColour(m_buttonWidget, (wxColour&) col, true);
for ( wxMenuItemList::compatibility_iterator node = GetMenuItems().GetFirst();
node;
@@ -624,7 +624,7 @@ void wxMenu::SetBackgroundColour(const wxColour& col)
if (item->GetButtonWidget())
{
// This crashes because it uses gadgets
// wxDoChangeBackgroundColour(item->GetButtonWidget(), (wxColour&) col, TRUE);
// wxDoChangeBackgroundColour(item->GetButtonWidget(), (wxColour&) col, true);
}
if (item->GetSubMenu())
item->GetSubMenu()->SetBackgroundColour((wxColour&) col);
@@ -706,7 +706,7 @@ bool wxMenuBar::SetBackgroundColour(const wxColour& col)
for (size_t i = 0; i < menuCount; i++)
m_menus.Item(i)->GetData()->SetBackgroundColour((wxColour&) col);
return TRUE;
return true;
}
bool wxMenuBar::SetForegroundColour(const wxColour& col)
@@ -719,7 +719,7 @@ bool wxMenuBar::SetForegroundColour(const wxColour& col)
for (size_t i = 0; i < menuCount; i++)
m_menus.Item(i)->GetData()->SetForegroundColour((wxColour&) col);
return TRUE;
return true;
}
void wxMenuBar::ChangeFont(bool WXUNUSED(keepOriginalSize))
@@ -736,6 +736,6 @@ bool wxMenuBar::SetFont(const wxFont& font)
for (size_t i = 0; i < menuCount; i++)
m_menus.Item(i)->GetData()->SetFont(font);
return TRUE;
return true;
}

View File

@@ -233,7 +233,7 @@ void wxMenuItem::CreateItem (WXWidget menu, wxMenuBar * menuBar, wxMenu * topMen
}
else if (m_subMenu)
{
m_buttonWidget = m_subMenu->CreateMenu (menuBar, menu, topMenu, m_text, TRUE);
m_buttonWidget = m_subMenu->CreateMenu (menuBar, menu, topMenu, m_text, true);
m_subMenu->SetButtonWidget(m_buttonWidget);
XtAddCallback ((Widget) m_buttonWidget,
XmNcascadingCallback,
@@ -334,7 +334,7 @@ void wxMenuItemCallback (Widget WXUNUSED(w), XtPointer clientData,
if (item->IsCheckable())
{
Boolean isChecked = FALSE;
Boolean isChecked = false;
XtVaGetValues ((Widget) item->GetButtonWidget(),
XmNset, & isChecked,
NULL);

View File

@@ -172,10 +172,10 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre
int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
{
if ( !m_refData )
return FALSE;
return false;
// TODO
return FALSE;
return false;
}
bool wxPalette::GetRGB(int index, unsigned char *WXUNUSED(red), unsigned char *WXUNUSED(green), unsigned char *WXUNUSED(blue)) const

View File

@@ -146,7 +146,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
(XtPointer) this);
}
ChangeFont(FALSE);
ChangeFont(false);
SetSelection (0);
@@ -158,7 +158,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
ChangeBackgroundColour();
return TRUE;
return true;
}
bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
@@ -214,16 +214,16 @@ void wxRadioBox::SetSelection(int n)
m_selectedButton = n;
m_inSetValue = TRUE;
m_inSetValue = true;
XmToggleButtonSetState ((Widget) m_radioButtons[n], TRUE, FALSE);
XmToggleButtonSetState ((Widget) m_radioButtons[n], True, False);
int i;
for (i = 0; i < m_noItems; i++)
if (i != n)
XmToggleButtonSetState ((Widget) m_radioButtons[i], FALSE, FALSE);
XmToggleButtonSetState ((Widget) m_radioButtons[i], False, False);
m_inSetValue = FALSE;
m_inSetValue = false;
}
// Get single selection, for single choice list items
@@ -277,13 +277,13 @@ void wxRadioBox::Enable(int n, bool enable)
bool wxRadioBox::Enable(bool enable)
{
if ( !wxControl::Enable(enable) )
return FALSE;
return false;
int i;
for (i = 0; i < m_noItems; i++)
XtSetSensitive ((Widget) m_radioButtons[i], (Boolean) enable);
return TRUE;
return true;
}
bool wxRadioBox::Show(bool show)
@@ -337,10 +337,10 @@ bool wxRadioBox::SetStringSelection (const wxString& s)
if (sel > -1)
{
SetSelection (sel);
return TRUE;
return true;
}
else
return FALSE;
return false;
}
void wxRadioBox::Command (wxCommandEvent & event)
@@ -378,7 +378,7 @@ void wxRadioBox::ChangeBackgroundColour()
{
WXWidget radioButton = m_radioButtons[i];
wxDoChangeBackgroundColour(radioButton, m_backgroundColour, TRUE);
wxDoChangeBackgroundColour(radioButton, m_backgroundColour, true);
XtVaSetValues ((Widget) radioButton,
XmNselectColor, selectPixel,

View File

@@ -89,7 +89,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
ChangeBackgroundColour();
//copied from mac/radiobut.cpp (from here till "return TRUE;")
//copied from mac/radiobut.cpp (from here till "return true;")
m_cycle = this ;
if (HasFlag(wxRB_GROUP))
@@ -113,7 +113,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
}
AddInCycle( chief ) ;
}
return TRUE;
return true;
}
void wxRadioButton::SetValue(bool value)
@@ -121,9 +121,9 @@ void wxRadioButton::SetValue(bool value)
if (GetValue() == value)
return;
m_inSetValue = TRUE;
XmToggleButtonSetState ((Widget) m_mainWidget, (Boolean) value, FALSE);
m_inSetValue = FALSE;
m_inSetValue = true;
XmToggleButtonSetState ((Widget) m_mainWidget, (Boolean) value, False);
m_inSetValue = false;
ClearSelections();
}
@@ -164,19 +164,19 @@ void wxRadioButtonCallback (Widget w, XtPointer clientData,
//based on mac/radiobut.cpp
wxRadioButton* old = item->ClearSelections();
item->SetValue(TRUE);
item->SetValue(true);
if ( old )
{
wxCommandEvent event(wxEVT_COMMAND_RADIOBUTTON_SELECTED,
old->GetId() );
event.SetEventObject(old);
event.SetInt( FALSE );
event.SetInt( false );
old->ProcessCommand(event);
}
wxCommandEvent event2(wxEVT_COMMAND_RADIOBUTTON_SELECTED, item->GetId() );
event2.SetEventObject(item);
event2.SetInt( TRUE );
event2.SetInt( true );
item->ProcessCommand(event2);
}
@@ -213,7 +213,7 @@ wxRadioButton* wxRadioButton::ClearSelections()
if ( cycle->GetValue() )
{
old = cycle;
cycle->SetValue(FALSE);
cycle->SetValue(false);
}
cycle = cycle->NextInCycle();
}

View File

@@ -165,7 +165,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
{
case wxSYS_SYSTEM_FIXED_FONT:
{
return wxFont(12, wxMODERN, wxNORMAL, wxNORMAL, FALSE);
return wxFont(12, wxMODERN, wxNORMAL, wxNORMAL, false);
break;
}
case wxSYS_DEVICE_DEFAULT_FONT:
@@ -173,7 +173,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
case wxSYS_DEFAULT_GUI_FONT:
default:
{
return wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, FALSE);
return wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, false);
break;
}
}
@@ -246,9 +246,9 @@ bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
{
case wxSYS_CAN_ICONIZE_FRAME:
case wxSYS_CAN_DRAW_FRAME_DECORATIONS:
return TRUE;
return true;
default:
return FALSE;
return false;
}
}

View File

@@ -67,7 +67,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
DoSetBitmap();
ChangeFont(FALSE);
ChangeFont(false);
wxSize actualSize(size);
// work around the cases where the bitmap is a wxNull(Icon/Bitmap)

View File

@@ -127,7 +127,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
AttachWidget (parent, m_mainWidget, NULL, pos.x, pos.y, size.x, size.y);
ChangeBackgroundColour();
return TRUE;
return true;
}
wxStaticBox::~wxStaticBox()

View File

@@ -71,7 +71,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
ChangeBackgroundColour ();
return TRUE;
return true;
}
void wxStaticText::SetLabel(const wxString& label)

View File

@@ -392,7 +392,7 @@ void wxTextCtrl::SetSelection(long from, long to)
void wxTextCtrl::WriteText(const wxString& text)
{
long textPosition = GetInsertionPoint() + strlen (text);
long textPosition = GetInsertionPoint() + text.length();
XmTextInsert ((Widget) m_mainWidget, GetInsertionPoint(),
wxConstCast(text.c_str(), char));
XtVaSetValues ((Widget) m_mainWidget, XmNcursorPosition, textPosition, NULL);

View File

@@ -81,7 +81,7 @@ bool wxTimer::Start(int milliseconds, bool mode)
m_milli,
(XtTimerCallbackProc) wxTimerCallback,
(XtPointer) this);
return TRUE;
return true;
}
void wxTimer::Stop()

View File

@@ -205,7 +205,7 @@ bool wxToolBar::Create(wxWindow *parent,
{
if( !wxControl::CreateControl( parent, id, pos, size, style,
wxDefaultValidator, name ) )
return FALSE;
return false;
m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
@@ -232,7 +232,7 @@ bool wxToolBar::Create(wxWindow *parent,
m_mainWidget = (WXWidget) toolbar;
ChangeFont(FALSE);
ChangeFont(false);
wxPoint rPos = pos;
wxSize rSize = size;
@@ -247,7 +247,7 @@ bool wxToolBar::Create(wxWindow *parent,
ChangeBackgroundColour();
return TRUE;
return true;
}
wxToolBar::~wxToolBar()
@@ -261,7 +261,7 @@ bool wxToolBar::Realize()
if ( m_tools.GetCount() == 0 )
{
// nothing to do
return TRUE;
return true;
}
bool isVertical = GetWindowStyle() & wxTB_VERTICAL;
@@ -364,7 +364,7 @@ bool wxToolBar::Realize()
if( !tool->GetButtonWidget() )
{
wxDoChangeBackgroundColour((WXWidget) button,
m_backgroundColour, TRUE);
m_backgroundColour, true);
tool->SetWidget(button);
}
@@ -483,7 +483,7 @@ bool wxToolBar::Realize()
isVertical ? buttonWidth + 2 * marginX : -1,
isVertical ? -1 : buttonHeight + 2*marginY );
return TRUE;
return true;
}
wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord WXUNUSED(x),
@@ -498,7 +498,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool)
{
tool->Attach(this);
return TRUE;
return true;
}
bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool)
@@ -586,7 +586,7 @@ bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool)
}
}
return TRUE;
return true;
}
void wxToolBar::DoEnableTool(wxToolBarToolBase *toolBase, bool enable)
@@ -723,7 +723,7 @@ static void wxToolButtonPopupCallback(Widget w,
wxToolBarTimer::help_popup = (Widget) 0;
// One shot
wxTheToolBarTimer->Start(delayMilli, TRUE);
wxTheToolBarTimer->Start(delayMilli, true);
}
/************************************************************/

View File

@@ -88,7 +88,7 @@ void wxTopLevelWindowMotif::PreDestroy()
XtRemoveEventHandler( (Widget)GetClientWidget(),
ButtonPressMask | ButtonReleaseMask |
PointerMotionMask | KeyPressMask,
FALSE,
False,
wxTLWEventHandler,
(XtPointer)this );
}
@@ -101,7 +101,7 @@ wxTopLevelWindowMotif::~wxTopLevelWindowMotif()
void wxTopLevelWindowMotif::Init()
{
m_isShown = FALSE;
m_isShown = false;
}
bool wxTopLevelWindowMotif::Create( wxWindow *parent, wxWindowID id,
@@ -123,7 +123,7 @@ bool wxTopLevelWindowMotif::Create( wxWindow *parent, wxWindowID id,
bool retval = DoCreate( parent, id, title, pos, size, style, name );
if( !retval ) return FALSE;
if( !retval ) return false;
// Intercept CLOSE messages from the window manager
Widget shell = (Widget)GetShellWidget();
@@ -180,14 +180,14 @@ bool wxTopLevelWindowMotif::Create( wxWindow *parent, wxWindowID id,
// no-decorations case.
if( ( m_windowStyle & wxCAPTION ) != wxCAPTION )
XtVaSetValues( shell,
XmNoverrideRedirect, TRUE,
XmNoverrideRedirect, True,
NULL );
}
XtAddEventHandler( (Widget)GetClientWidget(),
ButtonPressMask | ButtonReleaseMask |
PointerMotionMask | KeyPressMask,
FALSE,
False,
wxTLWEventHandler,
(XtPointer)this );
@@ -276,13 +276,13 @@ bool wxTopLevelWindowMotif::ShowFullScreen( bool show,
long style )
{
// TODO, see wxGTK
return FALSE;
return false;
}
bool wxTopLevelWindowMotif::IsFullScreen() const
{
// TODO, see wxGTK
return FALSE;
return false;
}
void wxTopLevelWindowMotif::Restore()
@@ -291,7 +291,7 @@ void wxTopLevelWindowMotif::Restore()
if( shell )
XtVaSetValues( shell,
XmNiconic, FALSE,
XmNiconic, False,
NULL );
}
@@ -301,7 +301,7 @@ void wxTopLevelWindowMotif::Iconize( bool iconize )
if( !shell ) return;
if( !iconize )
Show( TRUE );
Show( true );
XtVaSetValues( shell,
XmNiconic, (Boolean)iconize,
@@ -313,7 +313,7 @@ bool wxTopLevelWindowMotif::IsIconized() const
Widget shell = GetShell( this );
if( !shell )
return FALSE;
return false;
Boolean iconic;
XtVaGetValues( shell,
@@ -325,7 +325,7 @@ bool wxTopLevelWindowMotif::IsIconized() const
void wxTopLevelWindowMotif::Maximize( bool maximize )
{
Show( TRUE );
Show( true );
if( maximize )
Restore();
@@ -333,7 +333,7 @@ void wxTopLevelWindowMotif::Maximize( bool maximize )
bool wxTopLevelWindowMotif::IsMaximized() const
{
return FALSE;
return false;
}
void wxTopLevelWindowMotif::DoSetSizeHints( int minW, int minH,
@@ -399,7 +399,7 @@ void wxTLWEventHandler( Widget wid,
else
{
// An attempt to implement OnCharHook by calling OnCharHook first;
// if this returns TRUE, set continueToDispatch to False
// if this returns true, set continueToDispatch to False
// (don't continue processing).
// Otherwise set it to True and call OnChar.
wxKeyEvent keyEvent( wxEVT_CHAR );

View File

@@ -89,7 +89,7 @@ void wxFlushEvents(WXDisplay* wxdisplay)
Display *display = (Display*)wxdisplay;
wxEventLoop evtLoop;
XSync (display, FALSE);
XSync (display, False);
while (evtLoop.Pending())
{
@@ -197,7 +197,7 @@ static char * GetIniFile (char *dest, const char *filename)
return dest;
}
static char *GetResourcePath(char *buf, const char *name, bool create = FALSE)
static char *GetResourcePath(char *buf, const char *name, bool create = false)
{
if (create && wxFileExists (name) ) {
strcpy(buf, name);
@@ -240,7 +240,7 @@ wxFlushResources (void)
{
const char *file = node->GetKeyString();
// If file doesn't exist, create it first.
(void)GetResourcePath(nameBuffer, file, TRUE);
(void)GetResourcePath(nameBuffer, file, true);
XrmDatabase database = (XrmDatabase) node->Data ();
XrmPutFileDatabase (database, nameBuffer);
@@ -356,7 +356,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, char **value,
strncpy (*value, xvalue.addr, (int) xvalue.size);
return true;
}
return FALSE;
return false;
}
bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file)
@@ -369,7 +369,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, float *value,
delete[] s;
return true;
}
else return FALSE;
else return false;
}
bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file)
@@ -382,7 +382,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, long *value,
delete[] s;
return true;
}
else return FALSE;
else return false;
}
bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file)
@@ -394,10 +394,10 @@ bool wxGetResource(const wxString& section, const wxString& entry, int *value, c
// Handle True, False here
// True, Yes, Enables, Set or Activated
if (*s == 'T' || *s == 'Y' || *s == 'E' || *s == 'S' || *s == 'A')
*value = TRUE;
*value = true;
// False, No, Disabled, Reset, Cleared, Deactivated
else if (*s == 'F' || *s == 'N' || *s == 'D' || *s == 'R' || *s == 'C')
*value = FALSE;
*value = false;
// Handle as Integer
else
*value = (int) strtol (s, NULL, 10);
@@ -405,7 +405,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, int *value, c
return true;
}
else
return FALSE;
return false;
}
void wxXMergeDatabases (wxApp * theApp, Display * display)
@@ -492,7 +492,7 @@ wxSetDefaultResources (const Widget w, const char **resourceSpec, const char *na
{
#if (XlibSpecificationRelease>=5)
XrmDatabase db = XtDatabase (dpy);
XrmCombineDatabase (rdb, &db, FALSE);
XrmCombineDatabase (rdb, &db, False);
#else
XrmMergeDatabases (dpy->db, &rdb);
dpy->db = rdb;
@@ -620,7 +620,7 @@ bool wxSetDisplay(const wxString& display_name)
return true;
}
else
return FALSE;
return false;
}
}

View File

@@ -54,7 +54,7 @@
// DoSetSizeIntr and DoMoveWindowIntr
// PROBLEM:
// under Motif composite controls (such as wxCalendarCtrl or generic wxSpinCtrl
// did nott work and/or segfaulted because
// did not work and/or segfaulted because
// 1) wxWindow::Create calls SetSize,
// which results in a call to DoSetSize much earlier than in the other ports
// 2) if wxWindow::Create is called (wxControl::Create calls it)
@@ -172,7 +172,7 @@ bool wxWindow::MapOrUnmap(WXWidget widget, bool domap)
{
Widget w = (Widget)widget;
if ( !w )
return FALSE;
return false;
// Rationale: a lot of common operations (including but not
// limited to moving, resizing and appending items to a listbox)
@@ -194,7 +194,7 @@ bool wxWindow::MapOrUnmap(WXWidget widget, bool domap)
// XtUnmapWidget(w);
}
return TRUE;
return true;
}
// ----------------------------------------------------------------------------
@@ -204,12 +204,12 @@ bool wxWindow::MapOrUnmap(WXWidget widget, bool domap)
void wxWindow::Init()
{
// Motif-specific
m_needsRefresh = TRUE;
m_needsRefresh = true;
m_mainWidget = (WXWidget) 0;
m_winCaptured = FALSE;
m_winCaptured = false;
m_isShown = TRUE;
m_isShown = true;
m_hScrollBar =
m_vScrollBar =
@@ -238,7 +238,7 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
long style,
const wxString& name)
{
wxCHECK_MSG( parent, FALSE, "can't create wxWindow without parent" );
wxCHECK_MSG( parent, false, "can't create wxWindow without parent" );
CreateBase(parent, id, pos, size, style, wxDefaultValidator, name);
@@ -341,8 +341,8 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
// Scrolled widget needs to have its colour changed or we get a little blue
// square where the scrollbars abutt
wxColour backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
wxDoChangeBackgroundColour(m_scrolledWindow, backgroundColour, TRUE);
wxDoChangeBackgroundColour(m_drawingArea, backgroundColour, TRUE);
wxDoChangeBackgroundColour(m_scrolledWindow, backgroundColour, true);
wxDoChangeBackgroundColour(m_drawingArea, backgroundColour, true);
XmScrolledWindowSetAreas(
(Widget)m_scrolledWindow,
@@ -353,8 +353,8 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
// sample).
SetCursor(*wxSTANDARD_CURSOR);
SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
DoSetSizeIntr(pos.x, pos.y, size.x,size.y, wxSIZE_AUTO, TRUE);
return TRUE;
DoSetSizeIntr(pos.x, pos.y, size.x,size.y, wxSIZE_AUTO, true);
return true;
}
// Destructor
@@ -363,7 +363,7 @@ wxWindow::~wxWindow()
if (g_captureWindow == this)
g_captureWindow = NULL;
m_isBeingDeleted = TRUE;
m_isBeingDeleted = true;
// Motif-specific actions first
WXWidget wMain = GetMainWidget();
@@ -493,7 +493,7 @@ void wxWindow::CreateScrollbar(wxOrientation orientation)
m_hScrollBar = DoCreateScrollBar( m_scrolledWindow, wxHORIZONTAL,
(void (*)())wxScrollBarCallback );
wxDoChangeBackgroundColour(m_hScrollBar, backgroundColour, TRUE);
wxDoChangeBackgroundColour(m_hScrollBar, backgroundColour, true);
XtRealizeWidget( (Widget)m_hScrollBar );
@@ -508,7 +508,7 @@ void wxWindow::CreateScrollbar(wxOrientation orientation)
m_vScrollBar = DoCreateScrollBar( m_scrolledWindow, wxVERTICAL,
(void (*)())wxScrollBarCallback );
wxDoChangeBackgroundColour(m_vScrollBar, backgroundColour, TRUE);
wxDoChangeBackgroundColour(m_vScrollBar, backgroundColour, true);
XtRealizeWidget((Widget)m_vScrollBar);
@@ -595,7 +595,7 @@ wxWindow *wxWindowBase::DoFindFocus()
bool wxWindow::Enable(bool enable)
{
if ( !wxWindowBase::Enable(enable) )
return FALSE;
return false;
Widget wMain = (Widget)GetMainWidget();
if ( wMain )
@@ -604,13 +604,13 @@ bool wxWindow::Enable(bool enable)
XmUpdateDisplay(wMain);
}
return TRUE;
return true;
}
bool wxWindow::Show(bool show)
{
if ( !wxWindowBase::Show(show) )
return FALSE;
return false;
if (m_borderWidget || m_scrolledWindow)
{
@@ -623,7 +623,7 @@ bool wxWindow::Show(bool show)
MapOrUnmap(GetMainWidget(), show);
}
return TRUE;
return true;
}
// Raise the window to the top of the Z order
@@ -663,9 +663,9 @@ void wxWindow::DoCaptureMouse()
Widget wMain = (Widget)GetMainWidget();
if ( wMain )
XtAddGrab(wMain, TRUE, FALSE);
XtAddGrab(wMain, True, False);
m_winCaptured = TRUE;
m_winCaptured = true;
}
void wxWindow::DoReleaseMouse()
@@ -678,7 +678,7 @@ void wxWindow::DoReleaseMouse()
if ( wMain )
XtRemoveGrab(wMain);
m_winCaptured = FALSE;
m_winCaptured = false;
}
bool wxWindow::SetFont(const wxFont& font)
@@ -686,12 +686,12 @@ bool wxWindow::SetFont(const wxFont& font)
if ( !wxWindowBase::SetFont(font) )
{
// nothing to do
return FALSE;
return false;
}
ChangeFont();
return TRUE;
return true;
}
bool wxWindow::SetCursor(const wxCursor& cursor)
@@ -699,7 +699,7 @@ bool wxWindow::SetCursor(const wxCursor& cursor)
if ( !wxWindowBase::SetCursor(cursor) )
{
// no change
return FALSE;
return false;
}
// wxASSERT_MSG( m_cursor.Ok(),
@@ -717,7 +717,7 @@ bool wxWindow::SetCursor(const wxCursor& cursor)
Window win = XtWindow(w);
XDefineCursor((Display*) dpy, win, (Cursor) x_cursor);
return TRUE;
return true;
}
// Coordinates relative to the window
@@ -899,7 +899,7 @@ void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect)
XCopyArea(display, window, window, (GC) dc.GetGC(),
x1, y1, w1, h1, x2, y2);
dc.SetAutoSetting(TRUE);
dc.SetAutoSetting(true);
wxBrush brush(GetBackgroundColour(), wxSOLID);
dc.SetBrush(brush); // FIXME: needed?
@@ -1091,11 +1091,11 @@ bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y)
*/
if (menu->GetParent() && (menu->GetId() != -1))
return FALSE;
return false;
if (menu->GetMainWidget())
{
menu->DestroyMenu(TRUE);
menu->DestroyMenu(true);
}
menu->SetId(1); /* Mark as popped-up */
@@ -1158,7 +1158,7 @@ bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y)
wxDoEventLoopIteration( evtLoop );
}
return TRUE;
return true;
}
#endif
@@ -1169,7 +1169,7 @@ bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y)
bool wxWindow::PreResize()
{
return TRUE;
return true;
}
// Get total size
@@ -1250,7 +1250,7 @@ void wxWindow::DoGetClientSize(int *x, int *y) const
void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
DoSetSizeIntr(x, y, width, height, sizeFlags, FALSE);
DoSetSizeIntr(x, y, width, height, sizeFlags, false);
}
void wxWindow::DoSetSizeIntr(int x, int y, int width, int height,
@@ -1542,7 +1542,7 @@ void wxWindow::AddUpdateRect(int x, int y, int w, int h)
void wxWindow::Refresh(bool eraseBack, const wxRect *rect)
{
m_needsRefresh = TRUE;
m_needsRefresh = true;
Display *display = XtDisplay((Widget) GetMainWidget());
Window thisWindow = XtWindow((Widget) GetMainWidget());
@@ -1654,7 +1654,7 @@ void wxWindow::DoPaint()
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
m_needsRefresh = FALSE;
m_needsRefresh = false;
}
}
@@ -1697,7 +1697,7 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event)
{
#if wxUSE_ACCEL
if (!m_acceleratorTable.Ok())
return FALSE;
return false;
int count = m_acceleratorTable.GetCount();
wxAcceleratorEntry* entries = m_acceleratorTable.GetEntries();
@@ -1717,7 +1717,7 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event)
parent = parent->GetParent();
if (!parent)
return FALSE;
return false;
wxFrame* frame = wxDynamicCast(parent, wxFrame);
if ( frame )
@@ -1732,7 +1732,7 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event)
wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, entry->GetCommand());
commandEvent.SetEventObject(frame);
// If ProcessEvent returns TRUE (it was handled), then
// If ProcessEvent returns true (it was handled), then
// the calling code will skip the event handling.
return frame->GetEventHandler()->ProcessEvent(commandEvent);
}
@@ -1745,7 +1745,7 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event)
// No such child
if (!child)
return FALSE;
return false;
// Now we process those kinds of windows that we can.
// For now, only buttons.
@@ -1756,13 +1756,13 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event)
return child->GetEventHandler()->ProcessEvent(commandEvent);
}
return FALSE;
return false;
} // matches event
}// for
#endif
// We didn't match the key event against an accelerator.
return FALSE;
return false;
}
// ============================================================================
@@ -1780,7 +1780,7 @@ bool wxAddWindowToTable(Widget w, wxWindow *win)
{
wxLogDebug("Widget table clash: new widget is %ld, %s",
(long)w, win->GetClassInfo()->GetClassName());
return FALSE;
return false;
}
wxWidgetHashTable->Put((long) w, win);
@@ -1788,7 +1788,7 @@ bool wxAddWindowToTable(Widget w, wxWindow *win)
wxLogTrace("widget", "Widget 0x%p <-> window %p (%s)",
(WXWidget)w, win, win->GetClassInfo()->GetClassName());
return TRUE;
return true;
}
wxWindow *wxGetWindowFromTable(Widget w)
@@ -1831,7 +1831,7 @@ bool wxWindow::AttachWidget (wxWindow* WXUNUSED(parent), WXWidget mainWidget,
if (formWidget)
{
if (!wxAddWindowToTable((Widget) formWidget, this))
return FALSE;
return false;
XtTranslations ptr;
XtOverrideTranslations ((Widget) formWidget,
@@ -1859,7 +1859,7 @@ bool wxWindow::DetachWidget(WXWidget widget)
(XtPointer)this);
wxDeleteWindowFromTable((Widget) widget);
return TRUE;
return true;
}
// ----------------------------------------------------------------------------
@@ -2112,9 +2112,9 @@ static void wxPanelItemEventHandler(Widget wid,
}
// TODO: probably the key to allowing default behaviour to happen. Say we
// set a m_doDefault flag to FALSE at the start of this function. Then in
// set a m_doDefault flag to false at the start of this function. Then in
// e.g. wxWindow::OnMouseEvent we can call Default() which sets this flag to
// TRUE, indicating that default processing can happen. Thus, behaviour can
// true, indicating that default processing can happen. Thus, behaviour can
// appear to be overridden just by adding an event handler and not calling
// wxWindow::OnWhatever. ALSO, maybe we can use this instead of the current
// way of handling drawing area events, to simplify things.
@@ -2324,11 +2324,11 @@ bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win,
eventType = wxEVT_RIGHT_UP;
}
else
return FALSE;
return false;
}
else
{
return FALSE;
return false;
}
wxevent.SetEventType(eventType);
@@ -2371,10 +2371,10 @@ bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win,
wxevent.SetId(win->GetId());
wxevent.SetEventObject(win);
return TRUE;
return true;
}
}
return FALSE;
return false;
}
bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win,
@@ -2396,13 +2396,13 @@ bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win,
id = toupper(id);
if (xevent->xkey.state & ShiftMask)
wxevent.m_shiftDown = TRUE;
wxevent.m_shiftDown = true;
if (xevent->xkey.state & ControlMask)
wxevent.m_controlDown = TRUE;
wxevent.m_controlDown = true;
if (xevent->xkey.state & Mod3Mask)
wxevent.m_altDown = TRUE;
wxevent.m_altDown = true;
if (xevent->xkey.state & Mod1Mask)
wxevent.m_metaDown = TRUE;
wxevent.m_metaDown = true;
wxevent.SetEventObject(win);
wxevent.m_keyCode = id;
wxevent.SetTimestamp(xevent->xkey.time);
@@ -2411,15 +2411,15 @@ bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win,
wxevent.m_y = xevent->xbutton.y;
if (id > -1)
return TRUE;
return true;
else
return FALSE;
return false;
break;
}
default:
break;
}
return FALSE;
return false;
}
// ----------------------------------------------------------------------------
@@ -2507,21 +2507,21 @@ void wxWindow::ChangeForegroundColour()
bool wxWindow::SetBackgroundColour(const wxColour& col)
{
if ( !wxWindowBase::SetBackgroundColour(col) )
return FALSE;
return false;
ChangeBackgroundColour();
return TRUE;
return true;
}
bool wxWindow::SetForegroundColour(const wxColour& col)
{
if ( !wxWindowBase::SetForegroundColour(col) )
return FALSE;
return false;
ChangeForegroundColour();
return TRUE;
return true;
}
void wxWindow::ChangeFont(bool keepOriginalSize)