#ifndef WX_PRECOMP
#include "wx/hash.h"
+ #include "wx/utils.h"
#endif // PCH
#include "wx/fontutil.h"
#pragma message enable nosimpint
#endif
- #include "wx/utils.h" // for wxGetDisplay()
#elif defined(__WXGTK__)
// we have to declare struct tm to avoid problems with first forward
// declaring it in C code (glib.h included from gdk.h does it) and then
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
+
#ifndef WX_PRECOMP
+ #include "wx/utils.h"
#endif
#include "wx/settings.h"
#include "wx/gdicmn.h"
-#include "wx/utils.h"
#include "wx/cocoa/autorelease.h"
// Created: 2004-10-05
// RCS-ID: $Id$
// Copyright: (c) Ryan Norton
-// Licence: wxWindows licence
+// Licence: wxWindows licence
// Notes: This code may be useful on platforms other than Darwin.
// On Darwin we share the CoreFoundation code with wxMac.
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
+
#ifndef WX_PRECOMP
+ #include "wx/utils.h"
#endif
+
#include "wx/unix/execute.h"
-#include "wx/utils.h"
#if 0
-#include "wx/utils.h"
-
#include "wx/process.h"
#include "wx/stream.h"
class wxPipeInputStream : public wxInputStream
{
public:
- wxPipeInputStream(NSPipe* thePipe) :
+ wxPipeInputStream(NSPipe* thePipe) :
m_thePipe(thePipe),
m_theHandle([m_thePipe fileHandleForReading])
{
}
~wxPipeInputStream()
- {
+ {
[m_thePipe release];
}
memcpy(buffer, [theData bytes], [theData length]);
return [theData length];
}
-
-
- NSPipe* m_thePipe;
- NSFileHandle* m_theHandle;
+
+
+ NSPipe* m_thePipe;
+ NSFileHandle* m_theHandle;
};
class wxPipeOutputStream : public wxOutputStream
{
public:
- wxPipeOutputStream(NSPipe* thePipe) :
+ wxPipeOutputStream(NSPipe* thePipe) :
m_thePipe(thePipe),
m_theHandle([m_thePipe fileHandleForWriting])
{
}
~wxPipeOutputStream()
- {
+ {
[m_thePipe release];
}
virtual size_t OnSysWrite(const void *buffer, size_t bufsize)
{
- NSData* theData = [NSData dataWithBytesNoCopy:(void*)buffer
+ NSData* theData = [NSData dataWithBytesNoCopy:(void*)buffer
length:bufsize];
[m_theHandle writeData:theData];
return bufsize;
}
-
- NSPipe* m_thePipe;
- NSFileHandle* m_theHandle;
+
+ NSPipe* m_thePipe;
+ NSFileHandle* m_theHandle;
};
@interface wxTaskHandler : NSObject
@implementation wxTaskHandler : NSObject
--(id)init:(void*)handle processIdentifier:(long)pid
+-(id)init:(void*)handle processIdentifier:(long)pid
{
self = [super init];
-
+
m_handle = handle;
m_pid = pid;
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(termHandler:)
- name:NSTaskDidTerminateNotification
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(termHandler:)
+ name:NSTaskDidTerminateNotification
object:nil];
return self;
}
-- (void)termHandler:(NSNotification *)aNotification
+- (void)termHandler:(NSNotification *)aNotification
{
NSTask* theTask = [aNotification object];
-
+
if ([theTask processIdentifier] == m_pid)
{
- ((wxProcess*)m_handle)->OnTerminate([theTask processIdentifier],
+ ((wxProcess*)m_handle)->OnTerminate([theTask processIdentifier],
[theTask terminationStatus]);
-
+
[self release];
}
}
@end
-long wxExecute(const wxString& command,
- int sync,
- wxProcess *handle)
+long wxExecute(const wxString& command,
+ int sync,
+ wxProcess *handle)
{
NSTask* theTask = [[NSTask alloc] init];
-
+
if (handle && handle->IsRedirected())
{
NSPipe* theStdinPipe = [[NSPipe alloc] init];
NSPipe* theStderrPipe = [[NSPipe alloc] init];
NSPipe* theStdoutPipe = [[NSPipe alloc] init];
-
+
[theTask setStandardInput:theStdinPipe];
[theTask setStandardError:theStderrPipe];
[theTask setStandardOutput:theStdoutPipe];
-
+
handle->SetPipeStreams(new wxPipeInputStream(theStdoutPipe),
new wxPipeOutputStream(theStdinPipe),
new wxPipeInputStream(theStderrPipe) );
}
-
- NSArray* theQuoteArguments =
+
+ NSArray* theQuoteArguments =
[wxNSStringWithWxString(command) componentsSeparatedByString:@"\""];
-
- NSMutableArray* theSeparatedArguments =
+
+ NSMutableArray* theSeparatedArguments =
[NSMutableArray arrayWithCapacity:10];
-
+
for (unsigned i = 0; i < [theQuoteArguments count]; ++i)
{
[theSeparatedArguments addObjectsFromArray:
[[theQuoteArguments objectAtIndex:i] componentsSeparatedByString:@" "]
];
-
+
if(++i < [theQuoteArguments count])
[theSeparatedArguments addObject:[theQuoteArguments objectAtIndex:i]];
}
-
+
[theTask setLaunchPath:[theSeparatedArguments objectAtIndex:0]];
[theTask setArguments:theSeparatedArguments];
[theTask launch];
-
+
if(sync & wxEXEC_ASYNC)
{
- [[wxTaskHandler alloc]init:handle
+ [[wxTaskHandler alloc]init:handle
processIdentifier:[theTask processIdentifier]];
-
+
return 0;
}
else
{
[theTask waitUntilExit];
-
+
return [theTask terminationStatus];
- }
+ }
}
#endif //0
-
#include "wx/app.h"
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif //WX_PRECOMP
-#include "wx/utils.h"
#include "wx/apptrait.h"
#include "wx/cmdline.h"
#include "wx/confbase.h"
#include "wx/msgdlg.h"
#include "wx/bitmap.h"
#include "wx/confbase.h"
+ #include "wx/utils.h"
#endif
#include "wx/apptrait.h"
#include "wx/evtloop.h"
#include "wx/msgout.h"
#include "wx/thread.h"
-#include "wx/utils.h"
#include "wx/ptr_scpd.h"
#if defined(__WXMSW__)
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/utils.h"
#endif // WX_PRECOMP
-#include "wx/utils.h"
#include "wx/palette.h"
#include "wx/icon.h"
#include "wx/image.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif //WX_PRECOMP
#include "wx/arrstr.h"
#if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || wxUSE_CONFIG_NATIVE)
#include "wx/file.h"
-#include "wx/utils.h"
#include "wx/math.h"
#include <stdlib.h>
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif //WX_PRECOMP
#include "wx/filefn.h"
-#include "wx/utils.h"
#include "wx/filename.h" // for SplitPath()
#include "wx/apptrait.h"
#ifndef WX_PRECOMP
#include "wx/list.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#if wxUSE_GUI
#include "wx/control.h"
- #include "wx/utils.h"
#include "wx/dc.h"
#include "wx/textctrl.h"
#endif // wxUSE_GUI
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h" // for wxGetHomeDir
#endif //WX_PRECOMP
#include "wx/file.h"
#include "wx/stream.h"
#endif // wxUSE_STREAMS
-#include "wx/utils.h" // for wxGetHomeDir
#if defined(__WXMAC__)
#include "wx/mac/private.h" // includes mac headers
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
-#include "wx/utils.h"
#include "wx/file.h" // This does include filefn.h
#include "wx/filename.h"
#include "wx/dir.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/file.h"
+ #include "wx/utils.h"
#endif
#include "wx/filename.h"
#include "wx/tokenzr.h"
#include "wx/config.h" // for wxExpandEnvVars
-#include "wx/utils.h"
#include "wx/file.h"
#include "wx/dynlib.h"
#include "wx/log.h"
#include "wx/event.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/brush.h"
#include "wx/font.h"
#include "wx/palette.h"
#include "wx/dc.h"
-#include "wx/utils.h"
#include "wx/settings.h"
#include "wx/hashmap.h"
#include "wx/log.h"
#include "wx/app.h"
#include "wx/hash.h"
+ #include "wx/utils.h"
#endif
#include "wx/image.h"
#include "wx/wfstream.h"
#include "wx/intl.h"
#include "wx/module.h"
-#include "wx/utils.h"
#include "wx/math.h"
#if wxUSE_XPM
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/intl.h"
+ #include "wx/utils.h"
#endif
#include "wx/imagxpm.h"
#include "wx/wfstream.h"
-#include "wx/utils.h"
#include "wx/xpmdecod.h"
IMPLEMENT_DYNAMIC_CLASS(wxXPMHandler,wxImageHandler)
#include "wx/arrstr.h"
#include "wx/intl.h"
#include "wx/string.h"
+ #include "wx/utils.h"
#endif //WX_PRECOMP
#include "wx/apptrait.h"
#include "wx/msgout.h"
#include "wx/textfile.h"
#include "wx/thread.h"
-#include "wx/utils.h"
#include "wx/wxchar.h"
// other standard headers
#include "wx/string.h"
#include "wx/intl.h"
#include "wx/math.h"
+ #include "wx/utils.h"
#endif // WX_PRECOMP
#include "wx/sizer.h"
-#include "wx/utils.h"
#include "wx/statbox.h"
#include "wx/settings.h"
#include "wx/listimpl.cpp"
#include "wx/log.h"
#include "wx/event.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/apptrait.h"
#include "wx/timer.h"
-#include "wx/utils.h"
#include "wx/module.h"
#include "wx/sckaddr.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/utils.h" // for wxStripMenuCodes()
#endif
-#include "wx/utils.h" // for wxStripMenuCodes()
-
bool wxIsStockID(wxWindowID id)
{
switch (id)
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/strconv.h"
#include "wx/encconv.h"
#include "wx/fontmap.h"
-#include "wx/utils.h"
#ifdef __WXMAC__
#ifndef __DARWIN__
#ifndef WX_PRECOMP
#include "wx/list.h"
#include "wx/string.h"
+ #include "wx/utils.h"
#endif
-#include "wx/utils.h"
#include "wx/module.h"
#include <string.h>
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/stream.h"
#include "wx/image.h"
-#include "wx/utils.h"
#include "wx/hashmap.h"
#include <string.h>
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/zipstrm.h"
#include "wx/datstrm.h"
#include "wx/zstream.h"
#include "wx/mstream.h"
-#include "wx/utils.h"
#include "wx/buffer.h"
#include "wx/ptr_scpd.h"
#include "wx/wfstream.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
-#include "wx/utils.h"
// normally, the compiler options should contain -I../zlib, but it is
// apparently not the case for all MSW makefiles and so, unless we use
// configure (which defines __WX_SETUP_H__) or it is explicitly overridden by
// the user (who can define wxUSE_ZLIB_H_IN_PATH), we hardcode the path here
#if defined(__WXMSW__) && !defined(__WX_SETUP_H__) && !defined(wxUSE_ZLIB_H_IN_PATH)
- #include "../zlib/zlib.h"
+ #include "../zlib/zlib.h"
#else
- #include "zlib.h"
+ #include "zlib.h"
#endif
enum {
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif // WX_PRECOMP
#include "wx/dcmemory.h"
-#include "wx/utils.h"
#include "wx/image.h"
#include "wx/prntbase.h"
#include "wx/generic/prntdlgg.h"
#include "wx/hash.h"
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/module.h"
-#include "wx/utils.h"
#include "wx/button.h"
#include "wx/layout.h"
#include "wx/msgdlg.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: generic/region.cpp
+// Name: src/generic/region.cpp
// Purpose: generic wxRegion class
// Author: David Elliott
// Modified by:
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
#include "wx/generic/region.h"
-#include "wx/utils.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
// ========================================================================
// Classes to interface with X.org code
return(partIn ? ((ry < prect->y2) ? wxPartRegion : wxInRegion) :
wxOutRegion);
}
-
/////////////////////////////////////////////////////////////////////////////
-// Name: generic/scrolwin.cpp
+// Name: src/generic/scrolwin.cpp
// Purpose: wxScrolledWindow implementation
// Author: Julian Smart
// Modified by: Vadim Zeitlin on 31.08.00: wxScrollHelper allows to implement.
#pragma hdrstop
#endif
-#include "wx/utils.h"
+#include "wx/scrolwin.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/dcclient.h"
-#include "wx/scrolwin.h"
#include "wx/panel.h"
#if wxUSE_TIMER
#include "wx/timer.h"
}
#endif // __WXMSW__
-
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/gdicmn.h"
-#include "wx/utils.h"
#include "wx/memory.h"
#include "wx/font.h"
#include "wx/settings.h"
// global data
//-----------------------------------------------------------------------------
-bool g_mainThreadLocked = FALSE;
+bool g_mainThreadLocked = false;
gint g_pendingTag = 0;
static GtkWidget *gs_RootWindow = (GtkWidget*) NULL;
gint res = wxPoll( (wxPollFd *) ufds, nfds, timeout );
wxMutexGuiEnter();
- g_mainThreadLocked = FALSE;
+ g_mainThreadLocked = false;
gdk_threads_leave();
wxASSERT_MSG( wxTheApp->m_idleTag == 0, wxT("attempt to install idle handler twice") );
- g_isIdle = FALSE;
+ g_isIdle = false;
if (g_pendingTag == 0)
g_pendingTag = g_idle_add_full( 900, wxapp_pending_callback, NULL, NULL );
wxApp::wxApp()
{
#ifdef __WXDEBUG__
- m_isInAssert = FALSE;
+ m_isInAssert = false;
#endif // __WXDEBUG__
m_idleTag = 0;
bool wxApp::OnInitGui()
{
if ( !wxAppBase::OnInitGui() )
- return FALSE;
+ return false;
GdkVisual *visual = gdk_visual_get_system();
wxAppBase::OnAssert(file, line, cond, msg);
- m_isInAssert = FALSE;
+ m_isInAssert = false;
}
#endif // __WXDEBUG__
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/dataobj.h"
-#include "wx/utils.h"
#include "wx/gtk/private.h"
wxLogTrace( TRACE_CLIPBOARD,
_T("got unsupported clipboard target") );
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
}
}
}
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
}
}
{
if (!wxTheClipboard)
{
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
if (!data_object)
{
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
if (selection_data->length <= 0)
{
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
// make sure we got the data in the correct format
if (!data_object->IsSupportedFormat( format ) )
{
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
// if so, copy data to target object
if (selection_data->type != GDK_SELECTION_TYPE_STRING)
{
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
#endif
data_object->SetData( format, (size_t) selection_data->length, (const char*) selection_data->data );
wxTheClipboard->m_formatSupported = true;
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
}
}
wxClipboard::wxClipboard()
{
- m_open = FALSE;
- m_waiting = FALSE;
+ m_open = false;
+ m_waiting = false;
- m_ownsClipboard = FALSE;
- m_ownsPrimarySelection = FALSE;
+ m_ownsClipboard = false;
+ m_ownsPrimarySelection = false;
m_data = (wxDataObject*) NULL;
m_receivedData = (wxDataObject*) NULL;
if (!g_targetsAtom) g_targetsAtom = gdk_atom_intern ("TARGETS", FALSE);
if (!g_timestampAtom) g_timestampAtom = gdk_atom_intern ("TIMESTAMP", FALSE);
- m_formatSupported = FALSE;
+ m_formatSupported = false;
m_targetRequested = 0;
- m_usePrimary = FALSE;
+ m_usePrimary = false;
}
wxClipboard::~wxClipboard()
if (gdk_selection_owner_get( GDK_SELECTION_PRIMARY ) == m_clipboardWidget->window)
{
- m_waiting = TRUE;
+ m_waiting = true;
gtk_selection_owner_set( (GtkWidget*) NULL, GDK_SELECTION_PRIMARY,
(guint32) GDK_CURRENT_TIME );
}
m_targetRequested = 0;
- m_formatSupported = FALSE;
+ m_formatSupported = 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;
+ m_open = true;
- return 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();
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();
{
wxCHECK_RET( m_open, wxT("clipboard not open") );
- m_open = FALSE;
+ m_open = false;
}
bool wxClipboard::IsOpened() const
bool wxClipboard::IsSupported( const wxDataFormat& format )
{
/* reentrance problems */
- if (m_waiting) return FALSE;
+ if (m_waiting) return false;
/* store requested format to be asked for by callbacks */
m_targetRequested = format;
wxT("wxClipboard:IsSupported: requested format: %s"),
format.GetId().c_str() );
- wxCHECK_MSG( m_targetRequested, FALSE, wxT("invalid clipboard format") );
+ wxCHECK_MSG( m_targetRequested, false, wxT("invalid clipboard format") );
- m_formatSupported = FALSE;
+ m_formatSupported = false;
/* perform query. this will set m_formatSupported to
- TRUE if m_targetRequested is supported.
+ true if m_targetRequested is supported.
also, we have to wait for the "answer" from the
clipboard owner which is an asynchronous process.
- therefore we set m_waiting = TRUE here and wait
+ therefore we set m_waiting = true here and wait
until the callback "targets_selection_received"
- sets it to FALSE */
+ sets it to false */
- m_waiting = TRUE;
+ m_waiting = true;
gtk_selection_convert( m_targetsWidget,
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
bool wxClipboard::GetData( wxDataObject& data )
{
- wxCHECK_MSG( m_open, FALSE, wxT("clipboard not open") );
+ wxCHECK_MSG( m_open, false, wxT("clipboard not open") );
/* get formats from wxDataObjects */
wxDataFormat *array = new wxDataFormat[ data.GetFormatCount() ];
/* store requested format to be asked for by callbacks */
m_targetRequested = format;
- wxCHECK_MSG( m_targetRequested, FALSE, wxT("invalid clipboard format") );
+ wxCHECK_MSG( m_targetRequested, false, wxT("invalid clipboard format") );
- m_formatSupported = FALSE;
+ m_formatSupported = false;
/* perform query. this will set m_formatSupported to
- TRUE if m_targetRequested is supported.
+ true if m_targetRequested is supported.
also, we have to wait for the "answer" from the
clipboard owner which is an asynchronous process.
- therefore we set m_waiting = TRUE here and wait
+ therefore we set m_waiting = true here and wait
until the callback "targets_selection_received"
- sets it to FALSE */
+ sets it to false */
- m_waiting = TRUE;
+ m_waiting = true;
gtk_selection_convert( m_targetsWidget,
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
/* store requested format to be asked for by callbacks */
m_targetRequested = format;
- wxCHECK_MSG( m_targetRequested, FALSE, wxT("invalid clipboard format") );
+ wxCHECK_MSG( m_targetRequested, false, wxT("invalid clipboard format") );
/* start query */
- m_formatSupported = FALSE;
+ m_formatSupported = false;
/* ask for clipboard contents. this will set
- m_formatSupported to TRUE if m_targetRequested
+ m_formatSupported to true if m_targetRequested
is supported.
also, we have to wait for the "answer" from the
clipboard owner which is an asynchronous process.
- therefore we set m_waiting = TRUE here and wait
+ therefore we set m_waiting = true here and wait
until the callback "targets_selection_received"
- sets it to FALSE */
+ sets it to false */
- m_waiting = TRUE;
+ m_waiting = true;
wxLogTrace( TRACE_CLIPBOARD,
wxT("wxClipboard::GetData: format found, start convert") );
while (m_waiting) gtk_main_iteration();
/* this is a true error as we checked for the presence of such data before */
- wxCHECK_MSG( m_formatSupported, FALSE, wxT("error retrieving data from clipboard") );
+ wxCHECK_MSG( m_formatSupported, false, wxT("error retrieving data from clipboard") );
/* return success */
delete[] array;
- return TRUE;
+ return true;
}
wxLogTrace( TRACE_CLIPBOARD,
/* return failure */
delete[] array;
- return FALSE;
+ return false;
}
#endif
#ifndef WX_PRECOMP
#include "wx/app.h"
+ #include "wx/utils.h"
#endif // WX_PRECOMP
-#include "wx/utils.h"
-
#include "wx/gtk/private.h" //for idle stuff
#include <gdk/gdk.h>
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/window.h"
#include "wx/gdicmn.h"
-#include "wx/utils.h"
#include "wx/gtk/private.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/fontutil.h"
#include "wx/cmndata.h"
-#include "wx/utils.h"
#include "wx/gdicmn.h"
#include "wx/tokenzr.h"
#include "wx/settings.h"
int family = wxFONTFAMILY_DEFAULT,
int style = wxFONTSTYLE_NORMAL,
int weight = wxFONTWEIGHT_NORMAL,
- bool underlined = FALSE,
+ bool underlined = false,
const wxString& faceName = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
bool HasNativeFont() const
{
// we always have a Pango font description
- return TRUE;
+ return true;
}
// setters: all of them also take care to modify m_nativeFontInfo if we
void SetFaceName(const wxString& facename);
void SetEncoding(wxFontEncoding encoding);
- void SetNoAntiAliasing( bool no = TRUE ) { m_noAA = no; }
+ void SetNoAntiAliasing( bool no = true ) { m_noAA = no; }
bool GetNoAntiAliasing() const { return m_noAA; }
// and this one also modifies all the other font data fields
m_underlined = underlined;
m_encoding = encoding;
- m_noAA = FALSE;
+ m_noAA = false;
// Create native font info
m_nativeFontInfo.description = pango_font_description_new();
void wxFontRefData::InitFromNative()
{
- m_noAA = FALSE;
+ m_noAA = false;
// Get native info
PangoFontDescription *desc = m_nativeFontInfo.description;
}
// Pango description are never underlined (?)
- m_underlined = FALSE;
+ m_underlined = false;
// always with GTK+ 2
m_encoding = wxFONTENCODING_UTF8;
m_refData = new wxFontRefData(pointSize, family, style, weight,
underlined, face, encoding);
- return TRUE;
+ return true;
}
bool wxFont::Create(const wxString& fontname)
{
*this = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
- return TRUE;
+ return true;
}
m_refData = new wxFontRefData(fontname);
- return TRUE;
+ return true;
}
void wxFont::Unshare()
bool wxFont::GetUnderlined() const
{
- wxCHECK_MSG( Ok(), FALSE, wxT("invalid font") );
+ wxCHECK_MSG( Ok(), false, wxT("invalid font") );
return M_FONTDATA->m_underlined;
}
bool wxFont::IsFixedWidth() const
{
- wxCHECK_MSG( Ok(), FALSE, wxT("invalid font") );
+ wxCHECK_MSG( Ok(), false, wxT("invalid font") );
return wxFontBase::IsFixedWidth();
}
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/utils.h"
#endif
#include "wx/fontutil.h"
-#include "wx/utils.h"
#include "wx/debug.h"
#include "wx/msgdlg.h"
#include "wx/dynarray.h"
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/arrstr.h"
-#include "wx/utils.h"
#include "wx/checklst.h"
#include "wx/settings.h"
#include "wx/gtk/private.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/panel.h"
-#include "wx/utils.h"
#include "wx/imaglist.h"
#include "wx/bitmap.h"
#include "wx/fontutil.h"
wxCHECK_RET( !notebook->m_inSwitchPage,
_T("gtk_notebook_page_change_callback reentered") );
- notebook->m_inSwitchPage = TRUE;
+ notebook->m_inSwitchPage = true;
if (g_isIdle)
wxapp_install_idle_handler();
notebook->GetEventHandler()->ProcessEvent( eventChanged );
}
- notebook->m_inSwitchPage = FALSE;
+ notebook->m_inSwitchPage = false;
}
}
void wxNotebook::Init()
{
m_padding = 0;
- m_inSwitchPage = FALSE;
+ m_inSwitchPage = false;
m_imageList = (wxImageList *) NULL;
m_selection = -1;
- m_themeEnabled = TRUE;
+ m_themeEnabled = true;
}
wxNotebook::wxNotebook()
const wxPoint& pos, const wxSize& size,
long style, const wxString& name )
{
- m_needParent = TRUE;
- m_acceptsFocus = TRUE;
+ m_needParent = true;
+ m_acceptsFocus = true;
m_insertCallback = (wxInsertChildFunction)wxInsertChildInNotebook;
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( wxT("wxNoteBook creation failed") );
- return FALSE;
+ return false;
}
g_signal_connect (m_widget, "realize",
G_CALLBACK (gtk_notebook_realized_callback), this);
- return TRUE;
+ return true;
}
int wxNotebook::GetSelection() const
bool wxNotebook::SetPageText( size_t page, const wxString &text )
{
- wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
+ wxCHECK_MSG( m_widget != NULL, false, wxT("invalid notebook") );
wxGtkNotebookPage* nb_page = GetNotebookPage(page);
- wxCHECK_MSG( nb_page, FALSE, wxT("SetPageText: invalid page index") );
+ wxCHECK_MSG( nb_page, false, wxT("SetPageText: invalid page index") );
nb_page->m_text = text;
gtk_label_set_text( nb_page->m_label, wxGTK_CONV( nb_page->m_text ) );
- return TRUE;
+ return true;
}
bool wxNotebook::SetPageImage( size_t page, int image )
wxGtkNotebookPage* nb_page = GetNotebookPage(page);
- if (!nb_page) return FALSE;
+ if (!nb_page) return false;
/* Optimization posibility: return immediately if image unchanged.
* Not enabled because it may break existing (stupid) code that
* manipulates the imagelist to cycle images */
- /* if (image == nb_page->m_image) return TRUE; */
+ /* if (image == nb_page->m_image) return true; */
/* For different cases:
1) no image -> no image
4) image -> image */
if (image == -1 && nb_page->m_image == -1)
- return TRUE; /* Case 1): Nothing to do. */
+ return true; /* Case 1): Nothing to do. */
GtkWidget *pixmapwid = (GtkWidget*) NULL;
gtk_container_remove(GTK_CONTAINER(nb_page->m_box), pixmapwid);
nb_page->m_image = -1;
- return TRUE; /* Case 2) */
+ return true; /* Case 2) */
}
}
nb_page->m_image = image;
- return TRUE;
+ return true;
}
void wxNotebook::SetPageSize( const wxSize &WXUNUSED(size) )
bool wxNotebook::DeleteAllPages()
{
- wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
+ wxCHECK_MSG( m_widget != NULL, false, wxT("invalid notebook") );
while (m_pagesData.GetCount() > 0)
DeletePage( m_pagesData.GetCount()-1 );
bool select,
int imageId )
{
- wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
+ wxCHECK_MSG( m_widget != NULL, false, wxT("invalid notebook") );
- wxCHECK_MSG( win->GetParent() == this, FALSE,
+ wxCHECK_MSG( win->GetParent() == this, false,
wxT("Can't add a page whose parent is not the notebook!") );
- wxCHECK_MSG( position <= GetPageCount(), FALSE,
+ wxCHECK_MSG( position <= GetPageCount(), false,
_T("invalid page index in wxNotebookPage::InsertPage()") );
// Hack Alert! (Part II): See above in wxInsertChildInNotebook callback
this);
if (m_themeEnabled)
- win->SetThemeEnabled(TRUE);
+ win->SetThemeEnabled(true);
GtkNotebook *notebook = GTK_NOTEBOOK(m_widget);
G_CALLBACK (gtk_notebook_page_change_callback), this);
InvalidateBestSize();
- return TRUE;
+ return true;
}
// helper for HitTest(): check if the point lies inside the given widget which
void wxNotebook::SetConstraintSizes( bool WXUNUSED(recurse) )
{
// don't set the sizes of the pages - their correct size is not yet known
- wxControl::SetConstraintSizes(FALSE);
+ wxControl::SetConstraintSizes(false);
}
bool wxNotebook::DoPhase( int WXUNUSED(nPhase) )
{
- return TRUE;
+ return true;
}
#endif
#include "wx/scrolbar.h"
-#include "wx/utils.h"
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/math.h"
#include "wx/gtk/private.h"
return GetDefaultAttributesFromGTKWidget(gtk_vscrollbar_new);
}
-#endif
+#endif // wxUSE_SCROLLBAR
/////////////////////////////////////////////////////////////////////////////
-// Name: gtk/slider.cpp
+// Name: src/gtk/slider.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_SLIDER
+
#include "wx/slider.h"
-#if wxUSE_SLIDER
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
-#include "wx/utils.h"
#include "wx/math.h"
#include "wx/gtk/private.h"
const wxPoint& pos, const wxSize& size,
long style, const wxValidator& validator, const wxString& name )
{
- m_acceptsFocus = TRUE;
- m_needParent = TRUE;
+ m_acceptsFocus = true;
+ m_needParent = true;
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( wxT("wxSlider creation failed") );
- return FALSE;
+ return false;
}
m_oldPos = 0.0;
PostCreation(size);
- return TRUE;
+ return true;
}
int wxSlider::GetValue() const
return GetDefaultAttributesFromGTKWidget(gtk_vscale_new);
}
-#endif
+#endif // wxUSE_SLIDER
/////////////////////////////////////////////////////////////////////////////
-// Name: spinbutt.cpp
+// Name: src/gtk/spinbutt.cpp
// Purpose: wxSpinButton
// Author: Robert
// Modified by:
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_SPINBTN
+
#include "wx/spinbutt.h"
-#if wxUSE_SPINBTN
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
-#include "wx/utils.h"
#include "wx/math.h"
#include "wx/gtk/private.h"
long style,
const wxString& name)
{
- m_needParent = TRUE;
+ m_needParent = true;
wxSize new_size = size,
sizeBest = DoGetBestSize();
!CreateBase( parent, id, pos, new_size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( wxT("wxXX creation failed") );
- return FALSE;
+ return false;
}
m_oldPos = 0.0;
PostCreation(new_size);
- return TRUE;
+ return true;
}
int wxSpinButton::GetMin() const
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/spinctrl.h"
-
#if wxUSE_SPINCTRL
-#include "wx/utils.h"
+#include "wx/spinctrl.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
#include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED
#include "wx/math.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
-#include "wx/utils.h"
#include "wx/math.h"
#include "wx/settings.h"
#include "wx/panel.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include <stdio.h>
#include <sys/wait.h>
#include <sys/prctl.h>
#include "wx/module.h"
-#include "wx/utils.h"
#include "gdk/gdk.h"
#include "gtk/gtk.h"
wxThreadGuiInit();
p_mainid = (int)getpid();
wxMainMutex->Lock();
- return TRUE;
+ return true;
}
void wxThreadModule::OnExit()
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/dcclient.h"
#include "wx/frame.h"
#include "wx/layout.h"
-#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/msgdlg.h"
#include "wx/module.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/gdicmn.h"
-#include "wx/utils.h"
#include "wx/memory.h"
#include "wx/font.h"
#include "wx/settings.h"
// global data
//-----------------------------------------------------------------------------
-bool g_mainThreadLocked = FALSE;
+bool g_mainThreadLocked = false;
gint g_pendingTag = 0;
static GtkWidget *gs_RootWindow = (GtkWidget*) NULL;
// not static because used by textctrl.cpp
//
// MT-FIXME
-bool wxIsInsideYield = FALSE;
+bool wxIsInsideYield = false;
bool wxApp::Yield(bool onlyIfNeeded)
{
wxFAIL_MSG( wxT("wxYield called recursively" ) );
}
- return FALSE;
+ return false;
}
#if wxUSE_THREADS
if ( !wxThread::IsMain() )
{
// can't call gtk_main_iteration() from other threads like this
- return TRUE;
+ return true;
}
#endif // wxUSE_THREADS
- wxIsInsideYield = TRUE;
+ wxIsInsideYield = true;
// We need to remove idle callbacks or the loop will
// never finish.
wxLog::Resume();
#endif
- wxIsInsideYield = FALSE;
+ wxIsInsideYield = false;
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
gdk_threads_enter();
wxMutexGuiLeave();
- g_mainThreadLocked = TRUE;
+ g_mainThreadLocked = true;
// we rely on the fact that glib GPollFD struct is really just pollfd but
// I wonder how wise is this in the long term (VZ)
gint res = wxPoll( (wxPollFd *) ufds, nfds, timeout );
wxMutexGuiEnter();
- g_mainThreadLocked = FALSE;
+ g_mainThreadLocked = false;
gdk_threads_leave();
wxASSERT_MSG( wxTheApp->m_idleTag == 0, wxT("attempt to install idle handler twice") );
- g_isIdle = FALSE;
+ g_isIdle = false;
if (g_pendingTag == 0)
g_pendingTag = gtk_idle_add_priority( 900, wxapp_pending_callback, (gpointer) NULL );
wxApp::wxApp()
{
#ifdef __WXDEBUG__
- m_isInAssert = FALSE;
+ m_isInAssert = false;
#endif // __WXDEBUG__
m_idleTag = 0;
bool wxApp::OnInitGui()
{
if ( !wxAppBase::OnInitGui() )
- return FALSE;
+ return false;
GdkVisual *visual = gdk_visual_get_system();
}
}
- return TRUE;
+ return true;
}
GdkVisual *wxApp::GetGdkVisual()
void wxApp::OnAssert(const wxChar *file, int line, const wxChar* cond, const wxChar *msg)
{
- m_isInAssert = TRUE;
+ m_isInAssert = true;
wxAppBase::OnAssert(file, line, cond, msg);
- m_isInAssert = FALSE;
+ m_isInAssert = false;
}
#endif // __WXDEBUG__
{
gtk_idle_remove( wxTheApp->m_idleTag );
wxTheApp->m_idleTag = 0;
- g_isIdle = TRUE;
+ g_isIdle = true;
}
}
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/dataobj.h"
-#include "wx/utils.h"
#include <glib.h>
#include <gdk/gdk.h>
wxLogTrace( TRACE_CLIPBOARD,
_T("got unsupported clipboard target") );
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
g_free(atom_name);
return;
}
if (format == clipboard->m_targetRequested)
{
- clipboard->m_waiting = FALSE;
- clipboard->m_formatSupported = TRUE;
+ clipboard->m_waiting = false;
+ clipboard->m_formatSupported = true;
return;
}
}
}
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
}
}
{
if (!wxTheClipboard)
{
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
if (!data_object)
{
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
if (selection_data->length <= 0)
{
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
// make sure we got the data in the correct format
if (!data_object->IsSupportedFormat( format ) )
{
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
// if so, copy data to target object
if (selection_data->type != GDK_SELECTION_TYPE_STRING)
{
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
#endif
data_object->SetData( format, (size_t) selection_data->length, (const char*) selection_data->data );
- wxTheClipboard->m_formatSupported = TRUE;
- clipboard->m_waiting = FALSE;
+ wxTheClipboard->m_formatSupported = true;
+ clipboard->m_waiting = false;
}
}
if (event->selection == GDK_SELECTION_PRIMARY)
{
- wxTheClipboard->m_ownsPrimarySelection = FALSE;
+ wxTheClipboard->m_ownsPrimarySelection = false;
}
else
if (event->selection == g_clipboardAtom)
{
- wxTheClipboard->m_ownsClipboard = FALSE;
+ wxTheClipboard->m_ownsClipboard = false;
}
else
{
- wxTheClipboard->m_waiting = FALSE;
+ wxTheClipboard->m_waiting = false;
return FALSE;
}
}
}
- wxTheClipboard->m_waiting = FALSE;
+ wxTheClipboard->m_waiting = false;
return TRUE;
}
}
wxClipboard::wxClipboard()
{
- m_open = FALSE;
- m_waiting = FALSE;
+ m_open = false;
+ m_waiting = false;
- m_ownsClipboard = FALSE;
- m_ownsPrimarySelection = FALSE;
+ m_ownsClipboard = false;
+ m_ownsPrimarySelection = false;
m_data = (wxDataObject*) NULL;
m_receivedData = (wxDataObject*) NULL;
if (!g_targetsAtom) g_targetsAtom = gdk_atom_intern ("TARGETS", FALSE);
if (!g_timestampAtom) g_timestampAtom = gdk_atom_intern ("TIMESTAMP", FALSE);
- m_formatSupported = FALSE;
+ m_formatSupported = false;
m_targetRequested = 0;
- m_usePrimary = FALSE;
+ m_usePrimary = false;
}
wxClipboard::~wxClipboard()
// it, clear_selection is called which will set m_data to zero
if (gdk_selection_owner_get( g_clipboardAtom ) == m_clipboardWidget->window)
{
- m_waiting = TRUE;
+ m_waiting = true;
gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom,
(guint32) GDK_CURRENT_TIME );
if (gdk_selection_owner_get( GDK_SELECTION_PRIMARY ) == m_clipboardWidget->window)
{
- m_waiting = TRUE;
+ m_waiting = true;
gtk_selection_owner_set( (GtkWidget*) NULL, GDK_SELECTION_PRIMARY,
(guint32) GDK_CURRENT_TIME );
}
m_targetRequested = 0;
- m_formatSupported = FALSE;
+ m_formatSupported = 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;
+ m_open = true;
- return 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();
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();
{
wxCHECK_RET( m_open, wxT("clipboard not open") );
- m_open = FALSE;
+ m_open = false;
}
bool wxClipboard::IsOpened() const
bool wxClipboard::IsSupported( const wxDataFormat& format )
{
/* reentrance problems */
- if (m_waiting) return FALSE;
+ if (m_waiting) return false;
/* store requested format to be asked for by callbacks */
m_targetRequested = format;
wxT("wxClipboard:IsSupported: requested format: %s"),
format.GetId().c_str() );
- wxCHECK_MSG( m_targetRequested, FALSE, wxT("invalid clipboard format") );
+ wxCHECK_MSG( m_targetRequested, false, wxT("invalid clipboard format") );
- m_formatSupported = FALSE;
+ m_formatSupported = false;
/* perform query. this will set m_formatSupported to
- TRUE if m_targetRequested is supported.
+ true if m_targetRequested is supported.
also, we have to wait for the "answer" from the
clipboard owner which is an asynchronous process.
- therefore we set m_waiting = TRUE here and wait
+ therefore we set m_waiting = true here and wait
until the callback "targets_selection_received"
- sets it to FALSE */
+ sets it to false */
- m_waiting = TRUE;
+ m_waiting = true;
gtk_selection_convert( m_targetsWidget,
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
bool wxClipboard::GetData( wxDataObject& data )
{
- wxCHECK_MSG( m_open, FALSE, wxT("clipboard not open") );
+ wxCHECK_MSG( m_open, false, wxT("clipboard not open") );
/* get formats from wxDataObjects */
wxDataFormat *array = new wxDataFormat[ data.GetFormatCount() ];
/* store requested format to be asked for by callbacks */
m_targetRequested = format;
- wxCHECK_MSG( m_targetRequested, FALSE, wxT("invalid clipboard format") );
+ wxCHECK_MSG( m_targetRequested, false, wxT("invalid clipboard format") );
- m_formatSupported = FALSE;
+ m_formatSupported = false;
/* perform query. this will set m_formatSupported to
- TRUE if m_targetRequested is supported.
+ true if m_targetRequested is supported.
also, we have to wait for the "answer" from the
clipboard owner which is an asynchronous process.
- therefore we set m_waiting = TRUE here and wait
+ therefore we set m_waiting = true here and wait
until the callback "targets_selection_received"
- sets it to FALSE */
+ sets it to false */
- m_waiting = TRUE;
+ m_waiting = true;
gtk_selection_convert( m_targetsWidget,
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
/* store requested format to be asked for by callbacks */
m_targetRequested = format;
- wxCHECK_MSG( m_targetRequested, FALSE, wxT("invalid clipboard format") );
+ wxCHECK_MSG( m_targetRequested, false, wxT("invalid clipboard format") );
/* start query */
- m_formatSupported = FALSE;
+ m_formatSupported = false;
/* ask for clipboard contents. this will set
- m_formatSupported to TRUE if m_targetRequested
+ m_formatSupported to true if m_targetRequested
is supported.
also, we have to wait for the "answer" from the
clipboard owner which is an asynchronous process.
- therefore we set m_waiting = TRUE here and wait
+ therefore we set m_waiting = true here and wait
until the callback "targets_selection_received"
- sets it to FALSE */
+ sets it to false */
- m_waiting = TRUE;
+ m_waiting = true;
wxLogTrace( TRACE_CLIPBOARD,
wxT("wxClipboard::GetData: format found, start convert") );
while (m_waiting) gtk_main_iteration();
/* this is a true error as we checked for the presence of such data before */
- wxCHECK_MSG( m_formatSupported, FALSE, wxT("error retrieving data from clipboard") );
+ wxCHECK_MSG( m_formatSupported, false, wxT("error retrieving data from clipboard") );
/* return success */
delete[] array;
- return TRUE;
+ return true;
}
wxLogTrace( TRACE_CLIPBOARD,
/* return failure */
delete[] array;
- return FALSE;
+ return false;
}
#endif
#ifndef WX_PRECOMP
#include "wx/app.h"
+ #include "wx/utils.h"
#endif // WX_PRECOMP
-#include "wx/utils.h"
-
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/window.h"
#include "wx/gdicmn.h"
-#include "wx/utils.h"
#include "wx/gtk1/private.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/utils.h"
#endif
#include "wx/fontutil.h"
-#include "wx/utils.h"
#include "wx/debug.h"
#include "wx/msgdlg.h"
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/intl.h"
+ #include "wx/utils.h"
#endif
#include "wx/arrstr.h"
-#include "wx/utils.h"
#include "wx/checklst.h"
#include "wx/settings.h"
#include "wx/gtk1/private.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/panel.h"
-#include "wx/utils.h"
#include "wx/imaglist.h"
#include "wx/bitmap.h"
#include "wx/fontutil.h"
wxCHECK_RET( !notebook->m_inSwitchPage,
_T("gtk_notebook_page_change_callback reentered") );
- notebook->m_inSwitchPage = TRUE;
+ notebook->m_inSwitchPage = true;
if (g_isIdle)
wxapp_install_idle_handler();
void wxNotebook::Init()
{
m_padding = 0;
- m_inSwitchPage = FALSE;
+ m_inSwitchPage = false;
m_imageList = (wxImageList *) NULL;
m_selection = -1;
- m_themeEnabled = TRUE;
+ m_themeEnabled = true;
}
wxNotebook::wxNotebook()
const wxPoint& pos, const wxSize& size,
long style, const wxString& name )
{
- m_needParent = TRUE;
- m_acceptsFocus = TRUE;
+ m_needParent = true;
+ m_acceptsFocus = true;
m_insertCallback = (wxInsertChildFunction)wxInsertChildInNotebook;
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( wxT("wxNoteBook creation failed") );
- return FALSE;
+ return false;
}
gtk_signal_connect( GTK_OBJECT(m_widget), "realize",
GTK_SIGNAL_FUNC(gtk_notebook_realized_callback), (gpointer) this );
- return TRUE;
+ return true;
}
int wxNotebook::GetSelection() const
gtk_label_set( nb_page->m_label, wxGTK_CONV( nb_page->m_text ) );
- return TRUE;
+ return true;
}
bool wxNotebook::SetPageImage( size_t page, int image )
* Not enabled because it may break existing (stupid) code that
* manipulates the imagelist to cycle images */
- /* if (image == nb_page->m_image) return TRUE; */
+ /* if (image == nb_page->m_image) return true; */
/* For different cases:
1) no image -> no image
4) image -> image */
if (image == -1 && nb_page->m_image == -1)
- return TRUE; /* Case 1): Nothing to do. */
+ return true; /* Case 1): Nothing to do. */
GtkWidget *pixmapwid = (GtkWidget*) NULL;
gtk_container_remove(GTK_CONTAINER(nb_page->m_box), pixmapwid);
nb_page->m_image = -1;
- return TRUE; /* Case 2) */
+ return true; /* Case 2) */
}
}
nb_page->m_image = image;
- return TRUE;
+ return true;
}
void wxNotebook::SetPageSize( const wxSize &WXUNUSED(size) )
GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback), (gpointer) this );
if (m_themeEnabled)
- win->SetThemeEnabled(TRUE);
+ win->SetThemeEnabled(true);
GtkNotebook *notebook = GTK_NOTEBOOK(m_widget);
GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback), (gpointer)this );
InvalidateBestSize();
- return TRUE;
+ return true;
}
// helper for HitTest(): check if the point lies inside the given widget which
bool wxNotebook::DoPhase( int WXUNUSED(nPhase) )
{
- return TRUE;
+ return true;
}
#endif
#include "wx/scrolbar.h"
-#include "wx/utils.h"
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/math.h"
#include "wx/gtk1/private.h"
return GetDefaultAttributesFromGTKWidget(gtk_vscrollbar_new);
}
-#endif
+#endif // wxUSE_SCROLLBAR
/////////////////////////////////////////////////////////////////////////////
-// Name: gtk/slider.cpp
+// Name: src/gtk1/slider.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_SLIDER
+
#include "wx/slider.h"
-#if wxUSE_SLIDER
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
-#include "wx/utils.h"
#include "wx/math.h"
#include "wx/gtk1/private.h"
const wxPoint& pos, const wxSize& size,
long style, const wxValidator& validator, const wxString& name )
{
- m_acceptsFocus = TRUE;
- m_needParent = TRUE;
+ m_acceptsFocus = true;
+ m_needParent = true;
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( wxT("wxSlider creation failed") );
- return FALSE;
+ return false;
}
m_oldPos = 0.0;
PostCreation(size);
- return TRUE;
+ return true;
}
int wxSlider::GetValue() const
return GetDefaultAttributesFromGTKWidget(gtk_vscale_new);
}
-#endif
+#endif // wxUSE_SLIDER
/////////////////////////////////////////////////////////////////////////////
-// Name: spinbutt.cpp
+// Name: src/gtk1/spinbutt.cpp
// Purpose: wxSpinButton
// Author: Robert
// Modified by:
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_SPINBTN
+
#include "wx/spinbutt.h"
-#if wxUSE_SPINBTN
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
-#include "wx/utils.h"
#include "wx/math.h"
#include "wx/gtk1/private.h"
long style,
const wxString& name)
{
- m_needParent = TRUE;
+ m_needParent = true;
wxSize new_size = size,
sizeBest = DoGetBestSize();
!CreateBase( parent, id, pos, new_size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( wxT("wxXX creation failed") );
- return FALSE;
+ return false;
}
m_oldPos = 0.0;
PostCreation(new_size);
- return TRUE;
+ return true;
}
int wxSpinButton::GetMin() const
return GetDefaultAttributesFromGTKWidget(gtk_button_new);
}
-#endif
+#endif // wxUSE_SPINBTN
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/spinctrl.h"
-
#if wxUSE_SPINCTRL
-#include "wx/utils.h"
+#include "wx/spinctrl.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
#include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED
#include "wx/math.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
-#include "wx/utils.h"
#include "wx/math.h"
#include "wx/settings.h"
#include "wx/panel.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include <stdio.h>
#include <sys/wait.h>
#include <sys/prctl.h>
#include "wx/module.h"
-#include "wx/utils.h"
#include "gdk/gdk.h"
#include "gtk/gtk.h"
wxThreadGuiInit();
p_mainid = (int)getpid();
wxMainMutex->Lock();
- return TRUE;
+ return true;
}
void wxThreadModule::OnExit()
wxThreadGuiExit();
delete wxMainMutex;
}
-
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/dcclient.h"
#include "wx/frame.h"
#include "wx/layout.h"
-#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/msgdlg.h"
#include "wx/module.h"
static void AdjustEventButtonState(wxMouseEvent& event)
{
// GDK reports the old state of the button for a button press event, but
- // for compatibility with MSW and common sense we want m_leftDown be TRUE
+ // for compatibility with MSW and common sense we want m_leftDown be true
// for a LEFT_DOWN event, not FALSE, so we will invert
// left/right/middleDown for the corresponding click events
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/window.h"
#include "wx/frame.h"
#include "wx/button.h"
-#include "wx/utils.h"
#include "wx/gdicmn.h"
#include "wx/pen.h"
#include "wx/brush.h"
#include "wx/wxprec.h"
-#include "wx/utils.h"
#include "wx/brush.h"
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/mac/private.h"
IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject)
{
return (M_BRUSHDATA ? M_BRUSHDATA->m_macBrushKind : kwxMacBrushColour);
}
-
#include "wx/log.h"
#include "wx/event.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/apptrait.h"
#include "wx/timer.h"
-#include "wx/utils.h"
#include "wx/module.h"
#include "wx/sckaddr.h"
// Name: src/mac/carbon/clipbrd.cpp
// Purpose: Clipboard functionality
// Author: Stefan Csomor;
-// Generalized clipboard implementation by Matthew Flatt
+// Generalized clipboard implementation by Matthew Flatt
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/frame.h"
#include "wx/bitmap.h"
-#include "wx/utils.h"
#include "wx/metafile.h"
#ifndef __DARWIN__
#ifndef WX_PRECOMP
#include "wx/app.h"
+ #include "wx/utils.h"
#endif // WX_PRECOMP
-#include "wx/utils.h"
#include "wx/frame.h"
#include "wx/settings.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: dirdlg.cpp
+// Name: src/mac/carbon/dirdlg.cpp
// Purpose: wxDirDialog
// 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"
#if wxUSE_DIRDLG
-#include "wx/utils.h"
-#include "wx/dialog.h"
#include "wx/dirdlg.h"
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif // WX_PRECOMP
+
+#include "wx/dialog.h"
+
#include "wx/cmndata.h"
#include "wx/filename.h"
#include "wx/mac/private.h"
#ifdef __DARWIN__
- #include <Carbon/Carbon.h>
+ #include <Carbon/Carbon.h>
#else
- #include <Navigation.h>
+ #include <Navigation.h>
#endif
IMPLEMENT_CLASS(wxDirDialog, wxDialog)
wxDirDialog * data = ( wxDirDialog *) ioUserData ;
if ( inSelector == kNavCBStart )
{
- if (data && !data->GetPath().IsEmpty() )
+ if (data && !data->GetPath().empty() )
{
// Set default location for the modern Navigation APIs
// Apple Technical Q&A 1151
NavReplyRecord reply ;
bool disposeReply = false ;
OSStatus err = noErr;
-
+
err = NavGetDefaultDialogCreationOptions(&options);
- if (err == noErr)
+ if (err == noErr)
{
wxMacCFStringHolder message(m_message, m_font.GetEncoding());
options.message = message;
err = NavCreateChooseFolderDialog(&options, sStandardNavEventFilter , NULL, this , &dialog);
- if (err == noErr)
- {
+ if (err == noErr)
+ {
err = NavDialogRun(dialog);
if ( err == noErr )
{
}
}
}
-
- if ( err == noErr )
- {
+
+ if ( err == noErr )
+ {
if ( reply.validRecord )
{
FSRef folderInfo;
AEDesc specDesc ;
-
+
OSErr err = ::AECoerceDesc( &reply.selection , typeFSRef, &specDesc);
- if ( err != noErr )
+ if ( err != noErr )
{
m_path = wxEmptyString ;
}
{
folderInfo = **(FSRef**) specDesc.dataHandle;
m_path = wxMacFSRefToPath( &folderInfo ) ;
- if (specDesc.dataHandle != nil)
+ if (specDesc.dataHandle != nil)
{
::AEDisposeDesc(&specDesc);
- }
+ }
}
}
else
err = paramErr ; // could be any error, only used for giving back wxID_CANCEL
}
}
-
+
if ( disposeReply )
::NavDisposeReply(&reply);
-
+
// apparently cancelling shouldn't change m_path
if ( err != noErr && err != userCanceledErr )
m_path = wxEmptyString ;
-
+
return (err == noErr) ? wxID_OK : wxID_CANCEL ;
}
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
-#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/tokenzr.h"
#include "wx/filename.h"
}
else if ( inSelector == kNavCBStart )
{
- if (data && !(data->defaultLocation).IsEmpty())
+ if (data && !(data->defaultLocation).empty())
{
// Set default location for the modern Navigation APIs
// Apple Technical Q&A 1151
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/utils.h"
#endif
#include "wx/fontutil.h"
#include "wx/gdicmn.h"
-#include "wx/utils.h"
#include "wx/fontutil.h"
#include "wx/mac/private.h"
void wxFontRefData::MacFindFont()
{
OSStatus status ;
-
+
Str255 qdFontName ;
if ( m_macThemeFontID != kThemeCurrentPortFont )
{
if ( m_macFontStyle & underline )
m_underlined = true ;
m_pointSize = m_macFontSize ;
-
+
m_macFontFamily = FMGetFontFamilyFromName( qdFontName );
}
else
wxASSERT_MSG( status == noErr , wxT("couldn't get an ATSUFont from font family") );
m_macATSUAdditionalQDStyles = m_macFontStyle & (~intrinsicStyle );
-
+
if ( m_macATSUStyle )
{
::ATSUDisposeStyle((ATSUStyle)m_macATSUStyle);
#include "wx/dynarray.h"
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/button.h"
#include "wx/settings.h"
#include "wx/toplevel.h"
-#include "wx/utils.h"
-
IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
BEGIN_EVENT_TABLE(wxListBox, wxControl)
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/menuitem.h"
#include "wx/window.h"
#include "wx/log.h"
-#include "wx/utils.h"
#include "wx/frame.h"
#include "wx/mac/uma.h"
#include "wx/wxprec.h"
-#include "wx/utils.h"
#include "wx/pen.h"
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject)
wxPenRefData::wxPenRefData()
/////////////////////////////////////////////////////////////////////////////
-// Name: settings.cpp
+// Name: src/mac/carbon/settings.cpp
// Purpose: wxSettings
// Author: Stefan Csomor
// Modified by:
#include "wx/wxprec.h"
#include "wx/settings.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/gdicmn.h"
-#include "wx/utils.h"
#include "wx/mac/uma.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
+ #include "wx/utils.h"
#endif // WX_PRECOMP
#include "wx/notebook.h"
#include "wx/tabctrl.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
-#include "wx/utils.h"
#include "wx/settings.h"
#include "wx/mac/uma.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#ifdef __DARWIN__
#include "wx/toplevel.h"
#include "wx/settings.h"
#include "wx/filefn.h"
-#include "wx/utils.h"
#include "wx/sysopt.h"
#include "wx/menu.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/menu.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
-#include "wx/utils.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/utils.h"
#endif
#include "wx/window.h"
#include "wx/frame.h"
#include "wx/button.h"
-#include "wx/utils.h"
#include "wx/gdicmn.h"
#include "wx/pen.h"
#include "wx/brush.h"
#include "wx/wxprec.h"
-#include "wx/utils.h"
#include "wx/brush.h"
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/mac/private.h"
IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject)
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/frame.h"
#include "wx/bitmap.h"
-#include "wx/utils.h"
#include "wx/metafile.h"
#ifndef __DARWIN__
#ifndef WX_PRECOMP
#include "wx/app.h"
+ #include "wx/utils.h"
#endif // WX_PRECOMP
-#include "wx/utils.h"
#include "wx/frame.h"
#include "wx/settings.h"
#pragma hdrstop
#endif
-#include "wx/utils.h"
-#include "wx/dialog.h"
#include "wx/dirdlg.h"
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif // WX_PRECOMP
+
+#include "wx/dialog.h"
+
#include "wx/cmndata.h"
#include "wx/mac/private.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
-#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/tokenzr.h"
#include "wx/filename.h"
else if ( inSelector == kNavCBStart )
{
#if TARGET_CARBON
- if (data && !(data->defaultLocation).IsEmpty())
+ if (data && !(data->defaultLocation).empty())
{
// Set default location for the modern Navigation APIs
// Apple Technical Q&A 1151
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/utils.h"
#endif
#include "wx/fontutil.h"
#include "wx/gdicmn.h"
-#include "wx/utils.h"
#include "wx/fontutil.h"
#include "wx/dynarray.h"
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/button.h"
#include "wx/settings.h"
#include "wx/toplevel.h"
-#include "wx/utils.h"
-
IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
BEGIN_EVENT_TABLE(wxListBox, wxControl)
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/menuitem.h"
#include "wx/window.h"
-#include "wx/utils.h"
#include "wx/frame.h"
#include "wx/mac/uma.h"
#include "wx/wxprec.h"
-#include "wx/utils.h"
#include "wx/pen.h"
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject)
wxPenRefData::wxPenRefData()
/////////////////////////////////////////////////////////////////////////////
-// Name: settings.cpp
+// Name: src/mac/classic/settings.cpp
// Purpose: wxSettings
// Author: Stefan Csomor
// Modified by:
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#include "wx/wxprec.h"
+
#include "wx/settings.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/gdicmn.h"
-#include "wx/utils.h"
#include "wx/mac/uma.h"
{
int major,minor;
wxGetOsVersion( &major, &minor );
-
+
switch( index )
{
case wxSYS_COLOUR_SCROLLBAR :
case wxSYS_COLOUR_GRAYTEXT:
return wxColor( 0xCC , 0xCC , 0xCC ) ;
break ;
-
+
case wxSYS_COLOUR_3DDKSHADOW:
return wxColor( 0x44 , 0x44 , 0x44 ) ;
break ;
}
break ;
case wxSYS_COLOUR_INFOBK :
- case wxSYS_COLOUR_APPWORKSPACE:
+ case wxSYS_COLOUR_APPWORKSPACE:
return *wxWHITE ;
break ;
case wxSYS_COLOUR_MENUHILIGHT:
// TODO
return *wxBLACK;
-
+
case wxSYS_COLOUR_MAX:
wxFAIL_MSG( _T("unknown system colour index") );
break ;
return *wxNORMAL_FONT ;
} ;
break ;
-
}
return *wxNORMAL_FONT;
}
case wxSYS_MOUSE_BUTTONS:
// we emulate a two button mouse (ctrl + click = right button )
return 2;
-
+
// TODO case wxSYS_BORDER_X:
// TODO case wxSYS_BORDER_Y:
// TODO case wxSYS_CURSOR_X:
// TODO case wxSYS_DRAG_Y:
// TODO case wxSYS_EDGE_X:
// TODO case wxSYS_EDGE_Y:
-
+
case wxSYS_HSCROLL_ARROW_X:
return 16;
case wxSYS_HSCROLL_ARROW_Y:
return 16;
case wxSYS_HTHUMB_X:
return 16;
-
+
// TODO case wxSYS_ICON_X:
// TODO case wxSYS_ICON_Y:
// TODO case wxSYS_ICONSPACING_X:
// TODO case wxSYS_ICONSPACING_Y:
// TODO case wxSYS_WINDOWMIN_X:
// TODO case wxSYS_WINDOWMIN_Y:
-
+
case wxSYS_SCREEN_X:
wxDisplaySize(&value, NULL);
return value;
case wxSYS_SCREEN_Y:
wxDisplaySize(NULL, &value);
return value;
-
+
// TODO case wxSYS_FRAMESIZE_X:
// TODO case wxSYS_FRAMESIZE_Y:
// TODO case wxSYS_SMALLICON_X:
// TODO case wxSYS_SMALLICON_Y:
-
+
case wxSYS_HSCROLL_Y:
return 16;
case wxSYS_VSCROLL_X:
return 16;
case wxSYS_VTHUMB_Y:
return 16;
-
+
// TODO case wxSYS_CAPTION_Y:
// TODO case wxSYS_MENU_Y:
// TODO case wxSYS_NETWORK_PRESENT:
-
+
case wxSYS_PENWINDOWS_PRESENT:
return 0;
-
+
// TODO case wxSYS_SHOW_SOUNDS:
-
+
case wxSYS_SWAP_BUTTONS:
return 0;
-
+
default:
return -1; // unsupported metric
}
{
switch (index)
{
- case wxSYS_CAN_ICONIZE_FRAME:
+ case wxSYS_CAN_ICONIZE_FRAME:
case wxSYS_CAN_DRAW_FRAME_DECORATIONS:
- return TRUE;
-
+ return true;
+
default:
- return FALSE;
+ return false;
}
}
#ifndef WX_PRECOMP
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/notebook.h"
#include "wx/tabctrl.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
-#include "wx/utils.h"
#include "wx/settings.h"
#include <stdio.h>
#ifndef WX_PRECOMP
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#ifdef __DARWIN__
#include "wx/tabctrl.h"
#include "wx/settings.h"
#include "wx/filefn.h"
-#include "wx/utils.h"
#if defined(__BORLANDC__) && !defined(__WIN32__)
#include <alloc.h>
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/menu.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
-#include "wx/utils.h"
#include "wx/panel.h"
#include "wx/layout.h"
#include "wx/dialog.h"
#include "wx/dynarray.h"
#include "wx/string.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/mac/corefoundation/cfstring.h"
-#include "wx/utils.h"
#include "wx/module.h"
// ============================================================================
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/icon.h"
#include "wx/filefn.h"
#include "wx/image.h"
#include "wx/dcmemory.h"
-#include "wx/utils.h"
#include "wx/image.h"
#include "wx/xpmdecod.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/module.h"
-#include "wx/utils.h"
#include "wx/hashmap.h"
#include "wx/mgl/private.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/fontutil.h"
#include "wx/cmndata.h"
-#include "wx/utils.h"
#include "wx/gdicmn.h"
#include "wx/tokenzr.h"
#include "wx/settings.h"
int family = wxDEFAULT,
int style = wxDEFAULT,
int weight = wxDEFAULT,
- bool underlined = FALSE,
+ bool underlined = false,
const wxString& faceName = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
wxFontRefData(const wxFontRefData& data);
m_encoding = encoding;
m_library = NULL;
- m_valid = FALSE;
+ m_valid = false;
}
wxFontRefData::wxFontRefData(const wxFontRefData& data)
{
m_refData = new wxFontRefData(pointSize, family, style, weight,
underlined, face, encoding);
- return TRUE;
+ return true;
}
struct font_t *wxFont::GetMGLfont_t(float scale, bool antialiased)
bool wxFont::GetUnderlined() const
{
- wxCHECK_MSG( Ok(), FALSE, wxT("invalid font") );
+ wxCHECK_MSG( Ok(), false, wxT("invalid font") );
return M_FONTDATA->m_underlined;
}
bool wxFont::IsFixedWidth() const
{
- wxCHECK_MSG( Ok(), FALSE, wxT("invalid font") );
+ wxCHECK_MSG( Ok(), false, wxT("invalid font") );
return (bool)(M_FONTDATA->m_library->GetFamily()->GetInfo()->isFixed);
}
AllocExclusive();
M_FONTDATA->m_pointSize = pointSize;
- M_FONTDATA->m_valid = FALSE;
+ M_FONTDATA->m_valid = false;
}
void wxFont::SetFamily(int family)
AllocExclusive();
M_FONTDATA->m_family = family;
- M_FONTDATA->m_valid = FALSE;
+ M_FONTDATA->m_valid = false;
}
void wxFont::SetStyle(int style)
AllocExclusive();
M_FONTDATA->m_style = style;
- M_FONTDATA->m_valid = FALSE;
+ M_FONTDATA->m_valid = false;
}
void wxFont::SetWeight(int weight)
AllocExclusive();
M_FONTDATA->m_weight = weight;
- M_FONTDATA->m_valid = FALSE;
+ M_FONTDATA->m_valid = false;
}
void wxFont::SetFaceName(const wxString& faceName)
AllocExclusive();
M_FONTDATA->m_faceName = faceName;
- M_FONTDATA->m_valid = FALSE;
+ M_FONTDATA->m_valid = false;
}
void wxFont::SetUnderlined(bool underlined)
AllocExclusive();
M_FONTDATA->m_encoding = encoding;
- M_FONTDATA->m_valid = FALSE;
+ M_FONTDATA->m_valid = false;
}
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/string.h"
+ #include "wx/utils.h"
#endif
-#include "wx/utils.h"
-
#include "wx/encinfo.h"
#include "wx/fontutil.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/utils.h"
#endif
-#include "wx/utils.h"
#include <ctype.h>
IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject)
#include "wx/hash.h"
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
-#include "wx/utils.h"
#include "wx/module.h"
#include "wx/memory.h"
#include "wx/evtloop.h"
#endif
#include "wx/checkbox.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/tglbtn.h"
-#include "wx/utils.h"
#ifdef __VMS__
#pragma message disable nosimpint
#endif
#include "wx/choice.h"
-#include "wx/utils.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/arrstr.h"
#ifdef __VMS__
#ifndef WX_PRECOMP
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/bitmap.h"
-#include "wx/utils.h"
#include "wx/dataobj.h"
#include "wx/ptr_scpd.h"
#include "wx/wxprec.h"
#include "wx/control.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/panel.h"
-#include "wx/utils.h"
#ifdef __VMS__
#pragma message disable nosimpint
#ifndef WX_PRECOMP
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
-#include "wx/utils.h"
#include "wx/window.h"
#if wxUSE_IMAGE
#ifndef WX_PRECOMP
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
-#include "wx/utils.h"
-
#ifdef __VMS__
#pragma message disable nosimpint
#endif
/////////////////////////////////////////////////////////////////////////////
-// Name: dcmemory.cpp
+// Name: src/motif/dcmemory.cpp
// Purpose: wxMemoryDC class
// Author: Julian Smart
// Modified by:
#include "wx/wxprec.h"
#include "wx/dcmemory.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/settings.h"
-#include "wx/utils.h"
#ifdef __VMS__
#pragma message disable nosimpint
/////////////////////////////////////////////////////////////////////////////
-// Name: dcscreen.cpp
+// Name: src/motif/dcscreen.cpp
// Purpose: wxScreenDC 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/dcscreen.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/window.h"
#include "wx/frame.h"
-#include "wx/dcscreen.h"
-#include "wx/utils.h"
#ifdef __VMS__
#pragma message disable nosimpint
{
m_display = wxGetDisplay();
Display* display = (Display*) m_display;
-
+
if (sm_overlayWindow)
{
m_pixmap = sm_overlayWindow;
}
else
m_pixmap = (WXPixmap) RootWindow(display, DefaultScreen(display));
-
+
XGCValues gcvalues;
gcvalues.foreground = BlackPixel (display, DefaultScreen (display));
gcvalues.background = WhitePixel (display, DefaultScreen (display));
m_gc = XCreateGC (display, RootWindow (display, DefaultScreen (display)),
GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode,
&gcvalues);
-
+
m_backgroundPixel = (int) gcvalues.background;
m_ok = true;
}
window->GetSize(& width, & height);
rect.x = x; rect.y = y;
rect.width = width; rect.height = height;
-
+
return StartDrawingOnTop(& rect);
}
{
if (sm_overlayWindow)
return false;
-
+
Display *dpy = (Display*) wxGetDisplay();
Pixmap screenPixmap = RootWindow(dpy, DefaultScreen(dpy));
-
+
int x = 0;
int y = 0;
int width, height;
wxDisplaySize(&width, &height);
-
+
if (rect)
{
x = rect->x; y = rect->y;
}
sm_overlayWindowX = x;
sm_overlayWindowY = y;
-
+
XSetWindowAttributes attributes;
attributes.override_redirect = True;
unsigned long valueMask = CWOverrideRedirect;
-
+
sm_overlayWindow = (WXWindow) XCreateWindow(dpy, screenPixmap, x, y, width, height, 0,
wxDisplayDepth(), InputOutput,
DefaultVisual(dpy, 0), valueMask,
& attributes);
-
+
if (sm_overlayWindow)
{
XMapWindow(dpy, (Window) sm_overlayWindow);
#ifndef WX_PRECOMP
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
-#include "wx/utils.h"
#include "wx/settings.h"
#include "wx/evtloop.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/window.h"
#include "wx/gdicmn.h"
-#include "wx/utils.h"
#include <X11/Xlib.h>
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
-#include "wx/utils.h"
#include "wx/settings.h"
#include "wx/tokenzr.h"
#include "wx/stockitem.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/utils.h" // for wxGetDisplay()
#endif
#include "wx/gdicmn.h"
-#include "wx/utils.h" // for wxGetDisplay()
#include "wx/fontutil.h" // for wxNativeFontInfo
#include "wx/tokenzr.h"
#include "wx/settings.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/statusbr.h"
#include "wx/toolbar.h"
#include "wx/menu.h"
#include "wx/settings.h"
-#include "wx/utils.h"
#include "wx/icon.h"
#ifdef __VMS__
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#ifdef __VMS
#endif
#include "wx/settings.h"
-#include "wx/utils.h"
#include "wx/arrstr.h"
#ifdef __VMS__
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/menuitem.h"
-#include "wx/utils.h"
#include "wx/frame.h"
#include "wx/settings.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/menu.h"
#include "wx/menuitem.h"
-#include "wx/utils.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
+#include "wx/menu.h"
#include "wx/frame.h"
#ifdef __VMS__
#ifndef WX_PRECOMP
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/window.h"
-#include "wx/utils.h"
#ifdef __VMS__
#pragma message disable nosimpint
#endif
#include "wx/radiobox.h"
-#include "wx/utils.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/arrstr.h"
#ifdef __VMS__
#endif
#include "wx/radiobut.h"
-#include "wx/utils.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
#ifdef __VMS__
#pragma message disable nosimpint
#if wxUSE_SLIDER
#include "wx/slider.h"
-#include "wx/utils.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
#ifdef __VMS__
#pragma message disable nosimpint
#endif
#include "wx/statbox.h"
-#include "wx/utils.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
#ifdef __VMS__
#pragma message disable nosimpint
#include <ctype.h>
#include "wx/textctrl.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/settings.h"
#include "wx/filefn.h"
-#include "wx/utils.h"
#ifdef __VMS__
#pragma message disable nosimpint
#if 0
// TODO: Is this relevant? What does it do?
int noCols = 2;
- if (!value.IsNull() && (value.Length() > (unsigned int) noCols))
- noCols = value.Length();
+ if (!value.IsNull() && (value.length() > (unsigned int) noCols))
+ noCols = value.length();
XtVaSetValues((Widget) m_mainWidget,
XmNcolumns, noCols,
NULL);
#include "wx/hash.h"
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/menu.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
-#include "wx/utils.h"
#include "wx/layout.h"
#include "wx/button.h"
#include "wx/settings.h"
#ifndef WX_PRECOMP
#include "wx/list.h"
#include "wx/string.h"
+ #include "wx/utils.h"
#endif
#if !wxUSE_PROTOCOL_HTTP
#pragma comment(lib, "wininet.lib")
#endif
-#include "wx/utils.h"
#include "wx/module.h"
#include "wx/url.h"
///////////////////////////////////////////////////////////////////////////////
-// Name: unix/baseunix.cpp
+// Name: src/unix/baseunix.cpp
// Purpose: misc stuff only used in console applications under Unix
// Author: Vadim Zeitlin
// Modified by:
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/intl.h"
+ #include "wx/utils.h"
#endif //WX_PRECOMP
#include "wx/apptrait.h"
-#include "wx/utils.h"
#include "wx/unix/execute.h"
// for waitpid()
}
#endif // __WXMAC__
-
#include "wx/log.h"
#include "wx/event.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif // !PCH
#include "wx/timer.h"
#include "wx/filefn.h"
-#include "wx/utils.h"
#include "wx/ffile.h"
#include "wx/process.h"
#include "wx/wxchar.h"
#include "wx/dynarray.h"
#include "wx/string.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/regex.h"
-#include "wx/utils.h"
#include "wx/fontmap.h"
#include "wx/fontutil.h"
#include "wx/encinfo.h"
#include "wx/font.h" // wxFont enums
#include "wx/encinfo.h"
#include "wx/hash.h"
+ #include "wx/utils.h" // for wxGetDisplay()
#endif // PCH
#include "wx/fontutil.h"
#pragma message enable nosimpint
#endif
- #include "wx/utils.h" // for wxGetDisplay()
#elif defined(__WXGTK__)
// we have to declare struct tm to avoid problems with first forward
// declaring it in C code (glib.h included from gdk.h does it) and then
#include "wx/string.h"
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/file.h"
#include "wx/ffile.h"
#include "wx/textfile.h"
#include "wx/dir.h"
-#include "wx/utils.h"
#include "wx/tokenzr.h"
#include "wx/iconloc.h"
#include "wx/filename.h"
///////////////////////////////////////////////////////////////////////////////
-// Name: unix/snglinst.cpp
+// Name: src/unix/snglinst.cpp
// Purpose: implements wxSingleInstanceChecker class for Unix using
// lock files with fcntl(2) or flock(2)
// Author: Vadim Zeitlin
#include "wx/string.h"
#include "wx/log.h"
#include "wx/intl.h"
+ #include "wx/utils.h" // wxGetHomeDir()
#endif //WX_PRECOMP
#include "wx/file.h"
-#include "wx/utils.h" // wxGetHomeDir()
#include "wx/snglinst.h"
m_nameLock.c_str());
Unlock();
-
+
return LOCK_ERROR;
}
case LOCK_CREATED:
// nothing more to do
- return TRUE;
+ return true;
case LOCK_ERROR:
// oops...
- return FALSE;
+ return false;
}
// Check if the file is owned by current user and has 0600 permissions.
// rarely in practice that we don't care
wxLogError(_("Failed to access lock file."));
- return FALSE;
+ return false;
}
char buf[256];
wxLogError(_("Failed to remove stale lock file '%s'."),
name.c_str());
- // return TRUE in this case for now...
+ // return true in this case for now...
}
else
{
}
}
- // return TRUE if we could get the PID of the process owning the lock file
+ // return true if we could get the PID of the process owning the lock file
// (whether it is still running or not), FALSE otherwise as it is
// unexpected
return m_pidLocker != 0;
bool wxSingleInstanceChecker::IsAnotherRunning() const
{
- wxCHECK_MSG( m_impl, FALSE, _T("must call Create() first") );
+ wxCHECK_MSG( m_impl, false, _T("must call Create() first") );
// if another instance is running, it must own the lock file - otherwise
// we have it and the locker PID is ours one
}
#endif // wxUSE_SNGLINST_CHECKER
-
#include "wx/dynarray.h"
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/module.h"
-#include "wx/utils.h"
#include "wx/timer.h"
#include "wx/stopwatch.h"
#include "wx/hash.h"
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/frame.h"
-#include "wx/utils.h"
#include "wx/gdicmn.h"
#include "wx/icon.h"
#include "wx/dialog.h"
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/utils.h"
#include "wx/brush.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/bitmap.h"
#include "wx/colour.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
#include "wx/dataobj.h"
-#include "wx/utils.h"
#include "wx/x11/private.h"
wxLogTrace( TRACE_CLIPBOARD,
_T("got unsupported clipboard target") );
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
}
if (format == clipboard->m_targetRequested)
{
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
clipboard->m_formatSupported = true;
return;
}
}
}
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
}
//-----------------------------------------------------------------------------
{
if (!wxTheClipboard)
{
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
if (!data_object)
{
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
if (selection_data->length <= 0)
{
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
/* make sure we got the data in the correct format */
if (!data_object->IsSupportedFormat( format ) )
{
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
if so, copy data to target object */
if (selection_data->type != GDK_SELECTION_TYPE_STRING)
{
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
return;
}
data_object->SetData( format, (size_t) selection_data->length, (const char*) selection_data->data );
wxTheClipboard->m_formatSupported = true;
- clipboard->m_waiting = FALSE;
+ clipboard->m_waiting = false;
}
//-----------------------------------------------------------------------------
if (event->selection == GDK_SELECTION_PRIMARY)
{
- wxTheClipboard->m_ownsPrimarySelection = FALSE;
+ wxTheClipboard->m_ownsPrimarySelection = false;
}
else
if (event->selection == g_clipboardAtom)
{
- wxTheClipboard->m_ownsClipboard = FALSE;
+ wxTheClipboard->m_ownsClipboard = false;
}
else
{
- wxTheClipboard->m_waiting = FALSE;
+ wxTheClipboard->m_waiting = false;
return FALSE;
}
}
}
- wxTheClipboard->m_waiting = FALSE;
+ wxTheClipboard->m_waiting = false;
return TRUE;
}
wxClipboard::wxClipboard()
{
- m_open = FALSE;
+ m_open = false;
- m_ownsClipboard = FALSE;
- m_ownsPrimarySelection = FALSE;
+ m_ownsClipboard = false;
+ m_ownsPrimarySelection = false;
m_data = (wxDataObject*) NULL;
m_receivedData = (wxDataObject*) NULL;
if (!g_targetsAtom) g_targetsAtom = XInternAtom( (Display*) wxGetDisplay(), "TARGETS", False );
#endif
- m_formatSupported = FALSE;
+ m_formatSupported = false;
m_targetRequested = 0;
- m_usePrimary = FALSE;
+ m_usePrimary = false;
}
wxClipboard::~wxClipboard()
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();
bool wxClipboard::AddData( wxDataObject *data )
{
#if wxUSE_NANOX
- return FALSE;
+ return false;
#else
- 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();
/* disable GUI threads */
#endif
- bool res = FALSE;
+ bool res = false;
#if 0
/* Tell the world we offer clipboard data */
res = (gtk_selection_owner_set( m_clipboardWidget,
{
wxCHECK_RET( m_open, wxT("clipboard not open") );
- m_open = FALSE;
+ m_open = false;
}
bool wxClipboard::IsOpened() const
clipboard owner which is an asynchronous process.
therefore we set m_waiting = true here and wait
until the callback "targets_selection_received"
- sets it to FALSE */
+ sets it to false */
m_waiting = true;
#endif
/* this is a true error as we checked for the presence of such data before */
- wxCHECK_MSG( m_formatSupported, FALSE, wxT("error retrieving data from clipboard") );
+ wxCHECK_MSG( m_formatSupported, false, wxT("error retrieving data from clipboard") );
/* return success */
delete[] array;
#ifndef WX_PRECOMP
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/gdicmn.h"
#include "wx/icon.h"
-#include "wx/utils.h"
#include "wx/x11/private.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/mstream.h"
#include "wx/image.h"
-#include "wx/utils.h"
#include "wx/x11/private.h"
//-------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
-// Name: dcmemory.cpp
+// Name: src/x11/dcmemory.cpp
// Purpose: wxMemoryDC class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// 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/dcmemory.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/settings.h"
-#include "wx/utils.h"
#include "wx/x11/private.h"
wxMemoryDC::wxMemoryDC() : wxWindowDC()
{
- m_ok = FALSE;
-
+ m_ok = false;
+
m_display = (WXDisplay *) wxGlobalDisplay();
int screen = DefaultScreen( wxGlobalDisplay() );
wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
: wxWindowDC()
{
- m_ok = FALSE;
+ m_ok = false;
m_display = (WXDisplay *) wxGlobalDisplay();
-
+
int screen = DefaultScreen( wxGlobalDisplay() );
m_cmap = (WXColormap) DefaultColormap( wxGlobalDisplay(), screen );
}
void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
{
Destroy();
-
+
m_selected = bitmap;
if (m_selected.Ok())
{
m_window = m_selected.GetBitmap();
}
- m_isMemDC = TRUE;
+ m_isMemDC = true;
SetUpDC();
}
else
{
- m_ok = FALSE;
+ m_ok = false;
m_window = NULL;
}
}
#ifndef WX_PRECOMP
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/window.h"
#include "wx/frame.h"
-#include "wx/utils.h"
#include "wx/fontutil.h"
#include "wx/x11/private.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/window.h"
#include "wx/gdicmn.h"
-#include "wx/utils.h"
#include <X11/Xlib.h>
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/utils.h" // for wxGetDisplay()
#endif
#include "wx/gdicmn.h"
-#include "wx/utils.h" // for wxGetDisplay()
#include "wx/fontutil.h" // for wxNativeFontInfo
#include "wx/tokenzr.h"
#include "wx/settings.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
-#include "wx/utils.h"
-
#ifdef __VMS
# pragma message disable nosimpint
#endif
#ifndef WX_PRECOMP
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/window.h"
-#include "wx/utils.h"
#ifdef __VMS__
#pragma message disable nosimpint
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/utils.h"
#include "wx/pen.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
+
#include "wx/colour.h"
#include "wx/bitmap.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif
-#include "wx/utils.h"
#include "wx/settings.h"
#include "wx/panel.h"
#include "wx/clipbrd.h"
#include "wx/hash.h"
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/utils.h"
#endif
#include "wx/menu.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
-#include "wx/utils.h"
#include "wx/panel.h"
#include "wx/layout.h"
#include "wx/dialog.h"