#ifndef WX_PRECOMP
#include "wx/window.h"
+ #include "wx/log.h"
#endif // WX_PRECOMP
#include "wx/cocoa/ObjcPose.h"
#include "wx/app.h"
#include "wx/combobox.h"
-#include "wx/log.h"
#include "wx/cocoa/autorelease.h"
#include "wx/cocoa/string.h"
defined(__WXMOTIF__) || \
defined(__WXX11__)
+#include "wx/bitmap.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif // WX_PRECOMP
+
#include "wx/utils.h"
#include "wx/palette.h"
-#include "wx/bitmap.h"
#include "wx/icon.h"
-#include "wx/log.h"
#include "wx/image.h"
#include "wx/module.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: cmndata.cpp
+// Name: src/common/cmndata.cpp
// Purpose: Common GDI data
// Author: Julian Smart
// Modified by:
#pragma hdrstop
#endif
+#include "wx/cmndata.h"
+
#ifndef WX_PRECOMP
#include <stdio.h>
#include "wx/string.h"
#include "wx/utils.h"
#include "wx/app.h"
+ #include "wx/log.h"
#endif
#include "wx/gdicmn.h"
-#include "wx/cmndata.h"
-#include "wx/log.h"
#include "wx/prntbase.h"
#include "wx/printdlg.h"
#include "wx/colour.h"
-#include "wx/gdicmn.h"
-#include "wx/log.h"
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+#include "wx/gdicmn.h"
// ============================================================================
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif //WX_PRECOMP
-#include "wx/log.h"
#include "wx/arrstr.h"
#if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || wxUSE_CONFIG_NATIVE)
#include "wx/wxprec.h"
#ifdef __BORLANDC__
- #pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_DYNLIB_CLASS
#include "wx/dynlib.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+ #include "wx/log.h"
+#endif //WX_PRECOMP
+
#include "wx/filefn.h"
-#include "wx/intl.h"
-#include "wx/log.h"
#include "wx/utils.h"
#include "wx/filename.h" // for SplitPath()
#include "wx/app.h"
{
wxAppTraits *traits = wxAppConsole::GetInstance() ?
wxAppConsole::GetInstance()->GetTraits() : NULL;
- wxCHECK_MSG( traits, _T(""),
+ wxCHECK_MSG( traits, wxEmptyString,
_("can't query for GUI plugins name in console applications") );
suffix = traits->GetToolkitInfo().shortName;
}
#include "wx/dynarray.h"
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif //WX_PRECOMP
#include "wx/app.h"
#include "wx/file.h"
-#include "wx/log.h"
#include "wx/textfile.h"
#include "wx/memtext.h"
#include "wx/config.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/utils.h"
#include "wx/mac/private.h" // includes mac headers
#endif
-#include "wx/log.h"
-
#ifdef __WINDOWS__
#include "wx/msw/private.h"
#include "wx/msw/mslu.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: filesys.cpp
+// Name: src/common/filesys.cpp
// Purpose: wxFileSystem class - interface for opening files
// Author: Vaclav Slavik
// Copyright: (c) 1999 Vaclav Slavik
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_FILESYSTEM
+#include "wx/filesys.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/wfstream.h"
#include "wx/module.h"
-#include "wx/filesys.h"
#include "wx/mimetype.h"
#include "wx/filename.h"
-#include "wx/log.h"
//--------------------------------------------------------------------------------
wxString ext, mime;
wxString loc = GetRightLocation(location);
wxChar c;
- int l = loc.Length(), l2;
+ int l = loc.length(), l2;
l2 = l;
for (int i = l-1; i >= 0; i--)
wxString wxFileSystemHandler::GetProtocol(const wxString& location) const
{
wxString s = wxEmptyString;
- int i, l = location.Length();
+ int i, l = location.length();
bool fnd = false;
for (i = l-1; (i >= 0) && ((location[i] != wxT('#')) || (!fnd)); i--) {
int i;
bool fnd = false;
- for (i = location.Length()-1; i >= 0; i--) {
+ for (i = location.length()-1; i >= 0; i--) {
if ((location[i] == wxT(':')) && (i != 1 /*win: C:\path*/)) fnd = true;
else if (fnd && (location[i] == wxT('#'))) return location.Left(i);
}
wxString wxFileSystemHandler::GetRightLocation(const wxString& location) const
{
- int i, l = location.Length();
+ int i, l = location.length();
int l2 = l + 1;
for (i = l-1;
wxString wxFileSystemHandler::GetAnchor(const wxString& location) const
{
wxChar c;
- int l = location.Length();
+ int l = location.length();
for (int i = l-1; i >= 0; i--) {
c = location[i];
wxString r;
int i, j, cnt;
- cnt = p.Length();
+ cnt = p.length();
for (i = 0; i < cnt; i++)
if (p.GetChar(i) == wxT('\\')) p.GetWritableChar(i) = wxT('/'); // Want to be windows-safe
r << p.GetChar(i);
if (p.GetChar(i) == wxT('/') && p.GetChar(i-1) == wxT('.') && p.GetChar(i-2) == wxT('.'))
{
- for (j = r.Length() - 2; j >= 0 && r.GetChar(j) != wxT('/') && r.GetChar(j) != wxT(':'); j--) {}
+ for (j = r.length() - 2; j >= 0 && r.GetChar(j) != wxT('/') && r.GetChar(j) != wxT(':'); j--) {}
if (j >= 0 && r.GetChar(j) != wxT(':'))
{
for (j = j - 1; j >= 0 && r.GetChar(j) != wxT('/') && r.GetChar(j) != wxT(':'); j--) {}
if (is_dir)
{
- if (m_Path.Length() > 0 && m_Path.Last() != wxT('/') && m_Path.Last() != wxT(':'))
+ if (m_Path.length() > 0 && m_Path.Last() != wxT('/') && m_Path.Last() != wxT(':'))
m_Path << wxT('/');
}
else
{
- for (i = m_Path.Length()-1; i >= 0; i--)
+ for (i = m_Path.length()-1; i >= 0; i--)
{
if (m_Path[(unsigned int) i] == wxT('/'))
{
}
if (pathpos == -1)
{
- for (i = 0; i < (int) m_Path.Length(); i++)
+ for (i = 0; i < (int) m_Path.length(); i++)
{
if (m_Path[(unsigned int) i] == wxT(':'))
{
break;
}
}
- if (i == (int) m_Path.Length())
+ if (i == (int) m_Path.length())
m_Path = wxEmptyString;
}
else
wxFSFile *s = NULL;
wxList::compatibility_iterator node;
- ln = loc.Length();
+ ln = loc.length();
meta = 0;
for (i = 0; i < ln; i++)
{
m_FindFileHandler = NULL;
- for (int i = spec2.Length()-1; i >= 0; i--)
+ for (int i = spec2.length()-1; i >= 0; i--)
if (spec2[(unsigned int) i] == wxT('\\')) spec2.GetWritableChar(i) = wxT('/'); // Want to be windows-safe
node = m_Handlers.GetFirst();
}
else if ( (url.Find(wxT("file://")) == 0) &&
(path.Find(wxT('/')) != wxNOT_FOUND) &&
- (path.Length() > 1) && (path[1u] != wxT(':')) )
+ (path.length() > 1) && (path[1u] != wxT(':')) )
{
path = wxT("//") + path;
}
#endif
// wxUSE_FILESYSTEM
-
-
-
#pragma hdrstop
#endif
-#include "wx/event.h"
#include "wx/gdicmn.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
+#include "wx/event.h"
#include "wx/brush.h"
#include "wx/pen.h"
#include "wx/bitmap.h"
#include "wx/settings.h"
#include "wx/hashmap.h"
-#include "wx/log.h"
#include <string.h>
#ifdef __WXMOTIF__
/////////////////////////////////////////////////////////////////////////////
-// Name: common/geometry.cpp
+// Name: src/common/geometry.cpp
// Purpose: Common Geometry Classes
// Author: Stefan Csomor
// Modified by:
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_GEOMETRY
-#include "wx/log.h"
+#include "wx/geometry.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include <string.h>
-#include "wx/geometry.h"
#include "wx/datstrm.h"
//
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/txtstrm.h"
//-----------------------------------------------------------------------------
#endif // wxUSE_STREAMS
-#endif // wxUSE_PNM
+#endif // wxUSE_IMAGE && wxUSE_PNM
/////////////////////////////////////////////////////////////////////////////
-// Name: log.cpp
+// Name: src/common/log.cpp
// Purpose: Assorted wxLogXXX functions, and wxLog (sink for logs)
// Author: Vadim Zeitlin
// Modified by:
// wxWidgets
#ifndef WX_PRECOMP
+ #include "wx/log.h"
#include "wx/app.h"
#include "wx/arrstr.h"
#include "wx/intl.h"
#include "wx/apptrait.h"
#include "wx/file.h"
-#include "wx/log.h"
#include "wx/msgout.h"
#include "wx/textfile.h"
#include "wx/thread.h"
}
#endif // wxUSE_LOG
-
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
+#include "wx/memory.h"
+
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/app.h"
#include "wx/hash.h"
+ #include "wx/log.h"
#endif
#if wxUSE_THREADS
#include "wx/thread.h"
#endif
-#include "wx/log.h"
#include <stdlib.h>
#include "wx/ioswrap.h"
#endif
-#include "wx/memory.h"
-
#if wxUSE_THREADS && defined(__WXDEBUG__)
#define USE_THREADSAFE_MEMORY_ALLOCATION 1
#else
#include "wx/dynarray.h"
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif //WX_PRECOMP
#include "wx/module.h"
-#include "wx/log.h"
#include "wx/file.h"
#include "wx/iconloc.h"
#include "wx/confbase.h"
#ifndef WX_PRECOMP
#include "wx/hash.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/listimpl.cpp"
#define TRACE_MODULE _T("module")
/////////////////////////////////////////////////////////////////////////////
-// Name: common/msgout.cpp
+// Name: src/common/msgout.cpp
// Purpose: wxMessageOutput implementation
// Author: Mattia Barbon
// Modified by:
#include "wx/ffile.h"
#include "wx/app.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#if wxUSE_GUI
#include "wx/msgdlg.h"
#endif // wxUSE_GUI
#include "wx/msgout.h"
#include "wx/apptrait.h"
-#include "wx/log.h"
-
#include <stdarg.h>
#include <stdio.h>
}
#endif // wxUSE_GUI
-
#include "wx/object.h"
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/app.h"
#include "wx/timer.h"
#include "wx/utils.h"
#include "wx/module.h"
-#include "wx/log.h"
#include "wx/event.h"
#include "wx/sckaddr.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/utils.h"
-#include "wx/log.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
// Created: 2006-04-13
// Id: $Id$
// Copyright: (c) Julian Smart, Robert Roebling, Vadim Zeitlin,
-// SciTech Software, Inc.
+// SciTech Software, Inc.
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Currently, only for Mac as a toolbar replacement.
#if defined(__WXMAC__) && wxUSE_TOOLBAR && wxUSE_BMPBUTTON
+#include "wx/generic/buttonbar.h"
+
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/app.h"
+ #include "wx/log.h"
#endif
-#include "wx/generic/buttonbar.h"
#include "wx/frame.h"
#include "wx/image.h"
-#include "wx/log.h"
#include "wx/settings.h"
#include "wx/dcclient.h"
m_x = m_y = wxDefaultCoord;
m_width =
m_height = 0;
-
+
m_button = NULL;
}
m_labelMargin = 2;
m_labelHeight = 0;
-
+
SetMargins(8, 2);
SetToolPacking(8);
}
{
if ( !wxToolBarBase::Realize() )
return false;
-
+
m_needsLayout = true;
DoLayout();
-
+
SetBestSize(wxSize(m_maxWidth, m_maxHeight));
return true;
tool->m_x = x;
tool->m_y = y;
-
+
if (tool->IsButton())
{
if (!tool->GetButton())
wxBU_AUTODRAW|wxBORDER_NONE);
if (!tool->GetShortHelp().IsEmpty())
bmpButton->SetLabel(tool->GetShortHelp());
-
+
tool->SetButton(bmpButton);
}
else
{
tool->GetButton()->Move(wxPoint(tool->m_x, tool->m_y));
}
-
+
int w = widthTool;
if (tool->GetButton())
{
}
#endif // wxUSE_TOOLBAR && wxUSE_BMPBUTTON
-
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif // WX_PRECOMP
#include "wx/dcmemory.h"
#include "wx/utils.h"
#include "wx/app.h"
#include "wx/image.h"
-#include "wx/log.h"
#include "wx/prntbase.h"
#include "wx/generic/prntdlgg.h"
#include "wx/paper.h"
#ifndef WX_PRECOMP
#include "wx/hash.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/module.h"
#include "wx/gdicmn.h"
#include "wx/imaglist.h"
#include "wx/icon.h"
-#include "wx/log.h"
#include "wx/sizer.h"
#include "wx/tokenzr.h"
#include "wx/dir.h"
#include "wx/dcmemory.h"
#include "wx/settings.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
-
#define wxUSE_IMAGE_IN_DRAGIMAGE 1
#if wxUSE_IMAGE_IN_DRAGIMAGE
#pragma hdrstop
#endif
+#include "wx/generic/mdig.h"
+
#ifndef WX_PRECOMP
#include "wx/panel.h"
#include "wx/menu.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif //WX_PRECOMP
-#include "wx/generic/mdig.h"
#include "wx/stockitem.h"
enum MDI_MENU_ID
Create( parent, id, title, wxDefaultPosition, size, style, name );
}
-#include "wx/log.h"
wxGenericMDIChildFrame::~wxGenericMDIChildFrame()
{
wxGenericMDIParentFrame *pParentFrame = GetMDIParentFrame();
IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxGenericMDIClientWindow)
#endif
-
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/settings.h"
#include "wx/generic/imaglist.h"
#include "wx/dcclient.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: mgl/timer.cpp
+// Name: src/generic/timer.cpp
// Purpose: wxTimer implementation
// Author: Vaclav Slavik
// Id: $Id$
// is in wxEventLoop::Dispatch().
// ----------------------------------------------------------------------------
+#if wxUSE_TIMER
+
#include "wx/timer.h"
-#if wxUSE_TIMER
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
-#include "wx/log.h"
#include "wx/module.h"
// ----------------------------------------------------------------------------
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/gdicmn.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include "wx/memory.h"
#include "wx/font.h"
#include "wx/settings.h"
#if wxUSE_THREADS
wxMutexLocker lock(gs_idleTagsMutex);
#endif
- g_isIdle = TRUE;
+ g_isIdle = true;
wxTheApp->m_idleTag = 0;
}
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)
#endif // __WXDEBUG__
m_idleTag = 0;
- g_isIdle = TRUE;
+ g_isIdle = true;
wxapp_install_idle_handler();
#if wxUSE_THREADS
return false;
}
- wxSetDetectableAutoRepeat( TRUE );
+ wxSetDetectableAutoRepeat( true );
#if wxUSE_INTL
wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
{
g_source_remove( wxTheApp->m_idleTag );
wxTheApp->m_idleTag = 0;
- g_isIdle = TRUE;
+ g_isIdle = true;
}
}
/////////////////////////////////////////////////////////////////////////////
-// Name: gtk/clipbrd.cpp
+// Name: src/gtk/clipbrd.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_CLIPBOARD
+
#include "wx/clipbrd.h"
-#if wxUSE_CLIPBOARD
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
#include "wx/dataobj.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include "wx/gtk/private.h"
-//-----------------------------------------------------------------------------
-// thread system
-//-----------------------------------------------------------------------------
-
-#if wxUSE_THREADS
-#endif
-
//-----------------------------------------------------------------------------
// data
//-----------------------------------------------------------------------------
if (format == clipboard->m_targetRequested)
{
- clipboard->m_waiting = FALSE;
- clipboard->m_formatSupported = TRUE;
+ clipboard->m_waiting = false;
+ clipboard->m_formatSupported = true;
return;
}
}
data_object->SetData( format, (size_t) selection_data->length, (const char*) selection_data->data );
- wxTheClipboard->m_formatSupported = TRUE;
+ wxTheClipboard->m_formatSupported = true;
clipboard->m_waiting = FALSE;
}
}
static gint
selection_clear_clip( GtkWidget *WXUNUSED(widget), GdkEventSelection *event )
{
- if (!wxTheClipboard) return TRUE;
+ if (!wxTheClipboard) return true;
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;
}
}
// 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 wxUSE_CONTROLS
-#include "wx/log.h"
#include "wx/control.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/fontutil.h"
#include "wx/settings.h"
#include "wx/gtk/private.h"
GtkWidget* framewidget = gtk_frame_new(NULL);
gtk_frame_set_label_widget(GTK_FRAME(framewidget), labelwidget);
- return framewidget; //note that the label is already set so you'll
+ return framewidget; //note that the label is already set so you'll
//only need to call wxControl::SetLabel afterwards
}
}
#endif // wxUSE_CONTROLS
-
///////////////////////////////////////////////////////////////////////////////
-// Name: dataobj.cpp
+// Name: src/gtk/dataobj.cpp
// Purpose: wxDataObject class
// Author: Robert Roebling
// Id: $Id$
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_DATAOBJ
+
#include "wx/dataobj.h"
-#if wxUSE_DATAOBJ
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
#include "wx/app.h"
#include "wx/debug.h"
#include "wx/mstream.h"
#include "wx/image.h"
-#include "wx/log.h"
#include "wx/uri.h"
#include <gdk/gdk.h>
#ifndef wxUSE_GENERICDATAVIEWCTRL
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/stockitem.h"
#include "wx/dcclient.h"
#include "wx/calctrl.h"
#include "wx/popupwin.h"
#include "wx/sizer.h"
-#include "wx/log.h"
#include "wx/gtk/private.h"
#include "wx/gtk/win_gtk.h"
GtkTreeViewColumn *column = gtk_tree_view_column_new();
gtk_tree_view_column_set_title( column, wxGTK_CONV(title) );
-
+
if (sizing == wxDATAVIEW_COL_WIDTH_FIXED)
gtk_tree_view_column_set_sizing( column, GTK_TREE_VIEW_COLUMN_FIXED );
else if (sizing == wxDATAVIEW_COL_WIDTH_GROW)
gtk_tree_view_column_set_sizing( column, GTK_TREE_VIEW_COLUMN_GROW_ONLY );
else
gtk_tree_view_column_set_sizing( column, GTK_TREE_VIEW_COLUMN_AUTOSIZE );
-
+
if (fixed_width > 0)
gtk_tree_view_column_set_fixed_width( column, fixed_width );
-
+
gtk_tree_view_column_pack_start( column, renderer, TRUE );
gtk_tree_view_column_set_cell_data_func( column, renderer,
/////////////////////////////////////////////////////////////////////////////
-// Name: gtk/dcclient.cpp
+// Name: src/gtk/dcclient.cpp
// Purpose:
// Author: Robert Roebling
// RCS-ID: $Id$
#endif
#include "wx/dcclient.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/dcmemory.h"
#include "wx/image.h"
#include "wx/module.h"
-#include "wx/log.h"
#include "wx/fontutil.h"
#include "wx/gtk/win_gtk.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/window.h"
#include "wx/app.h"
#include "wx/gdicmn.h"
-#include "wx/log.h"
#include "wx/utils.h"
#include "wx/gtk/private.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: gtk/font.cpp
+// Name: src/gtk/font.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
#include "wx/wxprec.h"
#include "wx/font.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/fontutil.h"
#include "wx/cmndata.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include "wx/gdicmn.h"
#include "wx/tokenzr.h"
#include "wx/settings.h"
wxString wxFont::GetFaceName() const
{
- wxCHECK_MSG( Ok(), wxT(""), wxT("invalid font") );
+ wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") );
#if wxUSE_PANGO
return M_FONTDATA->HasNativeFont() ? M_FONTDATA->m_nativeFontInfo.GetFaceName()
#if wxUSE_LIBGNOMEPRINT
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/math.h"
#include "wx/fontutil.h"
#include "wx/gtk/private.h"
#include "wx/module.h"
#include "wx/dynlib.h"
#include "wx/dcmemory.h"
-#include "wx/log.h"
#include "wx/icon.h"
#include <libgnomeprint/gnome-print.h>
}
}
-void wxGnomePrintDC::makeEllipticalPath(wxCoord x, wxCoord y,
+void wxGnomePrintDC::makeEllipticalPath(wxCoord x, wxCoord y,
wxCoord width, wxCoord height)
{
double r = 4 * (sqrt (2) - 1) / 3;
halfHR = r * halfH;
wxCoord halfWI = (wxCoord) halfW,
halfHI = (wxCoord) halfH;
-
+
gs_lgp->gnome_print_newpath( m_gpc );
-
+
// Approximate an ellipse using four cubic splines, clockwise from 0 deg */
gs_lgp->gnome_print_moveto( m_gpc,
- XLOG2DEV(x + width),
+ XLOG2DEV(x + width),
YLOG2DEV(y + halfHI) );
gs_lgp->gnome_print_curveto( m_gpc,
XLOG2DEV(x + width),
YLOG2DEV(y + (wxCoord) rint (halfH + halfHR)),
- XLOG2DEV(x + (wxCoord) rint(halfW + halfWR)),
+ XLOG2DEV(x + (wxCoord) rint(halfW + halfWR)),
YLOG2DEV(y + height),
- XLOG2DEV(x + halfWI),
+ XLOG2DEV(x + halfWI),
YLOG2DEV(y + height) );
gs_lgp->gnome_print_curveto( m_gpc,
- XLOG2DEV(x + (wxCoord) rint(halfW - halfWR)),
+ XLOG2DEV(x + (wxCoord) rint(halfW - halfWR)),
YLOG2DEV(y + height),
XLOG2DEV(x),
YLOG2DEV(y + (wxCoord) rint (halfH + halfHR)),
XLOG2DEV(x + width),
YLOG2DEV(y + (wxCoord) rint(halfH - halfHR)),
XLOG2DEV(x + width), YLOG2DEV(y + halfHI) );
-
+
gs_lgp->gnome_print_closepath(m_gpc);
}
case wxSHORT_DASH: gs_lgp->gnome_print_setdash( m_gpc, 2, short_dashed, 0 ); break;
case wxLONG_DASH: gs_lgp->gnome_print_setdash( m_gpc, 2, wxCoord_dashed, 0 ); break;
case wxDOT_DASH: gs_lgp->gnome_print_setdash( m_gpc, 4, dotted_dashed, 0 ); break;
- case wxUSER_DASH:
+ case wxUSER_DASH:
{
// It may be noted that libgnomeprint between at least
// versions 2.8.0 and 2.12.1 makes a copy of the dashes
#if wxUSE_MIMETYPE && wxUSE_LIBGNOMEVFS
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/mimetype.h"
#include "wx/gtk/private.h"
#include "wx/module.h"
#include "wx/dynlib.h"
-#include "wx/log.h"
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
(), (), FALSE )
wxDL_METHOD_DEFINE( void, gnome_vfs_shutdown,
(), (), /**/ )
-
+
wxDL_METHOD_DEFINE( GnomeVFSResult, gnome_vfs_mime_set_icon,
(const char *mime_type, const char *filename), (mime_type, filename), GNOME_VFS_OK )
};
wxDL_METHOD_LOAD( m_gnome_vfs_lib, gnome_vfs_init, success )
wxDL_METHOD_LOAD( m_gnome_vfs_lib, gnome_vfs_shutdown, success )
-
+
m_ok = true;
}
const wxString& strDesc)
{
int nIndex = AddToMimeData(strType, strIcon, entry, strExtensions, strDesc, true);
-
+
if ( nIndex == wxNOT_FOUND )
return false;
// User modificationt to the MIME database
// are not supported :-)
}
-
+
return false;
}
{
if (gs_lgvfs->IsOk())
gs_lgvfs->gnome_vfs_shutdown();
-
+
delete gs_lgvfs;
}
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/arrstr.h"
#include "wx/utils.h"
#include "wx/checklst.h"
#include "wx/settings.h"
-#include "wx/log.h"
#include "wx/gtk/private.h"
#include "wx/gtk/treeentry_gtk.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/app.h"
#include "wx/bitmap.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/panel.h"
#include "wx/utils.h"
#include "wx/imaglist.h"
-#include "wx/log.h"
#include "wx/bitmap.h"
#include "wx/fontutil.h"
#include "wx/radiobox.h"
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/dialog.h"
#include "wx/frame.h"
-#include "wx/log.h"
#include "wx/gtk/private.h"
#include <gdk/gdkkeysyms.h>
/////////////////////////////////////////////////////////////////////////////
-// Name: gtk/region.cpp
+// Name: src/gtk/region.cpp
// Purpose:
// Author: Robert Roebling
// Modified: VZ at 05.10.00: use AllocExclusive(), comparison fixed
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/region.h"
-#include "wx/log.h"
#include "wx/gtk/private.h"
return r;
}
-
/////////////////////////////////////////////////////////////////////////
-// File: taskbar.cpp
+// File: src/gtk/taskbar.cpp
// Purpose: wxTaskBarIcon (src/unix/taskbarx11.cpp) helper for GTK2
// Author: Vaclav Slavik
// Modified by:
#include "wx/wxprec.h"
#include "wx/gtk/taskbarpriv.h"
-#include "wx/log.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/frame.h"
#include "wx/menu.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/utils.h"
-#include "wx/log.h"
#include "wx/math.h"
#include "wx/settings.h"
#include "wx/panel.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: thread.cpp
+// Name: src/gtk/thread.cpp
// Purpose: Solaris thread support
// Author: Guilhem Lavaux
// Modified by:
#include "wx/wxprec.h"
#include "wx/thread.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/wx.h"
#include "wx/module.h"
-#include "wx/log.h"
wxMutex::wxMutex()
{
/////////////////////////////////////////////////////////////////////////////
-// Name: threadsgi.cpp
+// Name: src/gtk/threadsgi.cpp
// Purpose: wxThread (SGI) Implementation
// Author: Original from Wolfram Gloger/Guilhem Lavaux
// Modified by:
#include "wx/wxprec.h"
#include "wx/thread.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include <stdio.h>
#include <unistd.h>
#include <sys/prctl.h>
#include "wx/module.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include "gdk/gdk.h"
#include "gtk/gtk.h"
wxThreadGuiExit();
delete wxMainMutex;
}
-
#endif
#include "wx/toplevel.h"
-#include "wx/log.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/dialog.h"
#include "wx/control.h"
#include "wx/app.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: treectrl.cpp
+// Name: src/gtk/treectrl.cpp
// Purpose: wxTreeCtrl
// Author: Denis Pershin
// Modified by:
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#ifndef WX_PRECOMP
-#include "wx/wx.h"
+ #include "wx/wx.h"
+ #include "wx/log.h"
#endif
#include "wx/gtk/treectrl.h"
#include "wx/textctrl.h"
-#include "wx/log.h"
#include <gtk/gtk.h>
m_imageListState = imageList;
}
-wxString wxTreeCtrl::GetItemText(const wxTreeItemId &item) const {
- char *t;
+wxString wxTreeCtrl::GetItemText(const wxTreeItemId &item) const
+{
+ char *t;
- if (!item.IsOk())
- return wxString("");
+ if (!item.IsOk())
+ return wxEmptyString;
- GtkLabel *l = GTK_LABEL(gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)item), "w_label"));
- gtk_label_get(l, &t);
+ GtkLabel *l = GTK_LABEL(gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)item), "w_label"));
+ gtk_label_get(l, &t);
- return t;
+ return t;
}
int wxTreeCtrl::GetItemImage(const wxTreeItemId& item) const {
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/apptrait.h"
-#include "wx/log.h"
#include "wx/process.h"
#ifndef WX_PRECOMP
#include "wx/list.h"
#include "wx/string.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/config.h"
#include "wx/app.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/dcclient.h"
#include "wx/menu.h"
#include "wx/statusbr.h"
#include "wx/settings.h"
-#include "wx/log.h"
#include "wx/fontutil.h"
#ifdef __WXDEBUG__
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/gdicmn.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include "wx/memory.h"
#include "wx/font.h"
#include "wx/settings.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: gtk/clipbrd.cpp
+// Name: src/gtk1/clipbrd.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_CLIPBOARD
+
#include "wx/clipbrd.h"
-#if wxUSE_CLIPBOARD
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
#include "wx/dataobj.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include <glib.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>
-//-----------------------------------------------------------------------------
-// thread system
-//-----------------------------------------------------------------------------
-
-#if wxUSE_THREADS
-#endif
-
//-----------------------------------------------------------------------------
// data
//-----------------------------------------------------------------------------
#endif
// wxUSE_CLIPBOARD
-
#if wxUSE_CONTROLS
-#include "wx/log.h"
#include "wx/control.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/fontutil.h"
#include "wx/settings.h"
#include "wx/gtk1/private.h"
}
#endif // wxUSE_CONTROLS
-
///////////////////////////////////////////////////////////////////////////////
-// Name: dataobj.cpp
+// Name: src/gtk1/dataobj.cpp
// Purpose: wxDataObject class
// Author: Robert Roebling
// Id: $Id$
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_DATAOBJ
+
#include "wx/dataobj.h"
-#if wxUSE_DATAOBJ
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
#include "wx/app.h"
#include "wx/debug.h"
#include "wx/mstream.h"
#include "wx/image.h"
-#include "wx/log.h"
#include "wx/uri.h"
#include <gdk/gdk.h>
/////////////////////////////////////////////////////////////////////////////
-// Name: gtk/dcclient.cpp
+// Name: src/gtk1/dcclient.cpp
// Purpose:
// Author: Robert Roebling
// RCS-ID: $Id$
#endif
#include "wx/dcclient.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/dcmemory.h"
#include "wx/image.h"
#include "wx/module.h"
-#include "wx/log.h"
#include "wx/fontutil.h"
#include "wx/gtk1/win_gtk.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/window.h"
#include "wx/app.h"
#include "wx/gdicmn.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: gtk/font.cpp
+// Name: src/gtk/font.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
#include "wx/wxprec.h"
#include "wx/font.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/fontutil.h"
#include "wx/cmndata.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include "wx/gdicmn.h"
#include "wx/tokenzr.h"
#include "wx/settings.h"
wxString wxFont::GetFaceName() const
{
- wxCHECK_MSG( Ok(), wxT(""), wxT("invalid font") );
+ wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") );
#if wxUSE_PANGO
return M_FONTDATA->HasNativeFont() ? M_FONTDATA->m_nativeFontInfo.GetFaceName()
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/app.h"
#include "wx/bitmap.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/panel.h"
#include "wx/utils.h"
#include "wx/imaglist.h"
-#include "wx/log.h"
#include "wx/bitmap.h"
#include "wx/fontutil.h"
#include "wx/radiobox.h"
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/dialog.h"
#include "wx/frame.h"
-#include "wx/log.h"
#include "wx/gtk1/private.h"
#include <gdk/gdkkeysyms.h>
/////////////////////////////////////////////////////////////////////////////
-// Name: gtk/region.cpp
+// Name: src/gtk1/region.cpp
// Purpose:
// Author: Robert Roebling
// Modified: VZ at 05.10.00: use AllocExclusive(), comparison fixed
#include "wx/wxprec.h"
#include "wx/region.h"
-#include "wx/log.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/gtk1/private.h"
return r;
}
-
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/utils.h"
-#include "wx/log.h"
#include "wx/math.h"
#include "wx/settings.h"
#include "wx/panel.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: thread.cpp
+// Name: src/gtk1/thread.cpp
// Purpose: Solaris thread support
// Author: Guilhem Lavaux
// Modified by:
#include "wx/wxprec.h"
#include "wx/thread.h"
-#include "wx/wx.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/wx.h"
+ #include "wx/log.h"
+#endif
+
#include "wx/module.h"
-#include "wx/log.h"
wxMutex::wxMutex()
{
/////////////////////////////////////////////////////////////////////////////
-// Name: threadsgi.cpp
+// Name: src/gtk1/threadsgi.cpp
// Purpose: wxThread (SGI) Implementation
// Author: Original from Wolfram Gloger/Guilhem Lavaux
// Modified by:
#include "wx/wxprec.h"
#include "wx/thread.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include <stdio.h>
#include <unistd.h>
#include <sys/prctl.h>
#include "wx/module.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include "gdk/gdk.h"
#include "gtk/gtk.h"
#endif
#include "wx/toplevel.h"
-#include "wx/log.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/dialog.h"
#include "wx/control.h"
#include "wx/app.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: treectrl.cpp
+// Name: src/gtk1/treectrl.cpp
// Purpose: wxTreeCtrl
// Author: Denis Pershin
// Modified by:
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#ifndef WX_PRECOMP
-#include "wx/wx.h"
+ #include "wx/wx.h"
+ #include "wx/log.h"
#endif
#include "wx/gtk1/treectrl.h"
#include "wx/textctrl.h"
-#include "wx/log.h"
#include <gtk/gtk.h>
m_imageListState = imageList;
}
-wxString wxTreeCtrl::GetItemText(const wxTreeItemId &item) const {
- char *t;
+wxString wxTreeCtrl::GetItemText(const wxTreeItemId &item) const
+{
+ char *t;
- if (!item.IsOk())
- return wxString("");
+ if (!item.IsOk())
+ return wxEmptyString;
- GtkLabel *l = GTK_LABEL(gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)item), "w_label"));
- gtk_label_get(l, &t);
+ GtkLabel *l = GTK_LABEL(gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)item), "w_label"));
+ gtk_label_get(l, &t);
- return t;
+ return t;
}
int wxTreeCtrl::GetItemImage(const wxTreeItemId& item) const {
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/apptrait.h"
-#include "wx/log.h"
#include "wx/process.h"
#ifndef WX_PRECOMP
#include "wx/list.h"
#include "wx/string.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/config.h"
#include "wx/app.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/dcclient.h"
#include "wx/menu.h"
#include "wx/statusbr.h"
#include "wx/settings.h"
-#include "wx/log.h"
#include "wx/fontutil.h"
#ifdef __WXDEBUG__
#include "wx/busyinfo.h"
#include "wx/encconv.h"
#include "wx/fontmap.h"
-#include "wx/log.h"
#include "wx/html/htmlpars.h"
#include "wx/html/htmldefs.h"
#include "wx/html/htmlfilt.h"
#include "wx/scrolwin.h"
#include "wx/timer.h"
#include "wx/dcmemory.h"
+ #include "wx/log.h"
#endif
#include "wx/html/forcelnk.h"
#include "wx/image.h"
#include "wx/gifdecod.h"
-#include "wx/log.h"
#include "wx/artprov.h"
#include "wx/math.h"
#ifndef WXPRECOMP
#include "wx/intl.h"
#include "wx/dc.h"
+ #include "wx/log.h"
#endif
#include "wx/html/htmldefs.h"
#include "wx/html/winpars.h"
#include "wx/html/htmlwin.h"
#include "wx/fontmap.h"
-#include "wx/log.h"
#include "wx/settings.h"
#include "wx/uri.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/window.h"
#include "wx/dc.h"
#include "wx/dialog.h"
#include "wx/msgdlg.h"
-#include "wx/log.h"
#include "wx/module.h"
#include "wx/memory.h"
#include "wx/tooltip.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: bitmap.cpp
+// Name: src/mac/carbon/bitmap.cpp
// Purpose: wxBitmap
// Author: Stefan Csomor
// Modified by:
#include "wx/wxprec.h"
#include "wx/bitmap.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/icon.h"
-#include "wx/log.h"
#include "wx/image.h"
#include "wx/metafile.h"
#include "wx/xpmdecod.h"
#include "wx/object.h"
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/app.h"
#include "wx/timer.h"
#include "wx/utils.h"
#include "wx/module.h"
-#include "wx/log.h"
#include "wx/event.h"
#include "wx/sckaddr.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/app.h"
#include "wx/bitmap.h"
#include "wx/utils.h"
#include "wx/metafile.h"
-#include "wx/log.h"
#ifndef __DARWIN__
#include <Scrap.h>
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/dcmemory.h"
#include "wx/mstream.h"
#include "wx/image.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: dc.cpp
+// Name: src/mac/carbon/dc.cpp
// Purpose: wxDC class
// Author: Stefan Csomor
// Modified by:
#include "wx/dc.h"
#if !wxMAC_USE_CORE_GRAPHICS
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/app.h"
#include "wx/mac/uma.h"
#include "wx/dcmemory.h"
#include "wx/dcprint.h"
#include "wx/region.h"
#include "wx/image.h"
-#include "wx/log.h"
#ifdef __MSL__
#if __MSL__ >= 0x6000
if ( m_brush.GetStyle() == wxTRANSPARENT && m_pen.GetStyle() == wxTRANSPARENT )
return ;
-
+
wxMacFastPortSetter helper(this) ;
wxCoord x1, x2 , y1 , y2 ;
// CMB: draw nothing if transformed w or h is 0
if (ww == 0 || hh == 0)
return;
-
+
// CMB: handle -ve width and/or height
if (ww < 0)
{
// TODO: support text background color (only possible by hand, ATSUI does not support it)
wxCHECK_RET( Ok(), wxT("wxDC::DoDrawRotatedText - invalid DC") );
- if ( str.Length() == 0 )
+ if ( str.empty() )
return ;
wxMacFastPortSetter helper(this) ;
OSStatus status = noErr ;
ATSUTextLayout atsuLayout ;
- UniCharCount chars = str.Length() ;
+ UniCharCount chars = str.length() ;
UniChar* ubuf = NULL ;
#if SIZEOF_WCHAR_T == 4
wxCHECK_MSG(Ok(), false, wxT("wxDC::DoGetPartialTextExtents - invalid DC"));
widths.Empty();
- widths.Add(0, text.Length());
+ widths.Add(0, text.length());
- if (text.Length() == 0)
+ if (text.length() == 0)
return false;
wxMacFastPortSetter helper(this) ;
// fonts, please change it. Currently it is measuring from the
// beginning of the string for each succeeding substring, which is much
// slower than this should be.
- for (size_t i=0; i<text.Length(); i++)
+ for (size_t i=0; i<text.length(); i++)
{
wxString str(text.Left(i + 1));
Point bounds = {0, 0};
// Copy to widths, starting at measurements[1]
// NOTE: this doesn't take into account any multi-byte characters
// in buff, it probably should...
- for (size_t i=0; i<text.Length(); i++)
+ for (size_t i=0; i<text.length(); i++)
widths[i] = XDEV2LOGREL(measurements[i + 1]);
delete [] measurements;
Pattern whiteColor ;
::BackPat(GetQDGlobalsWhite(&whiteColor));
::SetThemePen( m_brush.MacGetTheme() , wxDisplayDepth() , true ) ;
- }
+ }
break ;
-
+
default :
::PenPat(GetQDGlobalsBlack(&blackColor));
break ;
-
+
}
}
else if (m_brush.IsHatch())
/////////////////////////////////////////////////////////////////////////////
-// Name: dc.cpp
+// Name: src/mac/carbon/dccg.cpp
// Purpose: wxDC class
// Author: Stefan Csomor
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#if wxMAC_USE_CORE_GRAPHICS
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/app.h"
#include "wx/mac/uma.h"
#include "wx/dcmemory.h"
#include "wx/dcprint.h"
#include "wx/region.h"
#include "wx/image.h"
-#include "wx/log.h"
#ifdef __MSL__
wxCHECK_RET( Ok(), wxT("wxDC(cg)::DoDrawRotatedText - invalid DC") );
wxCHECK_RET( m_macATSUIStyle != NULL, wxT("wxDC(cg)::DoDrawRotatedText - no valid font set") );
- if ( str.Length() == 0 )
+ if ( str.length() == 0 )
return ;
if ( m_logicalFunction != wxCOPY )
return ;
OSStatus status = noErr ;
ATSUTextLayout atsuLayout ;
- UniCharCount chars = str.Length() ;
+ UniCharCount chars = str.length() ;
UniChar* ubuf = NULL ;
#if SIZEOF_WCHAR_T == 4
MacInstallFont() ;
}
- if ( str.Length() == 0 )
+ if ( str.empty() )
return ;
wxCHECK_RET( m_macATSUIStyle != NULL, wxT("wxDC(cg)::DoGetTextExtent - no valid font set") ) ;
OSStatus status = noErr ;
ATSUTextLayout atsuLayout ;
- UniCharCount chars = str.Length() ;
+ UniCharCount chars = str.length() ;
UniChar* ubuf = NULL ;
#if SIZEOF_WCHAR_T == 4
wxCHECK_MSG( Ok(), false, wxT("wxDC(cg)::DoGetPartialTextExtents - invalid DC") );
widths.Empty();
- widths.Add(0, text.Length());
+ widths.Add(0, text.length());
- if (text.Length() == 0)
+ if (text.empty())
return false;
ATSUTextLayout atsuLayout ;
- UniCharCount chars = text.Length() ;
+ UniCharCount chars = text.length() ;
UniChar* ubuf = NULL ;
#if SIZEOF_WCHAR_T == 4
}
#endif // wxMAC_USE_CORE_GRAPHICS
-
/////////////////////////////////////////////////////////////////////////////
-// Name: dcclient.cpp
+// Name: src/mac/carbon/dcclient.cpp
// Purpose: wxClientDC class
// Author: Stefan Csomor
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#include "wx/dcclient.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/dcmemory.h"
#include "wx/region.h"
#include "wx/window.h"
#include "wx/settings.h"
#include "wx/math.h"
#include "wx/mac/private.h"
-#include "wx/log.h"
//-----------------------------------------------------------------------------
// constants
#include "wx/mac/uma.h"
#include "wx/notebook.h"
#include "wx/tabctrl.h"
-
+
static wxBrush MacGetBackgroundBrush( wxWindow* window )
{
extent.top-- ;
extent.right = x + size.x ;
extent.bottom = y + size.y ;
- bkdBrush.MacSetThemeBackground( kThemeBackgroundTabPane , (WXRECTPTR) &extent ) ;
+ bkdBrush.MacSetThemeBackground( kThemeBackgroundTabPane , (WXRECTPTR) &extent ) ;
break ;
}
-
- parent = parent->GetParent() ;
+
+ parent = parent->GetParent() ;
}
}
#endif
return bkdBrush ;
-}
+}
-wxWindowDC::wxWindowDC()
+wxWindowDC::wxWindowDC()
{
m_window = NULL ;
}
-wxWindowDC::wxWindowDC(wxWindow *window)
+wxWindowDC::wxWindowDC(wxWindow *window)
{
m_window = window ;
wxTopLevelWindowMac* rootwindow = window->MacGetTopLevelWindow() ;
// situations
m_macLocalOrigin.x = x ;
m_macLocalOrigin.y = y ;
-
+
m_graphicContext = new wxMacCGContext( (CGrafPtr) m_macPort ) ;
m_graphicContext->SetPen( m_pen ) ;
m_graphicContext->SetBrush( m_brush ) ;
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/cmndata.h"
#include "wx/fontutil.h"
-#include "wx/log.h"
// ============================================================================
// implementation
/////////////////////////////////////////////////////////////////////////////
-// Name: glcanvas.cpp
+// Name: src/mac/carbon/glcanvas.cpp
// Purpose: wxGLCanvas, for using OpenGL with wxWidgets under Macintosh
// 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 defined(__BORLANDC__)
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_GLCANVAS
+#include "wx/glcanvas.h"
+
#ifndef WX_PRECOMP
-#include "wx/frame.h"
+ #include "wx/frame.h"
+ #include "wx/log.h"
#endif
#include "wx/settings.h"
-#include "wx/log.h"
-#include "wx/glcanvas.h"
#include "wx/mac/uma.h"
// DLL options compatibility check:
)
{
m_window = win;
-
+
m_drawable = (AGLDrawable) UMAGetWindowPort(MAC_WXHWND(win->MacGetTopLevelWindowRef()));
-
+
m_glContext = aglCreateContext(fmt, other ? other->m_glContext : NULL);
wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGl context") );
-
+
GLboolean b;
b = aglSetDrawable(m_glContext, m_drawable);
wxCHECK_RET( b, wxT("Couldn't bind OpenGl context") );
static AGLPixelFormat ChoosePixelFormat(const int *attribList)
{
GLint data[512];
- GLint defaultAttribs[] = { AGL_RGBA,
- AGL_DOUBLEBUFFER,
- AGL_MINIMUM_POLICY,
+ GLint defaultAttribs[] = { AGL_RGBA,
+ AGL_DOUBLEBUFFER,
+ AGL_MINIMUM_POLICY,
AGL_DEPTH_SIZE, 1, // use largest available depth buffer
- AGL_RED_SIZE, 1,
- AGL_GREEN_SIZE, 1,
- AGL_BLUE_SIZE, 1,
- AGL_ALPHA_SIZE, 0,
+ AGL_RED_SIZE, 1,
+ AGL_GREEN_SIZE, 1,
+ AGL_BLUE_SIZE, 1,
+ AGL_ALPHA_SIZE, 0,
AGL_NONE };
GLint *attribs;
if (!attribList)
else
{
int arg=0, p=0;
-
+
data[p++] = AGL_MINIMUM_POLICY; // make _SIZE tags behave more like GLX
while( (attribList[arg]!=0) && (p<512) )
{
data[p++]=AGL_BLUE_SIZE; data[p++]=attribList[arg++]; break;
case WX_GL_MIN_ALPHA:
data[p++]=AGL_ALPHA_SIZE; data[p++]=attribList[arg++]; break;
- case WX_GL_DEPTH_SIZE:
+ case WX_GL_DEPTH_SIZE:
data[p++]=AGL_DEPTH_SIZE; data[p++]=attribList[arg++]; break;
- case WX_GL_STENCIL_SIZE:
+ case WX_GL_STENCIL_SIZE:
data[p++]=AGL_STENCIL_SIZE; data[p++]=attribList[arg++]; break;
case WX_GL_MIN_ACCUM_RED:
data[p++]=AGL_ACCUM_RED_SIZE; data[p++]=attribList[arg++]; break;
default:
break;
}
- }
- data[p] = 0;
-
+ }
+ data[p] = 0;
+
attribs = data;
}
-
+
return aglChoosePixelFormat(NULL, 0, attribs);
}
m_macCanvasIsShown = false ;
m_glContext = 0 ;
wxWindow::Create( parent, id, pos, size, style, name );
-
+
AGLPixelFormat fmt = ChoosePixelFormat(attribList);
wxCHECK_MSG( fmt, false, wxT("Couldn't create OpenGl pixel format") );
-
+
m_glContext = new wxGLContext(fmt, this, palette, shared);
m_macCanvasIsShown = true ;
aglDestroyPixelFormat(fmt);
-
+
return true;
}
// adjust glViewport to just this window
int x = 0 ;
int y = 0 ;
-
+
wxWindow* iter = this ;
while( iter->GetParent() )
{
- iter = iter->GetParent() ;
+ iter = iter->GetParent() ;
}
-
+
if ( iter && iter->IsTopLevel() )
{
- MacClientToRootWindow( &x , &y ) ;
- int width, height;
- GetClientSize(& width, & height);
- Rect bounds ;
- GetWindowPortBounds( MAC_WXHWND(MacGetTopLevelWindowRef()) , &bounds ) ;
- GLint parms[4] ;
- parms[0] = x ;
- parms[1] = bounds.bottom - bounds.top - ( y + height ) ;
- parms[2] = width ;
- parms[3] = height ;
-
- if ( !m_macCanvasIsShown )
- parms[0] += 20000 ;
- aglSetInteger( m_glContext->m_glContext , AGL_BUFFER_RECT , parms ) ;
- }
+ MacClientToRootWindow( &x , &y ) ;
+ int width, height;
+ GetClientSize(& width, & height);
+ Rect bounds ;
+ GetWindowPortBounds( MAC_WXHWND(MacGetTopLevelWindowRef()) , &bounds ) ;
+ GLint parms[4] ;
+ parms[0] = x ;
+ parms[1] = bounds.bottom - bounds.top - ( y + height ) ;
+ parms[2] = width ;
+ parms[3] = height ;
+
+ if ( !m_macCanvasIsShown )
+ parms[0] += 20000 ;
+ aglSetInteger( m_glContext->m_glContext , AGL_BUFFER_RECT , parms ) ;
+ }
}
void wxGLCanvas::OnSize(wxSizeEvent& event)
m_glContext->SetColour(colour);
}
-bool wxGLCanvas::Show(bool show)
+bool wxGLCanvas::Show(bool show)
{
if ( !wxWindow::Show( show ) )
return FALSE ;
-/*
+/*
if ( !show )
{
if ( m_macCanvasIsShown )
return TRUE ;
}
-void wxGLCanvas::MacVisibilityChanged()
+void wxGLCanvas::MacVisibilityChanged()
{
if ( !MacIsReallyShown() )
{
#if wxUSE_LISTBOX
+#include "wx/listbox.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
+ #include "wx/log.h"
#endif
#include "wx/app.h"
-#include "wx/listbox.h"
#include "wx/button.h"
#include "wx/settings.h"
#include "wx/toplevel.h"
-#include "wx/log.h"
#include "wx/utils.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: menu.cpp
+// Name: src/mac/carbon/menu.cpp
// Purpose: wxMenu, wxMenuBar, wxMenuItem
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
#include "wx/wxprec.h"
-#include "wx/app.h"
#include "wx/menu.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
+#include "wx/app.h"
#include "wx/menuitem.h"
#include "wx/window.h"
#include "wx/log.h"
UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), wxT("a"), wxFont::GetDefaultEncoding(), pos);
pos += 1 ;
}
-
+
SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos , wxIdToMacCommand ( pItem->GetId() ) ) ;
SetMenuItemRefCon( MAC_WXHMENU(m_hMenu) , pos , (UInt32) pItem ) ;
pItem->UpdateItemText() ;
#include "wx/dynarray.h"
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#if wxUSE_GUI
#include "wx/icon.h"
#endif
#endif
-#include "wx/log.h"
#include "wx/file.h"
#include "wx/confbase.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/log.h"
#endif
#include "wx/app.h"
#include "wx/string.h"
-#include "wx/log.h"
#include "wx/imaglist.h"
#include "wx/image.h"
#include "wx/mac/uma.h"
#include "wx/object.h"
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/file.h"
#include "wx/timer.h"
#include "wx/wxprec.h"
-#include "wx/menu.h"
#include "wx/window.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
+#include "wx/menu.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
#include "wx/utils.h"
#include "wx/statusbr.h"
#include "wx/menuitem.h"
#include "wx/spinctrl.h"
-#include "wx/log.h"
#include "wx/geometry.h"
#include "wx/textctrl.h"
uniChars = new wchar_t[ numChars ] ;
GetEventParameter( event, kEventParamTextInputSendText, typeUnicodeText, NULL, dataSize , NULL , charBuf ) ;
- charBuf[ numChars - 1 ] = 0;
+ charBuf[ numChars - 1 ] = 0;
#if SIZEOF_WCHAR_T == 2
uniChars = (wchar_t*) charBuf ;
memcpy( uniChars , charBuf , numChars * 2 ) ;
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/window.h"
#include "wx/dc.h"
#include "wx/dialog.h"
#include "wx/msgdlg.h"
-#include "wx/log.h"
#include "wx/module.h"
#include "wx/memory.h"
#include "wx/tooltip.h"
#endif
#include "wx/bitmap.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/icon.h"
-#include "wx/log.h"
#include "wx/image.h"
#include "wx/xpmdecod.h"
// mask in UngetRawData()
M_BITMAPDATA->m_hasAlpha = true;
}
-
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/app.h"
#include "wx/bitmap.h"
#include "wx/utils.h"
#include "wx/metafile.h"
-#include "wx/log.h"
#ifndef __DARWIN__
#include <Scrap.h>
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/dataobj.h"
#include "wx/mstream.h"
#include "wx/image.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: dc.cpp
+// Name: src/mac/classic/dc.cpp
// Purpose: wxDC class
// Author: Stefan Csomor
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#include "wx/wxprec.h"
+
#include "wx/dc.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/app.h"
#include "wx/mac/uma.h"
#include "wx/dcmemory.h"
#include "wx/dcprint.h"
#include "wx/region.h"
#include "wx/image.h"
-#include "wx/log.h"
#if __MSL__ >= 0x6000
namespace std {}
return;
}
- if ( str.Length() == 0 )
+ if ( str.length() == 0 )
return ;
wxMacFastPortSetter helper(this) ;
}
OSStatus status = noErr ;
ATSUTextLayout atsuLayout ;
- UniCharCount chars = str.Length() ;
+ UniCharCount chars = str.length() ;
#if wxUSE_UNICODE
- status = ::ATSUCreateTextLayoutWithTextPtr( (UniCharArrayPtr) (const wxChar*) str , 0 , str.Length() , str.Length() , 1 ,
+ status = ::ATSUCreateTextLayoutWithTextPtr( (UniCharArrayPtr) (const wxChar*) str , 0 , str.length() , str.length() , 1 ,
&chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ;
#else
wxWCharBuffer wchar = str.wc_str( wxConvLocal ) ;
{
::TextMode( srcCopy ) ;
}
- int length = strtext.Length() ;
+ int length = strtext.length() ;
int laststop = 0 ;
int i = 0 ;
*descent =YDEV2LOGREL( fi.descent );
if ( externalLeading )
*externalLeading = YDEV2LOGREL( fi.leading ) ;
- int length = strtext.Length() ;
+ int length = strtext.length() ;
int laststop = 0 ;
int i = 0 ;
wxCHECK_MSG(Ok(), false, wxT("Invalid DC"));
widths.Empty();
- widths.Add(0, text.Length());
+ widths.Add(0, text.length());
- if (text.Length() == 0)
+ if (text.length() == 0)
return false;
wxMacFastPortSetter helper(this) ;
// fonts, please change it. Currently it is measuring from the
// begining of the string for each succeding substring, which is much
// slower than this should be.
- for (size_t i=0; i<text.Length(); i++)
+ for (size_t i=0; i<text.length(); i++)
{
wxString str(text.Left(i+1));
Point bounds = {0,0};
// Copy to widths, starting at measurements[1]
// NOTE: this doesn't take into account any multi-byte characters
// in buff, it probabkly should...
- for (size_t i=0; i<text.Length(); i++)
+ for (size_t i=0; i<text.length(); i++)
widths[i] = XDEV2LOGREL(measurements[i+1]);
delete [] measurements;
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_GLCANVAS
+#include "wx/glcanvas.h"
+
#ifndef WX_PRECOMP
-#include "wx/frame.h"
+ #include "wx/frame.h"
+ #include "wx/log.h"
#endif
#include "wx/settings.h"
-#include "wx/log.h"
-#include "wx/glcanvas.h"
#include "wx/mac/uma.h"
// DLL options compatibility check:
#if wxUSE_LISTBOX
+#include "wx/listbox.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
+ #include "wx/log.h"
#endif
#include "wx/app.h"
-#include "wx/listbox.h"
#include "wx/button.h"
#include "wx/settings.h"
#include "wx/toplevel.h"
-#include "wx/log.h"
#include "wx/utils.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: mdi.cpp
+// Name: src/mac/classic/mdi.cpp
// Purpose: MDI classes
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#include "wx/wxprec.h"
+
#include "wx/mdi.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/menu.h"
#include "wx/settings.h"
-#include "wx/log.h"
#include "wx/mac/private.h"
#include "wx/mac/uma.h"
{
m_clientWindow = NULL;
m_currentChild = NULL;
-
+
// this style can be used to prevent a window from having the standard MDI
// "Window" menu
if ( style & wxFRAME_NO_WINDOW_MENU )
else // normal case: we have the window menu, so construct it
{
m_windowMenu = new wxMenu;
-
+
m_windowMenu->Append(IDM_WINDOWCASCADE, wxT("&Cascade"));
m_windowMenu->Append(IDM_WINDOWTILEHOR, wxT("Tile &Horizontally"));
m_windowMenu->Append(IDM_WINDOWTILEVERT, wxT("Tile &Vertically"));
m_windowMenu->Append(IDM_WINDOWICONS, wxT("&Arrange Icons"));
m_windowMenu->Append(IDM_WINDOWNEXT, wxT("&Next"));
}
-
+
wxFrame::Create( parent , id , title , pos , size , style , name ) ;
m_parentFrameActive = TRUE;
-
+
OnCreateClient();
-
+
return TRUE;
}
#endif
#if wxUSE_STATUSBAR
m_frameStatusBar = NULL;
-#endif
+#endif
m_clientWindow = NULL ;
-
+
if (m_windowMenu)
{
delete m_windowMenu;
m_windowMenu = (wxMenu*) NULL;
}
-
+
if ( m_clientWindow )
{
delete m_clientWindow;
void wxMDIParentFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
{
// TODO
-
+
// Propagate the event to the non-top-level children
wxFrame::OnSysColourChanged(event);
}
const wxString& name)
{
SetName(name);
-
+
if ( id > -1 )
m_windowId = id;
else
m_windowId = (int)NewControlId();
-
+
if (parent) parent->AddChild(this);
-
+
MacCreateRealWindow( title, pos , size , MacRemoveBordersFromStyle(style) , name ) ;
-
+
m_macWindowBackgroundTheme = kThemeBrushDocumentWindowBackground ;
SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ;
-
+
wxModelessWindows.Append(this);
return FALSE;
}
#endif
#if wxUSE_STATUSBAR
m_frameStatusBar = NULL;
-#endif
+#endif
}
void wxMDIChildFrame::SetMenuBar(wxMenuBar *menu_bar)
}
else if((mdiparent->m_currentChild==this) || !s_macDeactivateWindow)
mdiparent->wxFrame::MacActivate(timestamp,activating);
-
+
if(mdiparent->m_currentChild && mdiparent->m_currentChild!=this)
mdiparent->m_currentChild->wxFrame::MacActivate(timestamp,false);
mdiparent->m_currentChild = this;
bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style)
{
-
+
m_windowId = (int)NewControlId();
-
+
if ( parent )
{
parent->AddChild(this);
}
m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE);
-
+
wxModelessWindows.Append(this);
return TRUE;
}
void wxMDIClientWindow::OnScroll(wxScrollEvent& event)
{
}
-
/////////////////////////////////////////////////////////////////////////////
-// Name: menu.cpp
+// Name: src/mac/classic/menu.cpp
// Purpose: wxMenu, wxMenuBar, wxMenuItem
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// wxWidgets headers
// -----------------
-#include "wx/app.h"
+#include "wx/wxprec.h"
+
#include "wx/menu.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
+#include "wx/app.h"
#include "wx/menuitem.h"
#include "wx/window.h"
-#include "wx/log.h"
#include "wx/utils.h"
#include "wx/frame.h"
}
// if we have a title, insert it in the beginning of the menu
- if ( !!m_title )
+ if ( !m_title.empty() )
{
Append(idMenuTitle, m_title) ;
AppendSeparator() ;
return item;
}
-
-
#include "wx/dynarray.h"
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#if wxUSE_GUI
#include "wx/icon.h"
#endif
#endif //WX_PRECOMP
-#include "wx/log.h"
#include "wx/file.h"
#include "wx/confbase.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/log.h"
#endif
#include "wx/app.h"
-#include "wx/log.h"
#include "wx/imaglist.h"
#include "wx/image.h"
#include "wx/mac/uma.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: utilsexec.cpp
+// Name: src/mac/classic/utilsexec.cpp
// Purpose: Execution-related utilities
// Author: Stefan Csomor
// Modified by: David Elliott
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#include "wx/log.h"
+#include "wx/wxprec.h"
+
#include "wx/utils.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#ifdef __DARWIN__
#include "wx/unix/execute.h"
#include <unistd.h>
#ifdef __DARWIN__
void wxMAC_MachPortEndProcessDetect(CFMachPortRef port, void *data)
{
- wxEndProcessData *proc_data = (wxEndProcessData*)data;
- wxLogDebug(wxT("Wow.. this actually worked!"));
- int status = 0;
- int rc = waitpid(abs(proc_data->pid), &status, WNOHANG);
- if(!rc)
- {
- wxLogDebug(wxT("Mach port was invalidated, but process hasn't terminated!"));
- return;
- }
- if((rc != -1) && WIFEXITED(status))
- proc_data->exitcode = WEXITSTATUS(status);
- else
- proc_data->exitcode = -1;
- wxHandleProcessTermination(proc_data);
+ wxEndProcessData *proc_data = (wxEndProcessData*)data;
+ wxLogDebug(wxT("Wow.. this actually worked!"));
+ int status = 0;
+ int rc = waitpid(abs(proc_data->pid), &status, WNOHANG);
+ if(!rc)
+ {
+ wxLogDebug(wxT("Mach port was invalidated, but process hasn't terminated!"));
+ return;
+ }
+ if((rc != -1) && WIFEXITED(status))
+ proc_data->exitcode = WEXITSTATUS(status);
+ else
+ proc_data->exitcode = -1;
+ wxHandleProcessTermination(proc_data);
}
int wxAddProcessCallbackForPid(wxEndProcessData *proc_data, int pid)
wxLogDebug(wxT("Couldn't create runloopsource"));
return -1;
}
-
+
CFRelease(CFMachPortForProcess);
CFRunLoopAddSource(CFRunLoopGetCurrent(),runloopsource,kCFRunLoopDefaultMode);
#include "wx/wxprec.h"
-#include "wx/menu.h"
#include "wx/window.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
+#include "wx/menu.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
#include "wx/utils.h"
#include "wx/statusbr.h"
#include "wx/menuitem.h"
#include "wx/spinctrl.h"
-#include "wx/log.h"
#include "wx/geometry.h"
#if wxUSE_CARET
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/string.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/mac/corefoundation/cfstring.h"
#include "wx/utils.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: joystick.cpp
+// Name: src/mac/corefoundation/joystick.cpp
// Purpose: wxJoystick class
// Author: Ryan Norton
// Modified by:
// Created: 2/13/2005
// RCS-ID: $Id$
// Copyright: (c) Ryan Norton
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
//===========================================================================
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/event.h" //joystick wxEvents
-#include "wx/log.h" //logging...
#include "wx/joystick.h" //...
#include "wx/thread.h" //wxThread for polling thread/ wxCriticalSection
#include "wx/window.h" //for wxWindow to "capture" joystick
#define wxJS_MAX_AXES 10 /*max number of axes*/
#define wxJS_MAX_BUTTONS 40 /*max number of buttons*/
-enum
+enum
{
//These are positions within the cookie array
//in wxHIDJoystick that the cookies that store the axis' are
public:
wxHIDJoystick();
~wxHIDJoystick();
-
- bool Create(int nWhich);
- virtual void BuildCookies(CFArrayRef Array);
- void MakeCookies(CFArrayRef Array);
+
+ bool Create(int nWhich);
+ virtual void BuildCookies(CFArrayRef Array);
+ void MakeCookies(CFArrayRef Array);
IOHIDElementCookie* GetCookies();
IOHIDQueueInterface** GetQueue();
-
+
int m_nXMax, m_nYMax, m_nZMax, m_nRudderMax, m_nUMax, m_nVMax,
m_nXMin, m_nYMin, m_nZMin, m_nRudderMin, m_nUMin, m_nVMin;
wxJoystickThread(wxHIDJoystick* hid, int joystick);
void* Entry();
static void HIDCallback(void* target, IOReturn res, void* context, void* sender);
-
+
private:
wxHIDJoystick* m_hid;
int m_joystick;
void wxGetIntFromCFDictionary(CFTypeRef cfDict, CFStringRef key, int* pOut)
{
CFNumberGetValue(
- (CFNumberRef) CFDictionaryGetValue((CFDictionaryRef) cfDict,
- key),
- kCFNumberIntType, pOut);
+ (CFNumberRef) CFDictionaryGetValue((CFDictionaryRef) cfDict,
+ key),
+ kCFNumberIntType, pOut);
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//---------------------------------------------------------------------------
// wxJoystick Destructor
//
-// Releases the capture of the thread, deletes it, and deletes
+// Releases the capture of the thread, deletes it, and deletes
// the native implementation.
//---------------------------------------------------------------------------
wxJoystick::~wxJoystick()
ReleaseCapture();
if (m_thread)
m_thread->Delete(); // It's detached so it will delete itself
-
+
if (m_hid)
delete m_hid;
}
// wxJoystick::Get[XXX]Position
//
// Returns the value of an axis that was polled from the thread. In the
-// case of GetPosition returns the X and Y values in a wxPoint
+// case of GetPosition returns the X and Y values in a wxPoint
//---------------------------------------------------------------------------
wxPoint wxJoystick::GetPosition() const
{
return 0;
}
int wxJoystick::GetRudderPosition() const
-{
+{
if (m_thread)
return m_thread->m_axe[wxJS_AXIS_RUDDER];
return 0;
// if the native implementation doesn't exist (in constructor)
//---------------------------------------------------------------------------
bool wxJoystick::IsOk() const
-{
- return m_hid != NULL;
+{
+ return m_hid != NULL;
}
-
+
//---------------------------------------------------------------------------
// wxJoystick::Get[XXX](Id/Name)
//
// Simple accessors to the native HID implementation
//---------------------------------------------------------------------------
int wxJoystick::GetManufacturerId() const
-{ return m_hid->m_nManufacturerId; }
+{
+ return m_hid->m_nManufacturerId;
+}
+
int wxJoystick::GetProductId() const
-{ return m_hid->m_nProductId; }
+{
+ return m_hid->m_nProductId;
+}
+
wxString wxJoystick::GetProductName() const
-{ return m_hid->m_szProductName; }
+{
+ return m_hid->m_szProductName;
+}
//---------------------------------------------------------------------------
// wxJoystick::GetNumberButtons
// wxJoystick::GetNumberAxes
//
-// Queries the joystick for an active number of buttons/axes.
+// Queries the joystick for an active number of buttons/axes.
//
// In the native HID implementation, the cookies:
// 0-40 are the buttons of the joystick
int wxJoystick::GetNumberButtons() const
{
int nCount = 0;
-
+
for(int nIndex = 0; nIndex < 40; ++nIndex)
{
if(m_hid->HasElement(nIndex))
++nCount;
}
-
+
return nCount;
}
int wxJoystick::GetNumberAxes() const
{
int nCount = 0;
-
+
for(int nIndex = 40; nIndex < 50; ++nIndex)
{
if(m_hid->HasElement(nIndex))
++nCount;
}
-
+
return nCount;
}
// identifiers.
//---------------------------------------------------------------------------
int wxJoystick::GetNumberJoysticks()
-{
- return
+{
+ return
wxHIDDevice::GetCount(kHIDPage_GenericDesktop, kHIDUsage_GD_Joystick) +
- wxHIDDevice::GetCount(kHIDPage_GenericDesktop, kHIDUsage_GD_GamePad);
+ wxHIDDevice::GetCount(kHIDPage_GenericDesktop, kHIDUsage_GD_GamePad);
}
//---------------------------------------------------------------------------
// axis doesn't exist.
//---------------------------------------------------------------------------
int wxJoystick::GetXMin() const
-{ return m_hid->m_nXMin; }
+{
+ return m_hid->m_nXMin;
+}
+
int wxJoystick::GetYMin() const
-{ return m_hid->m_nYMin; }
+{
+ return m_hid->m_nYMin;
+}
+
int wxJoystick::GetZMin() const
-{ return m_hid->m_nZMin; }
+{
+ return m_hid->m_nZMin;
+}
+
int wxJoystick::GetRudderMin() const
-{ return m_hid->m_nRudderMin; }
+{
+ return m_hid->m_nRudderMin;
+}
+
int wxJoystick::GetUMin() const
-{ return m_hid->m_nUMin; }
+{
+ return m_hid->m_nUMin;
+}
+
int wxJoystick::GetVMin() const
-{ return m_hid->m_nVMin; }
+{
+ return m_hid->m_nVMin;
+}
int wxJoystick::GetXMax() const
-{ return m_hid->m_nXMax; }
+{
+ return m_hid->m_nXMax;
+}
+
int wxJoystick::GetYMax() const
-{ return m_hid->m_nYMax; }
+{
+ return m_hid->m_nYMax;
+}
+
int wxJoystick::GetZMax() const
-{ return m_hid->m_nZMax; }
+{
+ return m_hid->m_nZMax;
+}
+
int wxJoystick::GetRudderMax() const
-{ return m_hid->m_nRudderMax; }
+{
+ return m_hid->m_nRudderMax;
+}
+
int wxJoystick::GetUMax() const
-{ return m_hid->m_nUMax; }
+{
+ return m_hid->m_nUMax;
+}
+
int wxJoystick::GetVMax() const
-{ return m_hid->m_nVMax; }
+{
+ return m_hid->m_nVMax;
+}
//---------------------------------------------------------------------------
// wxJoystick::Get[XXX]
// what the linux port has.
//---------------------------------------------------------------------------
int wxJoystick::GetMaxButtons() const
-{ return wxJS_MAX_BUTTONS; }
+{
+ return wxJS_MAX_BUTTONS;
+}
+
int wxJoystick::GetMaxAxes() const
-{ return wxJS_MAX_AXES; }
+{
+ return wxJS_MAX_AXES;
+}
+
int wxJoystick::GetPollingMin() const
-{ return 10; }
+{
+ return 10;
+}
+
int wxJoystick::GetPollingMax() const
-{ return 1000; }
+{
+ return 1000;
+}
//---------------------------------------------------------------------------
// wxJoystick::Has[XXX]
// when enumerating the cookies of the joystick device
//---------------------------------------------------------------------------
bool wxJoystick::HasZ() const
-{ return m_hid->HasElement(wxJS_AXIS_Z); }
+{
+ return m_hid->HasElement(wxJS_AXIS_Z);
+}
+
bool wxJoystick::HasRudder() const
-{ return m_hid->HasElement(wxJS_AXIS_RUDDER); }
+{
+ return m_hid->HasElement(wxJS_AXIS_RUDDER);
+}
+
bool wxJoystick::HasU() const
-{ return m_hid->HasElement(wxJS_AXIS_U); }
+{
+ return m_hid->HasElement(wxJS_AXIS_U);
+}
+
bool wxJoystick::HasV() const
-{ return m_hid->HasElement(wxJS_AXIS_V); }
+{
+ return m_hid->HasElement(wxJS_AXIS_V);
+}
//---------------------------------------------------------------------------
// UNSUPPORTED
//---------------------------------------------------------------------------
int wxJoystick::GetPOVPosition() const
-{ return -1; }
+{
+ return -1;
+}
+
int wxJoystick::GetPOVCTSPosition() const
-{ return -1; }
+{
+ return -1;
+}
+
int wxJoystick::GetMovementThreshold() const
-{ return 0; }
+{
+ return 0;
+}
+
void wxJoystick::SetMovementThreshold(int threshold)
-{ }
+{
+}
+
bool wxJoystick::HasPOV() const
-{ return false; }
+{
+ return false;
+}
+
bool wxJoystick::HasPOV4Dir() const
-{ return false; }
+{
+ return false;
+}
+
bool wxJoystick::HasPOVCTS() const
-{ return false; }
+{
+ return false;
+}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//---------------------------------------------------------------------------
// wxHIDJoystick ctor
-//
+//
// Initializes the min/max members
//---------------------------------------------------------------------------
wxHIDJoystick::wxHIDJoystick() :
bool wxHIDJoystick::Create(int nWhich)
{
int nJoysticks = GetCount(kHIDPage_GenericDesktop, kHIDUsage_GD_Joystick);
-
+
if (nWhich <= nJoysticks)
- return wxHIDDevice::Create(kHIDPage_GenericDesktop,
- kHIDUsage_GD_Joystick,
+ return wxHIDDevice::Create(kHIDPage_GenericDesktop,
+ kHIDUsage_GD_Joystick,
nWhich);
else
nWhich -= nJoysticks;
-
+
int nGamePads = GetCount(kHIDPage_GenericDesktop, kHIDUsage_GD_GamePad);
-
+
if (nWhich <= nGamePads)
- return wxHIDDevice::Create(kHIDPage_GenericDesktop,
- kHIDUsage_GD_GamePad,
+ return wxHIDDevice::Create(kHIDPage_GenericDesktop,
+ kHIDUsage_GD_GamePad,
nWhich);
else
return false;
// Sets up the cookies for the HID device (called from Create) - as
// mentioned 0-40 are the buttons and 40-50 are the axes.
//
-// MakeCookies is just a recursive function for each array within
+// MakeCookies is just a recursive function for each array within
// BuildCookies.
//---------------------------------------------------------------------------
void wxHIDJoystick::BuildCookies(CFArrayRef Array)
{
- InitCookies(50, true);
+ InitCookies(50, true);
//
// I wasted two hours of my life on this line :(
// accidently removed it during some source cleaning...
//
MakeCookies(Array);
-
- //paranoid debugging stuff
+
+ //paranoid debugging stuff
#if 0
for(int i = 0; i < 50; ++i)
wxPrintf(wxT("\nVAL #%i:[%i]"), i, m_pCookies[i]);
void wxHIDJoystick::MakeCookies(CFArrayRef Array)
{
- int i, nUsage, nPage;
+ int i, nUsage, nPage;
- for (i = 0; i < CFArrayGetCount(Array); ++i)
+ for (i = 0; i < CFArrayGetCount(Array); ++i)
{
const void* ref = CFDictionaryGetValue(
- (CFDictionaryRef)CFArrayGetValueAtIndex(Array, i),
+ (CFDictionaryRef)CFArrayGetValueAtIndex(Array, i),
CFSTR(kIOHIDElementKey)
);
else
{
CFNumberGetValue(
- (CFNumberRef)
- CFDictionaryGetValue(
- (CFDictionaryRef) CFArrayGetValueAtIndex(Array, i),
- CFSTR(kIOHIDElementUsageKey)
- ),
- kCFNumberIntType,
- &nUsage );
-
+ (CFNumberRef)
+ CFDictionaryGetValue(
+ (CFDictionaryRef) CFArrayGetValueAtIndex(Array, i),
+ CFSTR(kIOHIDElementUsageKey)
+ ),
+ kCFNumberIntType,
+ &nUsage );
+
CFNumberGetValue(
- (CFNumberRef)
- CFDictionaryGetValue(
- (CFDictionaryRef) CFArrayGetValueAtIndex(Array, i),
- CFSTR(kIOHIDElementUsagePageKey)
- ),
- kCFNumberIntType,
- &nPage );
+ (CFNumberRef)
+ CFDictionaryGetValue(
+ (CFDictionaryRef) CFArrayGetValueAtIndex(Array, i),
+ CFSTR(kIOHIDElementUsagePageKey)
+ ),
+ kCFNumberIntType,
+ &nPage );
#if 0
wxLogSysError(wxT("[%i][%i]"), nUsage, nPage);
{
case kHIDUsage_GD_X:
AddCookieInQueue(CFArrayGetValueAtIndex(Array, i), wxJS_AXIS_X);
- wxGetIntFromCFDictionary(CFArrayGetValueAtIndex(Array, i),
+ wxGetIntFromCFDictionary(CFArrayGetValueAtIndex(Array, i),
CFSTR(kIOHIDElementMaxKey),
&m_nXMax);
- wxGetIntFromCFDictionary(CFArrayGetValueAtIndex(Array, i),
+ wxGetIntFromCFDictionary(CFArrayGetValueAtIndex(Array, i),
CFSTR(kIOHIDElementMinKey),
&m_nXMin);
- break;
+ break;
case kHIDUsage_GD_Y:
AddCookieInQueue(CFArrayGetValueAtIndex(Array, i), wxJS_AXIS_Y);
- wxGetIntFromCFDictionary(CFArrayGetValueAtIndex(Array, i),
+ wxGetIntFromCFDictionary(CFArrayGetValueAtIndex(Array, i),
CFSTR(kIOHIDElementMaxKey),
&m_nYMax);
- wxGetIntFromCFDictionary(CFArrayGetValueAtIndex(Array, i),
+ wxGetIntFromCFDictionary(CFArrayGetValueAtIndex(Array, i),
CFSTR(kIOHIDElementMinKey),
&m_nYMin);
break;
case kHIDUsage_GD_Z:
AddCookieInQueue(CFArrayGetValueAtIndex(Array, i), wxJS_AXIS_Z);
- wxGetIntFromCFDictionary(CFArrayGetValueAtIndex(Array, i),
+ wxGetIntFromCFDictionary(CFArrayGetValueAtIndex(Array, i),
CFSTR(kIOHIDElementMaxKey),
&m_nZMax);
- wxGetIntFromCFDictionary(CFArrayGetValueAtIndex(Array, i),
+ wxGetIntFromCFDictionary(CFArrayGetValueAtIndex(Array, i),
CFSTR(kIOHIDElementMinKey),
&m_nZMin);
break;
{
//rudder...
AddCookieInQueue(CFArrayGetValueAtIndex(Array, i), wxJS_AXIS_RUDDER );
- wxGetIntFromCFDictionary(CFArrayGetValueAtIndex(Array, i),
+ wxGetIntFromCFDictionary(CFArrayGetValueAtIndex(Array, i),
CFSTR(kIOHIDElementMaxKey),
&m_nRudderMax);
- wxGetIntFromCFDictionary(CFArrayGetValueAtIndex(Array, i),
+ wxGetIntFromCFDictionary(CFArrayGetValueAtIndex(Array, i),
CFSTR(kIOHIDElementMinKey),
&m_nRudderMin);
}
}
- }
+ }
}
//---------------------------------------------------------------------------
// Simple accessors so that the HID callback and the thread procedure
// can access members from wxHIDDevice (our parent here).
//---------------------------------------------------------------------------
-IOHIDElementCookie* wxHIDJoystick::GetCookies()
+IOHIDElementCookie* wxHIDJoystick::GetCookies()
{ return m_pCookies; }
-IOHIDQueueInterface** wxHIDJoystick::GetQueue()
+IOHIDQueueInterface** wxHIDJoystick::GetQueue()
{ return m_ppQueue; }
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
wxLogSysError(wxT("Couldn't create async event source"));
return NULL;
}
-
+
wxASSERT(pRLSource != NULL);
//attach runloop source to main run loop in thread
CFRunLoopRef pRL = CFRunLoopGetCurrent();
CFRunLoopAddSource(pRL, pRLSource, kCFRunLoopDefaultMode);
wxASSERT( CFRunLoopContainsSource(pRL, pRLSource, kCFRunLoopDefaultMode) );
-
- if( (*m_hid->GetQueue())->setEventCallout(m_hid->GetQueue(),
+
+ if( (*m_hid->GetQueue())->setEventCallout(m_hid->GetQueue(),
wxJoystickThread::HIDCallback, this, this) != kIOReturnSuccess )
{
wxLogSysError(wxT("Could not set event callout for queue"));
}
double dTime;
-
+
while(true)
{
if (TestDestroy())
//true just "handles and returns" - false forces it to stay the time
//amount
#if 1
- CFRunLoopRunInMode(kCFRunLoopDefaultMode, dTime, true);
+ CFRunLoopRunInMode(kCFRunLoopDefaultMode, dTime, true);
#else
IOReturn ret = NULL;
HIDCallback(this, ret, this, this);
Sleep(3000);
#endif
}
-
+
wxASSERT( CFRunLoopContainsSource(pRL, pRLSource, kCFRunLoopDefaultMode) );
-
+
CFRunLoopRemoveSource(pRL, pRLSource, kCFRunLoopDefaultMode);
CFRelease(pRLSource);
// This is where the REAL dirty work gets done.
//
// 1) Loops through each event the queue has recieved
-// 2) First, checks if the thread that is running the loop for
+// 2) First, checks if the thread that is running the loop for
// the polling has ended - if so it breaks out
// 3) Next, it checks if there was an error getting this event from
// the HID queue, if there was, it logs an error and returns
// 5) Sends the event to the polling window (if any)
// 6) Gets the next event and goes back to (1)
//---------------------------------------------------------------------------
-/*static*/ void wxJoystickThread::HIDCallback(void* target, IOReturn res,
+/*static*/ void wxJoystickThread::HIDCallback(void* target, IOReturn res,
void* context, void* sender)
{
IOHIDEventStruct hidevent;
IOReturn ret;
wxJoystickThread* pThis = (wxJoystickThread*) context;
wxHIDJoystick* m_hid = pThis->m_hid;
-
+
//Get the "first" event from the queue
//bogustime tells it we don't care at what time to start
//where it gets the next from
- ret = (*m_hid->GetQueue())->getNextEvent(m_hid->GetQueue(),
+ ret = (*m_hid->GetQueue())->getNextEvent(m_hid->GetQueue(),
&hidevent, bogustime, 0);
-
+
while (ret != kIOReturnUnderrun)
{
if (pThis->TestDestroy())
{
wxLogSysError(wxString::Format(wxT("wxJoystick Error:[%i]"), ret));
return;
- }
-
+ }
+
wxJoystickEvent wxevent;
-
+
//Find the cookie that changed
int nIndex = 0;
IOHIDElementCookie* pCookies = m_hid->GetCookies();
{
if(hidevent.elementCookie == pCookies[nIndex])
break;
-
+
++nIndex;
- }
-
+ }
+
//debugging stuff
#if 0
- if(nIndex == 50)
+ if(nIndex == 50)
{
wxLogSysError(wxString::Format(wxT("wxJoystick Out Of Bounds Error")));
break;
- }
+ }
#endif
- //is the cookie a button?
+ //is the cookie a button?
if (nIndex < 40)
{
if (hidevent.value)
pThis->m_axe[2] = hidevent.value;
}
else
- wxevent.SetEventType(wxEVT_JOY_MOVE);
+ wxevent.SetEventType(wxEVT_JOY_MOVE);
Nanoseconds timestamp = AbsoluteToNanoseconds(hidevent.timestamp);
-
+
wxULongLong llTime(timestamp.hi, timestamp.lo);
-
+
llTime /= 1000000;
-
+
wxevent.SetTimestamp(llTime.GetValue());
wxevent.SetJoystick(pThis->m_joystick);
wxevent.SetButtonState(pThis->m_buttons);
wxevent.SetEventObject(pThis->m_catchwin);
if (pThis->m_catchwin)
- pThis->m_catchwin->AddPendingEvent(wxevent);
+ pThis->m_catchwin->AddPendingEvent(wxevent);
- ret = (*m_hid->GetQueue())->getNextEvent(m_hid->GetQueue(),
+ ret = (*m_hid->GetQueue())->getNextEvent(m_hid->GetQueue(),
&hidevent, bogustime, 0);
}
}
#endif // wxUSE_JOYSTICK && defined(__DARWIN__)
-
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/icon.h"
#include "wx/image.h"
#include "wx/dcmemory.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include "wx/image.h"
#include "wx/xpmdecod.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/module.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include "wx/hashmap.h"
#include "wx/mgl/private.h"
#ifndef WX_PRECOMP
#include "wx/dc.h"
#include "wx/dcmemory.h"
+ #include "wx/log.h"
#endif
#include "wx/fontutil.h"
#include "wx/encinfo.h"
#include "wx/fontmap.h"
#include "wx/mgl/private.h"
-#include "wx/log.h"
#include <string.h>
#include <mgraph.hpp>
#endif
#include "wx/font.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/fontutil.h"
#include "wx/cmndata.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include "wx/gdicmn.h"
#include "wx/tokenzr.h"
#include "wx/settings.h"
old->DecRef();
}
- wxMGLFontInstance *instance =
+ wxMGLFontInstance *instance =
M_FONTDATA->m_library->GetFontInstance(this, scale, antialiased);
return instance->GetMGLfont_t();
#ifndef WX_PRECOMP
#include "wx/hash.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/fontutil.h"
#include "wx/encinfo.h"
#include "wx/fontmap.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/apptrait.h"
-#include "wx/log.h"
#include "wx/process.h"
#include <stdarg.h>
#include "wx/app.h"
#include "wx/panel.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h"
#endif
-#include "wx/log.h"
#include "wx/sysopt.h"
#include "wx/mgl/private.h"
#include "wx/dcscreen.h"
#ifndef WX_PRECOMP
#include "wx/hash.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/utils.h"
#include "wx/module.h"
#include "wx/memory.h"
-#include "wx/log.h"
#include "wx/evtloop.h"
#if wxUSE_THREADS
#include "wx/wxprec.h"
#include "wx/dcclient.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/dcmemory.h"
#include "wx/window.h"
#include "wx/app.h"
#include "wx/image.h"
-#include "wx/log.h"
#include "wx/math.h"
#ifdef __VMS__
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/window.h"
#include "wx/app.h"
#include "wx/gdicmn.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include <X11/Xlib.h>
#endif
#include "wx/frame.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/statusbr.h"
#include "wx/toolbar.h"
#include "wx/menu.h"
#include "wx/settings.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include "wx/app.h"
#include "wx/icon.h"
#if wxUSE_LISTBOX
+#include "wx/listbox.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
+ #include "wx/log.h"
#endif
#ifdef __VMS
#define XtDisplay XTDISPLAY
#endif
-#include "wx/listbox.h"
#include "wx/settings.h"
-#include "wx/log.h"
#include "wx/utils.h"
#include "wx/arrstr.h"
#include "wx/wxprec.h"
#include "wx/menu.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/menuitem.h"
-#include "wx/log.h"
#include "wx/utils.h"
#include "wx/app.h"
#include "wx/frame.h"
#ifndef WX_PRECOMP
#include "wx/hash.h"
+ #include "wx/log.h"
#endif
#include "wx/menu.h"
#include "wx/scrolwin.h"
#include "wx/module.h"
#include "wx/menuitem.h"
-#include "wx/log.h"
#include "wx/evtloop.h"
#if wxUSE_DRAG_AND_DROP
#include "wx/dynarray.h"
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#if wxUSE_GUI
#include "wx/icon.h"
#endif
#endif //WX_PRECOMP
-#include "wx/log.h"
#include "wx/file.h"
#include "wx/confbase.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/apptrait.h"
-#include "wx/log.h"
#include "wx/process.h"
#include "wx/confbase.h" // for wxExpandEnvVars()
#include "wx/app.h"
#include "wx/dcmemory.h"
#include "wx/bitmap.h"
#include "wx/icon.h"
+ #include "wx/log.h"
#endif
#include "wx/msw/private.h"
-#include "wx/log.h"
#if wxUSE_WXDIB
#include "wx/msw/dib.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: clipbrd.cpp
+// Name: src/msw/clipbrd.cpp
// Purpose: Clipboard functionality
// Author: Julian Smart
// Modified by:
#if wxUSE_CLIPBOARD
+#include "wx/clipbrd.h"
+
#ifndef WX_PRECOMP
#include "wx/object.h"
#include "wx/event.h"
#include "wx/bitmap.h"
#include "wx/utils.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#if wxUSE_METAFILE
#include "wx/metafile.h"
#endif
-#include "wx/log.h"
-#include "wx/clipbrd.h"
#include <string.h>
}
#endif // wxUSE_CLIPBOARD
-
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/window.h"
#include "wx/msw/private.h"
#endif
#include "wx/msw/private.h"
-#include "wx/log.h"
#include "wx/evtloop.h"
#include "wx/ptr_scpd.h"
#include "wx/dcmemory.h"
#include "wx/settings.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/msw/private.h"
-#include "wx/log.h"
#include "wx/frame.h"
#include "wx/image.h"
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/dialog.h"
+ #include "wx/log.h"
#endif
#include "wx/fontdlg.h"
#include "wx/msw/wrapcdlg.h"
#include "wx/cmndata.h"
-#include "wx/log.h"
#include "wx/math.h"
#include <stdlib.h>
#include "wx/dcclient.h"
#include "wx/mdi.h"
#include "wx/panel.h"
+ #include "wx/log.h"
#endif // WX_PRECOMP
#include "wx/msw/private.h"
#endif // wxUSE_TOOLBAR
#include "wx/menuitem.h"
-#include "wx/log.h"
#ifdef __WXUNIVERSAL__
#include "wx/univ/theme.h"
#include "wx/string.h"
#include "wx/dcmemory.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#include <stdio.h>
#endif
-#include "wx/log.h"
#include "wx/image.h"
#include "wx/msw/imaglist.h"
#include "wx/event.h"
#include "wx/app.h"
#include "wx/utils.h"
+ #include "wx/log.h"
#endif //WX_PRECOMP
-#include "wx/log.h"
#include "wx/config.h"
#include "wx/file.h"
#include "wx/font.h"
#include "wx/dc.h"
#include "wx/utils.h"
+ #include "wx/log.h"
#endif
#include "wx/window.h"
#include <windowsx.h>
-#include "wx/log.h"
-
#if wxUSE_OWNER_DRAWN
#include "wx/ownerdrw.h"
#endif
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
-//---------------------------------------------------------------------------
-// MediaCtrl include
-//---------------------------------------------------------------------------
+#if wxUSE_MEDIACTRL
+
#include "wx/mediactrl.h"
-//---------------------------------------------------------------------------
-// Compilation guard
-//---------------------------------------------------------------------------
-#if wxUSE_MEDIACTRL
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
-//---------------------------------------------------------------------------
-// WX Includes
-//---------------------------------------------------------------------------
-#include "wx/log.h" // wxLogDebug
#include "wx/math.h" // log10 & pow
#include "wx/msw/private.h" // user info and wndproc setting/getting
#include "wx/dcclient.h"
#include "wx/html/forcelnk.h"
FORCE_LINK_ME(basewxmediabackends)
-//---------------------------------------------------------------------------
-// End wxMediaCtrl Compilation Guard and this file
-//---------------------------------------------------------------------------
#endif //wxUSE_MEDIACTRL
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
// disable "cast truncates constant value" for VARIANT_BOOL values
#pragma warning (disable:4310)
#endif
-//---------------------------------------------------------------------------
-// MediaCtrl include
-//---------------------------------------------------------------------------
+#if wxUSE_MEDIACTRL
+
#include "wx/mediactrl.h"
-//---------------------------------------------------------------------------
-// Compilation guard
-//---------------------------------------------------------------------------
-#if wxUSE_MEDIACTRL
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
-//---------------------------------------------------------------------------
-// WX Includes
-//---------------------------------------------------------------------------
-#include "wx/log.h" // wxLogDebug
#include "wx/math.h" // log10 & pow
#include "wx/msw/private.h" // user info and wndproc setting/getting
#include "wx/dcclient.h"
#include "wx/html/forcelnk.h"
FORCE_LINK_ME(wxmediabackend_am)
-//---------------------------------------------------------------------------
-// End wxMediaCtrl Compilation Guard and this file
-//---------------------------------------------------------------------------
#endif // wxUSE_MEDIACTRL
#pragma hdrstop
#endif
-//---------------------------------------------------------------------------
-// MediaCtrl include
-//---------------------------------------------------------------------------
+#if wxUSE_MEDIACTRL
+
#include "wx/mediactrl.h"
-//---------------------------------------------------------------------------
-// Compilation guard
-//---------------------------------------------------------------------------
-#if wxUSE_MEDIACTRL
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
-//---------------------------------------------------------------------------
-// WX Includes
-//---------------------------------------------------------------------------
-#include "wx/log.h" // wxLogDebug
#include "wx/msw/private.h" // user info and wndproc setting/getting
#include "wx/msw/ole/activex.h" // wxActiveXContainer - COM-specific stuff
#endif // WMP mobile 9 hacks
-//---------------------------------------------------------------------------
-// End wxMediaCtrl Compilation Guard and this file
-//---------------------------------------------------------------------------
#endif // wxUSE_MEDIACTRL
///////////////////////////////////////////////////////////////////////////////
-// Name: menuitem.cpp
+// Name: src/msw/menuitem.cpp
// Purpose: wxMenuItem implementation
// Author: Vadim Zeitlin
// Modified by:
#if wxUSE_MENUS
+#include "wx/menu.h"
+
#ifndef WX_PRECOMP
#include "wx/font.h"
#include "wx/bitmap.h"
#include "wx/font.h"
#include "wx/window.h"
#include "wx/accel.h"
- #include "wx/menu.h"
#include "wx/string.h"
+ #include "wx/log.h"
#endif
#include "wx/menuitem.h"
-#include "wx/log.h"
#if wxUSE_ACCEL
#include "wx/accel.h"
info.cbSize = sizeof(info);
info.fMask = MIIM_TYPE;
info.fType = MFT_STRING;
- info.cch = text.Length();
+ info.cch = text.length();
info.dwTypeData = (LPTSTR) data ;
if ( !::SetMenuItemInfo(hMenu, id, FALSE, & info) )
{
#include "wx/dynarray.h"
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#if wxUSE_GUI
#include "wx/icon.h"
#include "wx/msgdlg.h"
#endif
#endif //WX_PRECOMP
-#include "wx/log.h"
#include "wx/file.h"
#include "wx/iconloc.h"
#include "wx/confbase.h"
#if wxUSE_NOTEBOOK
-// wxWidgets
+#include "wx/notebook.h"
+
#ifndef WX_PRECOMP
- #include "wx/string.h"
- #include "wx/dc.h"
+ #include "wx/string.h"
+ #include "wx/dc.h"
+ #include "wx/log.h"
#endif // WX_PRECOMP
-#include "wx/log.h"
#include "wx/imaglist.h"
#include "wx/event.h"
#include "wx/control.h"
-#include "wx/notebook.h"
#include "wx/app.h"
#include "wx/sysopt.h"
#include "wx/dcclient.h"
style |= wxBORDER_SUNKEN;
#endif
-#if !wxUSE_UXTHEME
+#if !wxUSE_UXTHEME
// ComCtl32 notebook tabs simply don't work unless they're on top if we have uxtheme, we can
// work around it later (after control creation), but if we don't have uxtheme, we have to clear
// those styles
// create backing store
UpdateBgBrush();
}
-
+
// comctl32.dll 6.0 doesn't support non-top tabs with visual styles (the
// control is simply not rendered correctly), so we disable themes
// if possible, otherwise we simply clear the styles.
// It's probably not possible to have UXTHEME without ComCtl32 6 or better, but lets
// check it anyway.
const int verComCtl32 = wxApp::GetComCtl32Version();
- if ( verComCtl32 == 600 )
+ if ( verComCtl32 == 600 )
{
// check if we use themes at all -- if we don't, we're still okay
if ( wxUxThemeEngine::GetIfActive() && (style & (wxBK_BOTTOM|wxBK_LEFT|wxBK_RIGHT)))
HBRUSH hbr = (HBRUSH)m_hbrBackground;
#else
HBRUSH hbr = 0;
-#endif
+#endif
wxBrush brush;
if ( !hbr )
{
#pragma hdrstop
#endif
-#ifndef WX_PRECOMP
- #include "wx/window.h"
-#endif
-
#if wxUSE_OLE && wxUSE_ACCESSIBILITY
-#include "wx/log.h"
#include "wx/access.h"
+#ifndef WX_PRECOMP
+ #include "wx/window.h"
+ #include "wx/log.h"
+#endif
+
#include "wx/msw/wrapwin.h"
// for some compilers, the entire ole2.h must be included, not only oleauto.h
}
-#endif //USE_ACCESSIBILITY
+#endif // wxUSE_OLE && wxUSE_ACCESSIBILITY
// With Borland C++, all samples crash if this is compiled in.
#if wxUSE_OLE && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) && !defined(__CYGWIN10__)
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#define _FORCENAMELESSUNION
-#include "wx/log.h"
#include "wx/msw/private.h"
#include "wx/msw/ole/oleutils.h"
#include "wx/msw/ole/automtn.h"
{
// Use dot notation to get the next object
wxString member2(nonConstMember.Left((size_t) ch));
- wxString rest(nonConstMember.Right(nonConstMember.Length() - ch - 1));
+ wxString rest(nonConstMember.Right(nonConstMember.length() - ch - 1));
wxAutomationObject obj;
if (!GetObject(obj, member2))
return false;
#pragma hdrstop
#endif
+#if wxUSE_OLE && wxUSE_DRAG_AND_DROP
+
#ifndef WX_PRECOMP
#include "wx/window.h"
+ #include "wx/log.h"
#endif
-#if wxUSE_OLE && wxUSE_DRAG_AND_DROP
-
-#include "wx/log.h"
#include "wx/dnd.h"
#include "wx/msw/private.h"
}
}
-#endif //USE_DRAG_AND_DROP
+#endif // wxUSE_OLE && wxUSE_DRAG_AND_DROP
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_OLE && wxUSE_DRAG_AND_DROP
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/msw/private.h"
-#include "wx/log.h"
#ifdef __WXWINCE__
#include <winreg.h>
}
}
-#endif
- // wxUSE_DRAG_AND_DROP
+#endif // wxUSE_OLE && wxUSE_DRAG_AND_DROP
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
-#pragma hdrstop
+ #pragma hdrstop
#endif
-#include "wx/log.h"
-
#if wxUSE_OLE
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#ifndef __CYGWIN10__
#include "wx/msw/private.h"
#include "wx/app.h"
#include "wx/msgdlg.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/msw/printwin.h"
#include "wx/dcprint.h"
#include "wx/printdlg.h"
-#include "wx/log.h"
#include "wx/msw/private.h"
#include <stdlib.h>
///////////////////////////////////////////////////////////////////////////////
-// Name: msw/regconf.cpp
+// Name: src/msw/regconf.cpp
// Purpose:
// Author: Vadim Zeitlin
// Modified by:
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
+#if wxUSE_CONFIG
+
+#include "wx/config.h"
+
#ifndef WX_PRECOMP
- #include "wx/string.h"
- #include "wx/intl.h"
+ #include "wx/string.h"
+ #include "wx/intl.h"
+ #include "wx/log.h"
#endif //WX_PRECOMP
#include "wx/event.h"
#include "wx/app.h"
-#include "wx/log.h"
-
-#if wxUSE_CONFIG
-
-#include "wx/config.h"
#include "wx/msw/registry.h"
#include "wx/msw/regconf.h"
// the convention is to put the programs keys under <vendor>\<appname>
// (but it can be overriden by specifying the pathes explicitly in strLocal
// and/or strGlobal)
- if ( strLocal.IsEmpty() || (strGlobal.IsEmpty() && bDoUseGlobal) )
+ if ( strLocal.empty() || (strGlobal.empty() && bDoUseGlobal) )
{
- if ( vendorName.IsEmpty() )
+ if ( vendorName.empty() )
{
if ( wxTheApp )
strRoot = wxTheApp->GetVendorName();
}
// no '\\' needed if no vendor name
- if ( !strRoot.IsEmpty() )
+ if ( !strRoot.empty() )
{
strRoot += '\\';
}
- if ( appName.IsEmpty() )
+ if ( appName.empty() )
{
wxCHECK_RET( wxTheApp, wxT("No application name in wxRegConfig ctor!") );
strRoot << wxTheApp->GetAppName();
}
//else: we don't need to do all the complicated stuff above
- wxString str = strLocal.IsEmpty() ? strRoot : strLocal;
+ wxString str = strLocal.empty() ? strRoot : strLocal;
// as we're going to change the name of these keys fairly often and as
// there are only few of wxRegConfig objects (usually 1), we can allow
if ( bDoUseGlobal )
{
- str = strGlobal.IsEmpty() ? strRoot : strGlobal;
+ str = strGlobal.empty() ? strRoot : strGlobal;
m_keyGlobalRoot.ReserveMemoryForName(MEMORY_PREALLOC);
m_keyGlobal.ReserveMemoryForName(MEMORY_PREALLOC);
// because GetPath() returns "" when we're at root, we must understand
// empty string as "/"
- if ( strPath.IsEmpty() || (strPath[0] == wxCONFIG_PATH_SEPARATOR) ) {
+ if ( strPath.empty() || (strPath[0] == wxCONFIG_PATH_SEPARATOR) ) {
// absolute path
wxSplitPath(aParts, strPath);
}
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/file.h"
#include "wx/wfstream.h"
#include "wx/settings.h"
#include "wx/dcclient.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
-
#include "wx/msw/private.h"
#include <windowsx.h>
#if wxUSE_TREECTRL
+#include "wx/treectrl.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
+ #include "wx/log.h"
#endif
#include "wx/msw/private.h"
#define wxUSE_COMCTL32_SAFELY 0
#include "wx/app.h"
-#include "wx/log.h"
#include "wx/imaglist.h"
#include "wx/settings.h"
-#include "wx/treectrl.h"
#include "wx/msw/dragimag.h"
// macros to hide the cast ugliness
#pragma hdrstop
#endif
+#include "wx/window.h"
+
#ifndef WX_PRECOMP
#include "wx/msw/wrapwin.h"
- #include "wx/window.h"
#include "wx/accel.h"
#include "wx/menu.h"
#include "wx/dc.h"
#include "wx/statbox.h"
#include "wx/sizer.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#if wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
#endif
#include "wx/menuitem.h"
-#include "wx/log.h"
#include "wx/msw/private.h"
#include "wx/spinctrl.h"
#endif // wxUSE_SPINCTRL
-#include "wx/log.h"
-
#include "wx/textctrl.h"
#include "wx/notebook.h"
#include "wx/listctrl.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#include "wx/app.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/frame.h"
- #include "wx/app.h"
#include "wx/utils.h"
#include "wx/gdicmn.h"
#include "wx/pen.h"
#include "wx/icon.h"
#include "wx/stdpaths.h"
#include "wx/filename.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/module.h"
#include "wx/os2/private.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#include "wx/bitmap.h"
+
#ifndef WX_PRECOMP
#include <stdio.h>
#include "wx/app.h"
#include "wx/palette.h"
#include "wx/dcmemory.h"
- #include "wx/bitmap.h"
#include "wx/icon.h"
+ #include "wx/log.h"
#endif
#include "wx/os2/private.h"
-#include "wx/log.h"
#include "wx/image.h"
#include "wx/xpmdecod.h"
#if wxUSE_CHECKLISTBOX && wxUSE_OWNER_DRAWN
+#include "wx/checklst.h"
+
#ifndef WX_PRECOMP
#include "wx/object.h"
+ #include "wx/log.h"
#endif
#include "wx/colour.h"
#include "wx/settings.h"
#include "wx/dcmemory.h"
#include "wx/dcscreen.h"
-#include "wx/checklst.h"
-#include "wx/log.h"
#define INCL_PM
#include <os2.h>
#if wxUSE_CLIPBOARD
+#include "wx/clipbrd.h"
+
#ifndef WX_PRECOMP
#include "wx/object.h"
#include "wx/event.h"
#include "wx/bitmap.h"
#include "wx/utils.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#if wxUSE_METAFILE
#include "wx/metafile.h"
#endif
-#include "wx/log.h"
-#include "wx/clipbrd.h"
-
#include <string.h>
#include "wx/os2/private.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/window.h"
#include "wx/app.h"
#include "wx/app.h"
#include "wx/math.h"
#include "wx/string.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/window.h"
#include "wx/os2/private.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#ifndef WX_PRECOMP
#include "wx/dialog.h"
-#include "wx/utils.h"
-#include "wx/frame.h"
-#include "wx/app.h"
-#include "wx/settings.h"
-#include "wx/intl.h"
-#include "wx/log.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+ #include "wx/frame.h"
+ #include "wx/app.h"
+ #include "wx/settings.h"
+ #include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/os2/private.h"
-#include "wx/log.h"
#include "wx/evtloop.h"
#include "wx/ptr_scpd.h"
///////////////////////////////////////////////////////////////////////////////
-// Name: os2/evtloop.cpp
+// Name: src/os2/evtloop.cpp
// Purpose: implements wxEventLoop for PM
// Author: Vadim Zeitlin
// Modified by:
#include "wx/window.h"
#include "wx/app.h"
#include "wx/timer.h"
+ #include "wx/log.h"
#endif //WX_PRECOMP
#include "wx/evtloop.h"
-#include "wx/log.h"
#include "wx/tooltip.h"
#include "wx/ptr_scpd.h"
{
if((bRc = pWnd->OS2TranslateMessage((WXMSG*)pMsg)) == TRUE)
break;
- // stop at first top level window, i.e. don't try to process the
- // key strokes originating in a dialog using the accelerators of
- // the parent frame - this doesn't make much sense
- if ( pWnd->IsTopLevel() )
- break;
+ // stop at first top level window, i.e. don't try to process the
+ // key strokes originating in a dialog using the accelerators of
+ // the parent frame - this doesn't make much sense
+ if ( pWnd->IsTopLevel() )
+ break;
}
if(!bRc) // untranslated, should restore original value
// generate and process idle events for as long as we don't have
// anything else to do
while ( !Pending() && m_impl->SendIdleMessage() )
- {
- wxTheApp->HandleSockets();
- wxMilliSleep(10);
- }
+ {
+ wxTheApp->HandleSockets();
+ wxMilliSleep(10);
+ }
wxTheApp->HandleSockets();
if (Pending())
- {
- if ( !Dispatch() )
- {
- // we got WM_QUIT
- break;
- }
- }
+ {
+ if ( !Dispatch() )
+ {
+ // we got WM_QUIT
+ break;
+ }
+ }
else
wxMilliSleep(10);
}
bool wxEventLoop::Dispatch()
{
- wxCHECK_MSG( IsRunning(), FALSE, _T("can't call Dispatch() if not running") );
+ wxCHECK_MSG( IsRunning(), false, _T("can't call Dispatch() if not running") );
QMSG msg;
BOOL bRc = ::WinGetMsg(vHabmain, &msg, (HWND) NULL, 0, 0);
if ( bRc == 0 )
{
// got WM_QUIT
- return FALSE;
+ return false;
}
#if wxUSE_THREADS
wxASSERT_MSG( wxThread::IsMain(),
wxT("only the main thread can process Windows messages") );
- static bool s_hadGuiLock = TRUE;
+ static bool s_hadGuiLock = true;
static wxMsgArray s_aSavedMessages;
// if a secondary thread owning the mutex is doing GUI calls, save all
// it will lead to recursive library calls (and we're not reentrant)
if ( !wxGuiOwnedByMainThread() )
{
- s_hadGuiLock = FALSE;
+ s_hadGuiLock = false;
// leave out WM_COMMAND messages: too dangerous, sometimes
// the message will be processed twice
s_aSavedMessages.Add(msg);
}
- return TRUE;
+ return true;
}
else
{
// messages normally - expect some things to break...
if ( !s_hadGuiLock )
{
- s_hadGuiLock = TRUE;
+ s_hadGuiLock = true;
size_t count = s_aSavedMessages.Count();
for ( size_t n = 0; n < count; n++ )
m_impl->ProcessMessage(&msg);
- return TRUE;
+ return true;
}
-
#endif // wxUSE_TOOLBAR
#include "wx/menuitem.h"
-#include "wx/log.h"
// ----------------------------------------------------------------------------
// globals
#include "wx/event.h"
#include "wx/app.h"
#include "wx/utils.h"
+ #include "wx/log.h"
#endif //WX_PRECOMP
-#include "wx/log.h"
-
#include "wx/config.h"
#include "wx/os2/iniconf.h"
#if wxUSE_LISTBOX
+#include "wx/listbox.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
- #include "wx/listbox.h"
#include "wx/settings.h"
#include "wx/brush.h"
#include "wx/font.h"
#include "wx/dcscreen.h"
#include "wx/utils.h"
#include "wx/scrolwin.h"
+ #include "wx/log.h"
#endif
#include "wx/window.h"
#define INCL_M
#include <os2.h>
-#include "wx/log.h"
-
#if wxUSE_OWNER_DRAWN
#include "wx/ownerdrw.h"
#endif
///////////////////////////////////////////////////////////////////////////////
-// Name: menuitem.cpp
+// Name: src/os2/menuitem.cpp
// Purpose: wxMenuItem implementation
// Author: David Webster
// Modified by:
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#include "wx/menuitem.h"
+
#ifndef WX_PRECOMP
#include "wx/font.h"
#include "wx/bitmap.h"
#include "wx/accel.h"
#include "wx/menu.h"
#include "wx/string.h"
+ #include "wx/log.h"
#endif
-#include "wx/menuitem.h"
-#include "wx/log.h"
-
#if wxUSE_ACCEL
#include "wx/accel.h"
#endif // wxUSE_ACCEL
#include "wx/dynarray.h"
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#if wxUSE_GUI
#include "wx/icon.h"
#endif
#define INCL_WIN
#include <os2.h>
-#include "wx/log.h"
#include "wx/file.h"
#include "wx/iconloc.h"
#include "wx/confbase.h"
#if wxUSE_NOTEBOOK
+#include "wx/notebook.h"
+
// wxWidgets
#ifndef WX_PRECOMP
- #include "wx/app.h"
- #include "wx/dcclient.h"
- #include "wx/string.h"
- #include "wx/settings.h"
+ #include "wx/app.h"
+ #include "wx/dcclient.h"
+ #include "wx/string.h"
+ #include "wx/settings.h"
+ #include "wx/log.h"
#endif // WX_PRECOMP
-#include "wx/log.h"
#include "wx/imaglist.h"
#include "wx/event.h"
#include "wx/control.h"
-#include "wx/notebook.h"
#include "wx/os2/private.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: msw/statline.cpp
+// Name: src/os2/statline.cpp
// Purpose: OS2 version of wxStaticLine class
// Author: David Webster
// Created: 10/23/99
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_STATLINE
+
#include "wx/statline.h"
-#if wxUSE_STATLINE
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
#include "wx/os2/private.h"
-#include "wx/log.h"
// ============================================================================
// implementation
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif //WX_PRECOMP
#include "wx/app.h"
#include "wx/apptrait.h"
#include "wx/module.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include <stdio.h>
#include "wx/event.h"
#include "wx/app.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/os2/private.h"
-#include "wx/log.h"
#include "wx/timer.h"
#if wxUSE_TREECTRL
+#include "wx/treectrl.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
+ #include "wx/log.h"
#endif
#include "wx/os2/private.h"
#include "wx/app.h"
-#include "wx/log.h"
#include "wx/imaglist.h"
#include "wx/settings.h"
-#include "wx/os2/treectrl.h"
// a macro to hide the ugliness of nested casts
#define HITEM(item) (HTREEITEM)(WXHTREEITEM)(item)
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#include "wx/utils.h"
+
#ifndef WX_PRECOMP
- #include "wx/utils.h"
#include "wx/app.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif //WX_PRECOMP
#include "wx/os2/private.h"
#include <dirent.h>
#endif
-#include "wx/log.h"
#include <io.h>
//
// Execute a program in an Interactive Shell
//
-bool wxShell(
- const wxString& rCommand
-)
+bool wxShell( const wxString& rCommand )
{
- wxChar* zShell = _T("CMD.EXE");
- wxString sInputs;
- STARTDATA SData = {0};
- PSZ PgmTitle = "Command Shell";
- APIRET rc;
- PID vPid = 0;
- ULONG ulSessID = 0;
- UCHAR achObjBuf[256] = {0}; //error data if DosStart fails
- RESULTCODES vResult;
+ wxChar* zShell = _T("CMD.EXE");
+ wxString sInputs;
+ STARTDATA SData = {0};
+ PSZ PgmTitle = "Command Shell";
+ APIRET rc;
+ PID vPid = 0;
+ ULONG ulSessID = 0;
+ UCHAR achObjBuf[256] = {0}; //error data if DosStart fails
+ RESULTCODES vResult;
SData.Length = sizeof(STARTDATA);
SData.Related = SSF_RELATED_INDEPENDENT;
#include "wx/utils.h"
#include "wx/app.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
-
#include "wx/process.h"
#include "wx/os2/private.h"
//
#include "wx/wxprec.h"
+#include "wx/window.h"
+
#ifndef WX_PRECOMP
#define INCL_DOS
#define INCL_PM
#include <os2.h>
- #include "wx/window.h"
#include "wx/accel.h"
#include "wx/menu.h"
#include "wx/dc.h"
#include "wx/toolbar.h"
#include "wx/settings.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#include <stdio.h>
#endif
#endif
#include "wx/menuitem.h"
-#include "wx/log.h"
#include "wx/os2/private.h"
#include "wx/caret.h"
#endif // wxUSE_CARET
-#include "wx/log.h"
-
#include "wx/textctrl.h"
#pragma hdrstop
#endif
+#include "wx/bitmap.h"
+
#ifndef WX_PRECOMP
#include <stdio.h>
#include "wx/app.h"
#include "wx/palette.h"
#include "wx/dcmemory.h"
- #include "wx/bitmap.h"
#include "wx/icon.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
-
#if wxUSE_WXDIB
#include "wx/palmos/dib.h"
#endif
#if wxUSE_CLIPBOARD
+#include "wx/clipbrd.h"
+
#ifndef WX_PRECOMP
#include "wx/object.h"
#include "wx/event.h"
#include "wx/bitmap.h"
#include "wx/utils.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#if wxUSE_METAFILE
#include "wx/metafile.h"
#endif
-#include "wx/log.h"
-#include "wx/clipbrd.h"
-
#include <string.h>
#include "wx/palmos/private.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/window.h"
// ----------------------------------------------------------------------------
#pragma hdrstop
#endif
+#include "wx/dialog.h"
+
#ifndef WX_PRECOMP
- #include "wx/dialog.h"
#include "wx/utils.h"
#include "wx/frame.h"
#include "wx/app.h"
#include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/evtloop.h"
#include "wx/ptr_scpd.h"
#include "wx/dcmemory.h"
#include "wx/settings.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/frame.h"
#include "wx/image.h"
#if wxUSE_FONTDLG
+#include "wx/fontdlg.h"
+
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/math.h"
+ #include "wx/log.h"
#endif
-#include "wx/fontdlg.h"
#include "wx/palmos/private.h"
#include "wx/cmndata.h"
-#include "wx/log.h"
#include <stdlib.h>
#include <string.h>
#pragma hdrstop
#endif
+#include "wx/frame.h"
+
#ifndef WX_PRECOMP
- #include "wx/frame.h"
#include "wx/app.h"
#include "wx/menu.h"
#include "wx/utils.h"
#include "wx/dcclient.h"
#include "wx/mdi.h"
#include "wx/panel.h"
+ #include "wx/log.h"
#endif // WX_PRECOMP
#if wxUSE_STATUSBAR
#endif // wxUSE_TOOLBAR
#include "wx/menuitem.h"
-#include "wx/log.h"
#ifdef __WXUNIVERSAL__
#include "wx/univ/theme.h"
#include "wx/string.h"
#include "wx/dcmemory.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
-
#include "wx/palmos/imaglist.h"
#include "wx/palmos/private.h"
#if wxUSE_LISTBOX
+#include "wx/listbox.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
- #include "wx/listbox.h"
#include "wx/settings.h"
#include "wx/brush.h"
#include "wx/font.h"
#include "wx/dc.h"
#include "wx/utils.h"
+ #include "wx/log.h"
#endif
#include "wx/window.h"
#include "wx/palmos/private.h"
-#include "wx/log.h"
-
#if wxUSE_OWNER_DRAWN
#include "wx/ownerdrw.h"
#endif
#if wxUSE_MENUS
+#include "wx/menu.h"
+
#ifndef WX_PRECOMP
#include "wx/font.h"
#include "wx/bitmap.h"
#include "wx/font.h"
#include "wx/window.h"
#include "wx/accel.h"
- #include "wx/menu.h"
#include "wx/string.h"
+ #include "wx/log.h"
#endif
#include "wx/menuitem.h"
-#include "wx/log.h"
#if wxUSE_ACCEL
#include "wx/accel.h"
#include "wx/app.h"
#include "wx/msgdlg.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/palmos/printpalm.h"
#include "wx/dcprint.h"
#include "wx/printdlg.h"
-#include "wx/log.h"
#include "wx/palmos/private.h"
// ---------------------------------------------------------------------------
#include "wx/settings.h"
#include "wx/dcclient.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
-
#include <StatusBar.h>
// ----------------------------------------------------------------------------
#pragma hdrstop
#endif
+#if wxUSE_STATLINE
+
#include "wx/statline.h"
-#if wxUSE_STATLINE
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
#include "wx/palmos/private.h"
-#include "wx/log.h"
#ifndef SS_SUNKEN
#define SS_SUNKEN 0x00001000L
}
#endif // wxUSE_STATLINE
-
#if wxUSE_TREECTRL
+#include "wx/treectrl.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
+ #include "wx/log.h"
#endif
#include "wx/palmos/private.h"
#include "wx/app.h"
-#include "wx/log.h"
#include "wx/imaglist.h"
#include "wx/settings.h"
#pragma hdrstop
#endif
+#include "wx/window.h"
+
#ifndef WX_PRECOMP
- #include "wx/window.h"
#include "wx/accel.h"
#include "wx/menu.h"
#include "wx/dc.h"
#include "wx/settings.h"
#include "wx/statbox.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#if wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
#endif
#include "wx/menuitem.h"
-#include "wx/log.h"
#if wxUSE_TOOLTIPS
#include "wx/tooltip.h"
#include "wx/spinctrl.h"
#endif // wxUSE_SPINCTRL
-#include "wx/log.h"
-
#include "wx/textctrl.h"
#include "wx/notebook.h"
#include "wx/listctrl.h"
///////////////////////////////////////////////////////////////////////////////
-// Name: univ/ctrlrend.cpp
+// Name: src/univ/ctrlrend.cpp
// Purpose: wxControlRenderer implementation
// Author: Vadim Zeitlin
// Modified by:
#include "wx/listbox.h"
#include "wx/scrolbar.h"
#include "wx/dc.h"
+ #include "wx/log.h"
#endif // WX_PRECOMP
#include "wx/image.h"
-#include "wx/log.h"
#include "wx/univ/theme.h"
#include "wx/univ/renderer.h"
#include "wx/univ/colschem.h"
#if wxUSE_GAUGE
-#include "wx/gauge.h"
+ #include "wx/gauge.h"
#endif
// ============================================================================
#if wxUSE_SCROLLBAR
+#include "wx/scrolbar.h"
+
#ifndef WX_PRECOMP
#include "wx/timer.h"
-
#include "wx/dcclient.h"
- #include "wx/scrolbar.h"
#include "wx/validate.h"
+ #include "wx/log.h"
#endif
#include "wx/univ/scrtimer.h"
#include "wx/univ/renderer.h"
#include "wx/univ/inphand.h"
#include "wx/univ/theme.h"
-#include "wx/log.h"
#define WXDEBUG_SCROLLBAR
#if wxUSE_TOOLBAR
+#include "wx/toolbar.h"
+
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/app.h"
+ #include "wx/log.h"
#endif
#include "wx/univ/renderer.h"
#include "wx/frame.h"
-#include "wx/toolbar.h"
#include "wx/image.h"
-#include "wx/log.h"
// ----------------------------------------------------------------------------
// constants
PerformAction( wxACTION_BUTTON_RELEASE, numArg );
PerformAction( wxACTION_BUTTON_CLICK, numArg );
-
- // Write by Danny Raynor to change state again.
+
+ // Write by Danny Raynor to change state again.
// Check button still pressed or not
if( tool->IsInverted() )
- {
- PerformAction( wxACTION_TOOLBAR_RELEASE, numArg );
+ {
+ PerformAction( wxACTION_TOOLBAR_RELEASE, numArg );
}
-
+
// Set mouse leave toolbar button range (If still in the range,
// toolbar button would get focus again
PerformAction( wxACTION_TOOLBAR_LEAVE, numArg );
}
#endif // wxUSE_TOOLBAR
-
///////////////////////////////////////////////////////////////////////////////
-// Name: univ/window.cpp
+// Name: src/univ/window.cpp
// Purpose: implementation of extra wxWindow methods for wxUniv port
// Author: Vadim Zeitlin
// Modified by:
#pragma hdrstop
#endif
+#include "wx/window.h"
+
#ifndef WX_PRECOMP
#include "wx/app.h"
- #include "wx/window.h"
#include "wx/dcclient.h"
#include "wx/dcmemory.h"
#include "wx/event.h"
#include "wx/scrolbar.h"
#include "wx/menu.h"
#include "wx/frame.h"
+ #include "wx/log.h"
#endif // WX_PRECOMP
-#include "wx/log.h"
#include "wx/univ/colschem.h"
#include "wx/univ/renderer.h"
#include "wx/univ/theme.h"
}
#endif // __WXMSW__
-
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif // !PCH
#include "wx/event.h"
#include "wx/timer.h"
#include "wx/filefn.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include "wx/ffile.h"
#include "wx/process.h"
#include "wx/app.h"
#include "wx/string.h"
#include "wx/utils.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif /* WX_PRECOMP */
#include "wx/display_impl.h"
-#include "wx/log.h"
/* These must be included after the wx files. Otherwise the Data macro in
* Xlibint.h conflicts with a function declaration in wx/list.h. */
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/mediactrl.h"
-
#if wxUSE_MEDIACTRL
+#include "wx/mediactrl.h"
+
#if wxUSE_GSTREAMER
#include <gst/gst.h> // main gstreamer header
# include <gst/gconf/gconf.h> // gstreamer glib configuration
#endif
-#include "wx/log.h" // wxLogDebug/wxLogSysError/wxLogTrace
+#ifndef WX_PRECOMP
+ #include "wx/log.h" // wxLogDebug/wxLogSysError/wxLogTrace
+#endif
+
#include "wx/app.h" // wxTheApp->argc, wxTheApp->argv
#include "wx/thread.h" // wxMutex/wxMutexLocker
#include "wx/timer.h" // wxTimer
if(error)
{
wxLogSysError(wxT("Could not initialize GStreamer\n")
- wxT("Error Message:%s"),
+ wxT("Error Message:%s"),
(const wxChar*) wxConvUTF8.cMB2WX(error->message)
);
g_error_free(error);
#ifdef __WXGTK__
// We handle our own GTK expose events
- m_ctrl->m_noExpose = TRUE;
+ m_ctrl->m_noExpose = true;
#endif
if( !m_ctrl->wxControl::Create(parent, id, pos, size,
//Workaround GstURI leading "//" problem and make sure it leads
//with that
- return DoLoad(wxString(wxT("file://")) +
- uristring.Right(uristring.Length() - 5)
+ return DoLoad(wxString(wxT("file://")) +
+ uristring.Right(uristring.length() - 5)
);
}
- else
+ else
return DoLoad(location.BuildURI());
}
// NB: whether we have paused or not and keep track of the time after the
// NB: pause and whenever the user seeks while paused
// NB:
-//
+//
// THREAD-UNSAFE, at least if not paused. Requires media to be at least paused.
//-----------------------------------------------------------------------------
wxLongLong wxGStreamerMediaBackend::GetPosition()
#include "wx/dynarray.h"
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/file.h"
#include "wx/confbase.h"
#include "wx/wxprec.h"
#include "wx/taskbar.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/frame.h"
#include "wx/bitmap.h"
#include "wx/statbmp.h"
#include "wx/sizer.h"
#include "wx/dcclient.h"
-#include "wx/log.h"
#include "wx/image.h"
#ifdef __VMS
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/module.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include "wx/timer.h"
#include "wx/stopwatch.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
-#include "wx/log.h"
#include "wx/app.h"
#include "wx/apptrait.h"
#include "wx/wxprec.h"
#include "wx/unix/utilsx11.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/iconbndl.h"
#include "wx/image.h"
#include "wx/icon.h"
-#include "wx/log.h"
#ifdef __VMS
#pragma message disable nosimpint
#ifndef WX_PRECOMP
#include "wx/hash.h"
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/frame.h"
#include "wx/gdicmn.h"
#include "wx/icon.h"
#include "wx/dialog.h"
-#include "wx/log.h"
#include "wx/module.h"
#include "wx/memory.h"
-#include "wx/log.h"
#include "wx/evtloop.h"
#include "wx/timer.h"
#include "wx/filename.h"
#include "wx/wxprec.h"
#include "wx/bitmap.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/icon.h"
-#include "wx/log.h"
#include "wx/image.h"
#include "wx/app.h"
#if wxUSE_NANOX
/////////////////////////////////////////////////////////////////////////////
-// Name: clipbrd.cpp
+// Name: src/x11/clipbrd.cpp
// Purpose: Clipboard functionality
// Author: Robert Roebling
-// Created:
+// Created:
// RCS-ID: $Id$
// Copyright: (c) Robert Roebling
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#include "wx/clipbrd.h"
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
#if wxUSE_CLIPBOARD
+#include "wx/clipbrd.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/dataobj.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include "wx/x11/private.h"
if (format == clipboard->m_targetRequested)
{
clipboard->m_waiting = FALSE;
- clipboard->m_formatSupported = TRUE;
+ clipboard->m_formatSupported = true;
return;
}
}
data_object->SetData( format, (size_t) selection_data->length, (const char*) selection_data->data );
- wxTheClipboard->m_formatSupported = TRUE;
+ wxTheClipboard->m_formatSupported = true;
clipboard->m_waiting = FALSE;
}
if (!g_clipboardAtom) g_clipboardAtom = XInternAtom( (Display*) wxGetDisplay(), "CLIPBOARD", False );
if (!g_targetsAtom) g_targetsAtom = XInternAtom( (Display*) wxGetDisplay(), "TARGETS", False );
#endif
-
+
m_formatSupported = FALSE;
m_targetRequested = 0;
#if 0
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 )
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;
format.GetId().c_str() );
#endif
- 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;
#if 0
gtk_selection_convert( m_targetsWidget,
while (m_waiting) gtk_main_iteration();
#endif
- if (!m_formatSupported) return FALSE;
+ if (!m_formatSupported) return false;
- return TRUE;
+ return true;
}
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 */
- m_waiting = TRUE;
+ m_waiting = true;
#if 0
gtk_selection_convert( m_targetsWidget,
/* 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") );
/* return success */
delete[] array;
- return TRUE;
+ return true;
}
wxLogTrace( TRACE_CLIPBOARD,
/* return failure */
delete[] array;
- return FALSE;
+ return false;
}
#endif
// wxUSE_CLIPBOARD
-
#if wxUSE_DATAOBJ
#include "wx/dataobj.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/mstream.h"
#include "wx/app.h"
#include "wx/image.h"
-#include "wx/log.h"
#include "wx/utils.h"
#include "wx/x11/private.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/window.h"
#include "wx/app.h"
#include "wx/gdicmn.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include <X11/Xlib.h>
#if wxUSE_GLCANVAS
#include "wx/glcanvas.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/utils.h"
#include "wx/app.h"
-#include "wx/log.h"
#ifdef __VMS
# pragma message disable nosimpint
#if wxUSE_POPUPWIN
-#include "wx/log.h"
-
#include "wx/popupwin.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/app.h"
#include "wx/settings.h"
#include "wx/wxprec.h"
#include "wx/region.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/gdicmn.h"
-#include "wx/log.h"
#ifdef __VMS__
#pragma message disable nosimpint
#if !wxUSE_NANOX
#include "wx/x11/reparent.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/evtloop.h"
-#include "wx/log.h"
#include "wx/app.h"
#include "wx/timer.h"
} return (WXWindow) result;
}
-#endif
+#endif // !wxUSE_NANOX
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/utils.h"
-#include "wx/log.h"
#include "wx/settings.h"
#include "wx/panel.h"
#include "wx/clipbrd.h"
#pragma hdrstop
#endif
-#ifndef WX_PRECOMP
- #include "wx/hash.h"
-#endif
-
// ============================================================================
// declarations
// ============================================================================
// headers
// ----------------------------------------------------------------------------
+#include "wx/window.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/hash.h"
+ #include "wx/log.h"
+#endif
+
#include "wx/menu.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
#include "wx/scrolbar.h"
#include "wx/module.h"
#include "wx/menuitem.h"
-#include "wx/log.h"
#include "wx/fontutil.h"
#include "wx/univ/renderer.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/wfstream.h"
#include "wx/datstrm.h"
#include "wx/zstream.h"
-#include "wx/log.h"
#include "wx/strconv.h"
#include "expat.h" // from Expat
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/checklst.h"
-#include "wx/log.h"
IMPLEMENT_DYNAMIC_CLASS(wxCheckListBoxXmlHandler, wxXmlResourceHandler)
#include "wx/xrc/xh_choicbk.h"
-#include "wx/log.h"
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/choicebk.h"
#include "wx/imaglist.h"
#include "wx/sizer.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/dialog.h"
#include "wx/frame.h"
-#include "wx/log.h"
IMPLEMENT_DYNAMIC_CLASS(wxDialogXmlHandler, wxXmlResourceHandler)
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/frame.h"
#include "wx/dialog.h" // to get wxDEFAULT_DIALOG_STYLE
-#include "wx/log.h"
IMPLEMENT_DYNAMIC_CLASS(wxFrameXmlHandler, wxXmlResourceHandler)
#include "wx/xrc/xh_listbk.h"
-#include "wx/log.h"
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/listbook.h"
#include "wx/imaglist.h"
#include "wx/sizer.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#include "wx/mdi.h"
#include "wx/dialog.h" // to get wxDEFAULT_DIALOG_STYLE
-#include "wx/log.h"
IMPLEMENT_DYNAMIC_CLASS(wxMdiXmlHandler, wxXmlResourceHandler)
#include "wx/xrc/xh_notbk.h"
-#include "wx/log.h"
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/notebook.h"
#include "wx/imaglist.h"
#include "wx/sizer.h"
#if wxUSE_XRC
#include "wx/xrc/xh_sizer.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/sizer.h"
#include "wx/gbsizer.h"
-#include "wx/log.h"
#include "wx/statbox.h"
#include "wx/notebook.h"
#include "wx/panel.h"
#if wxUSE_XRC
#include "wx/xrc/xh_split.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/splitter.h"
-#include "wx/log.h"
IMPLEMENT_DYNAMIC_CLASS(wxSplitterWindowXmlHandler, wxXmlResourceHandler)
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/log.h"
#endif
#include "wx/frame.h"
-#include "wx/log.h"
-
#include "wx/statusbr.h"
IMPLEMENT_DYNAMIC_CLASS(wxStatusBarXmlHandler, wxXmlResourceHandler)
#include "wx/xrc/xh_treebk.h"
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/treebook.h"
#include "wx/imaglist.h"
-#include "wx/log.h"
IMPLEMENT_DYNAMIC_CLASS(wxTreebookXmlHandler, wxXmlResourceHandler)
/////////////////////////////////////////////////////////////////////////////
-// Name: xh_unkwn.cpp
+// Name: src/xrc/xh_unkwn.cpp
// Purpose: XRC resource for unknown widget
// Author: Vaclav Slavik
// Created: 2000/09/09
#if wxUSE_XRC
#include "wx/xrc/xh_unkwn.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/window.h"
-#include "wx/log.h"
#include "wx/sizer.h"
#include "wx/panel.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: xh_wizrd.cpp
+// Name: src/xrc/xh_wizrd.cpp
// Purpose: XRC resource for wxWizard
// Author: Vaclav Slavik
// Created: 2003/03/01
#if wxUSE_XRC && wxUSE_WIZARDDLG
#include "wx/xrc/xh_wizrd.h"
-#include "wx/log.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+
#include "wx/wizard.h"
IMPLEMENT_DYNAMIC_CLASS(wxWizardXmlHandler, wxXmlResourceHandler)
#ifndef WX_PRECOMP
#include "wx/intl.h"
+ #include "wx/log.h"
#endif
#ifndef __WXWINCE__
#include "wx/wfstream.h"
#include "wx/filesys.h"
#include "wx/filename.h"
-#include "wx/log.h"
#include "wx/tokenzr.h"
#include "wx/fontenum.h"
#include "wx/module.h"