///////////////////////////////////////////////////////////////////////////////
-// Name: config.cpp
+// Name: src/common/config.cpp
// Purpose: implementation of wxConfigBase class
// Author: Vadim Zeitlin
// Modified by:
#include "wx/wxprec.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
+#ifdef __BORLANDC__
+ #pragma hdrstop
#endif //__BORLANDC__
#ifndef wxUSE_CONFIG_NATIVE
#endif
#include "wx/config.h"
-#include "wx/intl.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif //WX_PRECOMP
+
#include "wx/log.h"
#include "wx/arrstr.h"
pc++;
}
}
-
-
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/log.h"
+ #include "wx/intl.h"
#endif // WX_PRECOMP
-#include "wx/intl.h"
#include "wx/thread.h"
#include "wx/tokenzr.h"
#include "wx/module.h"
{
nLostWeekDays += year++ % 4 ? 1 : 2;
}
-
- // Keep year below 2000 so the 2digit year number
- // can never match the month or day of the month
- if (year>=2000) year-=28;
+
+ // Keep year below 2000 so the 2digit year number
+ // can never match the month or day of the month
+ if (year>=2000) year-=28;
// at any rate, we couldn't go further than 1988 + 9 + 28!
wxASSERT_MSG( year < 2030,
_T("logic error in wxDateTime::Format") );
- wxString strYear, strYear2;
+ wxString strYear, strYear2;
strYear.Printf(_T("%d"), year);
strYear2.Printf(_T("%d"), year % 100);
-
+
// find four strings not occurring in format (this is surely
// not the optimal way of doing it... improvements welcome!)
wxString fmt2 = format;
- wxString replacement,replacement2,replacement3,replacement4;
- for (int rnr=1; rnr<5 ; rnr++) {
- wxString r = (wxChar)-rnr;
- while ( fmt2.Find(r) != wxNOT_FOUND )
- {
- r << (wxChar)-rnr;
- }
-
- switch (rnr) {
- case 1: replacement=r; break;
- case 2: replacement2=r; break;
- case 3: replacement3=r; break;
- case 4: replacement4=r; break;
- }
- }
+ wxString replacement,replacement2,replacement3,replacement4;
+ for (int rnr=1; rnr<5 ; rnr++)
+ {
+ wxString r = (wxChar)-rnr;
+ while ( fmt2.Find(r) != wxNOT_FOUND )
+ {
+ r << (wxChar)-rnr;
+ }
+
+ switch (rnr)
+ {
+ case 1: replacement=r; break;
+ case 2: replacement2=r; break;
+ case 3: replacement3=r; break;
+ case 4: replacement4=r; break;
+ }
+ }
// replace all occurrences of year with it
bool wasReplaced = fmt2.Replace(strYear, replacement) > 0;
// evaluation order ensures we always attempt the replacement.
- wasReplaced = (fmt2.Replace(strYear2, replacement2) > 0) | wasReplaced ;
+ wasReplaced = (fmt2.Replace(strYear2, replacement2) > 0) | wasReplaced ;
// use strftime() to format the same date but in supported
// year
&tmAdjusted);
// now replace the occurrence of 1999 with the real year
- // we do this in two stages to stop the 2 digit year
- // matching any substring of the 4 digit year.
- // Any day,month hours and minutes components should be safe due
- // to ensuring the range of the years.
+ // we do this in two stages to stop the 2 digit year
+ // matching any substring of the 4 digit year.
+ // Any day,month hours and minutes components should be safe due
+ // to ensuring the range of the years.
wxString strYearReal, strYearReal2;
strYearReal.Printf(_T("%04d"), yearReal);
strYearReal2.Printf(_T("%02d"), yearReal % 100);
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
+ #include "wx/intl.h"
#endif //WX_PRECOMP
-#include "wx/intl.h"
-
#include <stdlib.h>
#include <string.h> // for memmove
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_IMAGE && wxUSE_LIBJPEG
+#include "wx/imagjpeg.h"
+
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/intl.h"
#endif
-#include "wx/imagjpeg.h"
#include "wx/bitmap.h"
#include "wx/debug.h"
#include "wx/filefn.h"
#include "wx/wfstream.h"
-#include "wx/intl.h"
#include "wx/module.h"
// For memcpy
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
+ #pragma hdrstop
#endif
#if wxUSE_IMAGE && wxUSE_PNM
#include "wx/imagpnm.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/log.h"
-#include "wx/intl.h"
#include "wx/txtstrm.h"
//-----------------------------------------------------------------------------
#if wxUSE_IMAGE && wxUSE_LIBTIFF
+#include "wx/imagtiff.h"
+
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/app.h"
+ #include "wx/intl.h"
#endif
-#include "wx/imagtiff.h"
#include "wx/bitmap.h"
#include "wx/debug.h"
extern "C"
}
#include "wx/filefn.h"
#include "wx/wfstream.h"
-#include "wx/intl.h"
#include "wx/module.h"
#ifndef TIFFLINKAGEMODE
#if wxUSE_MIMETYPE
+#include "wx/mimetype.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/string.h"
+ #include "wx/intl.h"
#endif //WX_PRECOMP
#include "wx/module.h"
#include "wx/log.h"
#include "wx/file.h"
#include "wx/iconloc.h"
-#include "wx/intl.h"
#include "wx/confbase.h"
-#include "wx/mimetype.h"
-
// other standard headers
#include <ctype.h>
#pragma hdrstop
#endif
+#include "wx/module.h"
+
#ifndef WX_PRECOMP
#include "wx/hash.h"
+ #include "wx/intl.h"
#endif
-#include "wx/module.h"
-#include "wx/intl.h"
#include "wx/log.h"
#include "wx/listimpl.cpp"
#include "wx/statbox.h"
#include "wx/settings.h"
#include "wx/listimpl.cpp"
-#include "wx/intl.h"
+
#if WXWIN_COMPATIBILITY_2_4
#include "wx/notebook.h"
#endif
#ifndef WX_PRECOMP
#include "wx/object.h"
#include "wx/string.h"
+ #include "wx/intl.h"
#endif
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/module.h"
#include "wx/log.h"
-#include "wx/intl.h"
#include "wx/event.h"
#include "wx/sckaddr.h"
///////////////////////////////////////////////////////////////////////////////
-// Name: common/stockitem.cpp
+// Name: src/common/stockitem.cpp
// Purpose: Stock buttons, menu and toolbar items labels
// Author: Vaclav Slavik
// Modified by:
#endif
#include "wx/stockitem.h"
-#include "wx/intl.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/utils.h" // for wxStripMenuCodes()
bool wxIsStockID(wxWindowID id)
//////////////////////////////////////////////////////////////////////////////
-// Name: zstream.cpp
+// Name: src/common/zstream.cpp
// Purpose: Compressed stream classes
// Author: Guilhem Lavaux
// Modified by: Mike Wetherell
#include "wx/wxprec.h"
#ifdef __BORLANDC__
- #pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_ZLIB && wxUSE_STREAMS
#include "wx/zstream.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/utils.h"
-#include "wx/intl.h"
#include "wx/log.h"
// normally, the compiler options should contain -I../zlib, but it is
#endif
// wxUSE_ZLIB && wxUSE_STREAMS
-
#pragma hdrstop
#endif
+#if wxUSE_DEBUGREPORT && wxUSE_XML
+
+#include "wx/debugrpt.h"
+
#ifndef WX_PRECOMP
#include "wx/sizer.h"
#include "wx/checklst.h"
#include "wx/textctrl.h"
+ #include "wx/intl.h"
#endif // WX_PRECOMP
-#if wxUSE_DEBUGREPORT && wxUSE_XML
-
-#include "wx/debugrpt.h"
-
-#include "wx/intl.h"
#include "wx/filename.h"
#include "wx/ffile.h"
#include "wx/mimetype.h"
return dlg.ShowModal() == wxID_OK && dbgrpt.GetFilesCount() != 0;
}
-#endif // wxUSE_DEBUGREPORT
+#endif // wxUSE_DEBUGREPORT && wxUSE_XML
#pragma hdrstop
#endif
-#ifndef WX_PRECOMP
-#endif // WX_PRECOMP
+#if wxUSE_PRINTING_ARCHITECTURE && wxUSE_POSTSCRIPT
-#if wxUSE_PRINTING_ARCHITECTURE
+#include "wx/generic/dcpsg.h"
-#if wxUSE_POSTSCRIPT
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif // WX_PRECOMP
#include "wx/dcmemory.h"
#include "wx/utils.h"
-#include "wx/intl.h"
#include "wx/app.h"
#include "wx/image.h"
#include "wx/log.h"
-#include "wx/generic/dcpsg.h"
#include "wx/prntbase.h"
#include "wx/generic/prntdlgg.h"
#include "wx/paper.h"
PsPrint( buffer );
}
PsPrint ("] 0 setdash\n");
- psdash = 0;
- }
+ psdash = 0;
+ }
break;
case wxSOLID:
case wxTRANSPARENT:
}
CalcBoundingBox( x, y );
- CalcBoundingBox( x + size * text.Length() * 2/3 , y );
+ CalcBoundingBox( x + size * text.length() * 2/3 , y );
}
void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord y, double angle )
}
CalcBoundingBox( x, y );
- CalcBoundingBox( x + size * text.Length() * 2/3 , y );
+ CalcBoundingBox( x + size * text.length() * 2/3 , y );
}
void wxPostScriptDC::SetBackground (const wxBrush& brush)
}
}
-#endif
- // wxUSE_POSTSCRIPT
-
-#endif
- // wxUSE_PRINTING_ARCHITECTURE
-
+#endif // wxUSE_PRINTING_ARCHITECTURE && wxUSE_POSTSCRIPT
// vi:sts=4:sw=4:et
#if wxUSE_DIRDLG || wxUSE_FILEDLG
+#include "wx/generic/dirctrlg.h"
+
#ifndef WX_PRECOMP
#include "wx/hash.h"
+ #include "wx/intl.h"
#endif
-#include "wx/generic/dirctrlg.h"
#include "wx/module.h"
#include "wx/utils.h"
#include "wx/button.h"
#include "wx/filefn.h"
#include "wx/cmndata.h"
#include "wx/gdicmn.h"
-#include "wx/intl.h"
#include "wx/imaglist.h"
#include "wx/icon.h"
#include "wx/log.h"
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_DRAGIMAGE
#ifndef WX_PRECOMP
-#include <stdio.h>
-#include "wx/window.h"
-#include "wx/frame.h"
-#include "wx/dcclient.h"
-#include "wx/dcscreen.h"
-#include "wx/dcmemory.h"
-#include "wx/settings.h"
+ #include <stdio.h>
+ #include "wx/window.h"
+ #include "wx/frame.h"
+ #include "wx/dcclient.h"
+ #include "wx/dcscreen.h"
+ #include "wx/dcmemory.h"
+ #include "wx/settings.h"
+ #include "wx/intl.h"
#endif
#include "wx/log.h"
-#include "wx/intl.h"
#define wxUSE_IMAGE_IN_DRAGIMAGE 1
#error wxGenericFileDialog currently only supports Unix, win32 and DOS
#endif
+#include "wx/generic/filedlgg.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/hash.h"
+ #include "wx/intl.h"
+#endif
+
#include "wx/checkbox.h"
#include "wx/textctrl.h"
#include "wx/choice.h"
#include "wx/debug.h"
#include "wx/log.h"
#include "wx/longlong.h"
-#include "wx/intl.h"
#include "wx/msgdlg.h"
#include "wx/sizer.h"
#include "wx/bmpbuttn.h"
#include "wx/filefn.h"
#include "wx/file.h" // for wxS_IXXX constants only
#include "wx/filedlg.h" // wxOPEN, wxSAVE...
-#include "wx/generic/filedlgg.h"
#include "wx/generic/dirctrlg.h" // for wxFileIconsTable
#if wxUSE_TOOLTIPS
/////////////////////////////////////////////////////////////////////////////
-// Name: app.cpp
+// Name: src/gtk/app.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
#include "wx/wxprec.h"
#include "wx/app.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/gdicmn.h"
#include "wx/utils.h"
-#include "wx/intl.h"
#include "wx/log.h"
#include "wx/memory.h"
#include "wx/font.h"
#include "wx/thread.h"
#ifdef __WXGPE__
-#include <gpe/init.h>
+ #include <gpe/init.h>
#endif
#ifdef __WXUNIVERSAL__
// not static because used by textctrl.cpp
//
// MT-FIXME
-bool wxIsInsideYield = FALSE;
+bool wxIsInsideYield = false;
bool wxApp::Yield(bool onlyIfNeeded)
{
wxFAIL_MSG( wxT("wxYield called recursively" ) );
}
- return FALSE;
+ return false;
}
#if wxUSE_THREADS
if ( !wxThread::IsMain() )
{
// can't call gtk_main_iteration() from other threads like this
- return TRUE;
+ return true;
}
#endif // wxUSE_THREADS
- wxIsInsideYield = TRUE;
+ wxIsInsideYield = true;
// We need to remove idle callbacks or the loop will
// never finish.
wxLog::Resume();
#endif
- wxIsInsideYield = FALSE;
+ wxIsInsideYield = false;
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
}
// Nothing to do for 15, 16, 24, 32 bit displays
- if (visual->depth > 8) return TRUE;
+ if (visual->depth > 8) return true;
// initialize color cube for 8-bit color reduction dithering
}
}
- return TRUE;
+ return true;
}
GdkVisual *wxApp::GetGdkVisual()
void wxApp::OnAssert(const wxChar *file, int line, const wxChar* cond, const wxChar *msg)
{
- m_isInAssert = TRUE;
+ m_isInAssert = true;
wxAppBase::OnAssert(file, line, cond, msg);
#include "wx/combobox.h"
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/settings.h"
#include "wx/arrstr.h"
-#include "wx/intl.h"
#include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED
///////////////////////////////////////////////////////////////////////////////
-// Name: dnd.cpp
+// Name: src/gtk/dnd.cpp
// Purpose: wxDropTarget class
// Author: Robert Roebling
// Id: $Id$
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/dnd.h"
-#include "wx/log.h"
+#if wxUSE_DRAG_AND_DROP
+#include "wx/dnd.h"
-#if wxUSE_DRAG_AND_DROP
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
#include "wx/window.h"
#include "wx/app.h"
#include "wx/gdicmn.h"
-#include "wx/intl.h"
+#include "wx/log.h"
#include "wx/utils.h"
#include "wx/gtk/private.h"
#include "wx/filedlg.h"
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#ifdef __WXGTK24__
#include <gtk/gtk.h>
#include <unistd.h> // chdir
-#include "wx/intl.h"
#include "wx/filename.h" // wxFilename
#include "wx/tokenzr.h" // wxStringTokenizer
#include "wx/filefn.h" // ::wxGetCwd
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#if wxUSE_FONTDLG
-
-#ifndef __WXGPE__
+#if wxUSE_FONTDLG && !defined(__WXGPE__)
#include "wx/fontdlg.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/fontutil.h"
#include "wx/utils.h"
-#include "wx/intl.h"
#include "wx/debug.h"
#include "wx/msgdlg.h"
m_fontData.SetChosenFont(wxFont( wxString::FromAscii(fontname) ));
}
-#endif // wxUSE_FONTDLG
-
-#endif // GPE
+#endif // wxUSE_FONTDLG && !__WXGPE__
#if wxUSE_LISTBOX
+#include "wx/listbox.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
+ #include "wx/intl.h"
#endif
-#include "wx/listbox.h"
#include "wx/arrstr.h"
#include "wx/utils.h"
-#include "wx/intl.h"
#include "wx/checklst.h"
#include "wx/settings.h"
#include "wx/log.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_MDI
+
#include "wx/mdi.h"
-#include "wx/notebook.h"
-#if wxUSE_MDI
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+#include "wx/notebook.h"
#include "wx/dialog.h"
#include "wx/menu.h"
-#include "wx/intl.h"
#include "wx/gtk/private.h"
#include <glib.h>
/////////////////////////////////////////////////////////////////////////////
-// Name: menu.cpp
+// Name: src/gtk/menu.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
#include "wx/wxprec.h"
#include "wx/menu.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/log.h"
-#include "wx/intl.h"
#include "wx/app.h"
#include "wx/bitmap.h"
}
#endif // wxUSE_MENUS_NATIVE
-
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_MSGDLG && defined(__WXGTK20__) && !defined(__WXGPE__)
#include "wx/msgdlg.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/gtk/private.h"
#include <gtk/gtk.h>
-#include "wx/intl.h"
-
IMPLEMENT_CLASS(wxMessageDialog, wxDialog)
wxMessageDialog::wxMessageDialog(wxWindow *parent,
}
-#endif // wxUSE_MSGDLG && defined(__WXGTK20__)
-
+#endif // wxUSE_MSGDLG && defined(__WXGTK20__) && !defined(__WXGPE__)
/////////////////////////////////////////////////////////////////////////////
-// Name: notebook.cpp
+// Name: src/gtk/notebook.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_NOTEBOOK
+
#include "wx/notebook.h"
-#if wxUSE_NOTEBOOK
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
#include "wx/panel.h"
#include "wx/utils.h"
#include "wx/imaglist.h"
-#include "wx/intl.h"
#include "wx/log.h"
#include "wx/bitmap.h"
#include "wx/fontutil.h"
wxString wxNotebook::GetPageText( size_t page ) const
{
- wxCHECK_MSG( m_widget != NULL, wxT(""), wxT("invalid notebook") );
+ wxCHECK_MSG( m_widget != NULL, wxEmptyString, wxT("invalid notebook") );
wxGtkNotebookPage* nb_page = GetNotebookPage(page);
if (nb_page)
return nb_page->m_text;
else
- return wxT("");
+ return wxEmptyString;
}
int wxNotebook::GetPageImage( size_t page ) const
/* set the label text */
nb_page->m_text = text;
- if (nb_page->m_text.IsEmpty()) nb_page->m_text = wxT("");
+ if (nb_page->m_text.empty()) nb_page->m_text = wxT("");
nb_page->m_label = GTK_LABEL( gtk_label_new(wxGTK_CONV(nb_page->m_text)) );
gtk_box_pack_end( GTK_BOX(nb_page->m_box), GTK_WIDGET(nb_page->m_label), FALSE, FALSE, m_padding );
#include "wx/wxprec.h"
#include "wx/textctrl.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/utils.h"
-#include "wx/intl.h"
#include "wx/log.h"
#include "wx/math.h"
#include "wx/settings.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/intl.h"
#endif
#include "wx/apptrait.h"
-#include "wx/intl.h"
#include "wx/log.h"
#include "wx/process.h"
#endif
#include "wx/window.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/dcclient.h"
#include "wx/frame.h"
#include "wx/app.h"
#include "wx/menu.h"
#include "wx/statusbr.h"
-#include "wx/intl.h"
#include "wx/settings.h"
#include "wx/log.h"
#include "wx/fontutil.h"
void wxWindowGTK::GtkScrolledWindowSetBorder(GtkWidget* w, int wxstyle)
{
//RN: Note that static controls usually have no border on gtk, so maybe
- //it makes sense to treat that as simply no border at the wx level
+ //it makes sense to treat that as simply no border at the wx level
//as well...
if (!(wxstyle & wxNO_BORDER) && !(wxstyle & wxBORDER_STATIC))
{
GtkShadowType gtkstyle;
-
+
if(wxstyle & wxBORDER_RAISED)
gtkstyle = GTK_SHADOW_OUT;
else if (wxstyle & wxBORDER_SUNKEN)
else //default
gtkstyle = GTK_SHADOW_IN;
- gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW(w),
+ gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW(w),
gtkstyle );
}
}
/////////////////////////////////////////////////////////////////////////////
-// Name: app.cpp
+// Name: src/gtk1/app.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
#include "wx/wxprec.h"
#include "wx/app.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/gdicmn.h"
#include "wx/utils.h"
-#include "wx/intl.h"
#include "wx/log.h"
#include "wx/memory.h"
#include "wx/font.h"
#include "wx/combobox.h"
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/settings.h"
#include "wx/arrstr.h"
-#include "wx/intl.h"
#include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED
///////////////////////////////////////////////////////////////////////////////
-// Name: dnd.cpp
+// Name: src/gtk1/dnd.cpp
// Purpose: wxDropTarget class
// Author: Robert Roebling
// Id: $Id$
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/dnd.h"
-#include "wx/log.h"
+#if wxUSE_DRAG_AND_DROP
+#include "wx/dnd.h"
-#if wxUSE_DRAG_AND_DROP
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+#include "wx/log.h"
#include "wx/window.h"
#include "wx/app.h"
#include "wx/gdicmn.h"
-#include "wx/intl.h"
#include "wx/utils.h"
#include "wx/gtk1/private.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#if wxUSE_FONTDLG
-
-#ifndef __WXGPE__
+#if wxUSE_FONTDLG && !defined(__WXGPE__)
#include "wx/fontdlg.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/fontutil.h"
#include "wx/utils.h"
-#include "wx/intl.h"
#include "wx/debug.h"
#include "wx/msgdlg.h"
m_fontData.SetChosenFont(wxFont( wxString::FromAscii(fontname) ));
}
-#endif // wxUSE_FONTDLG
-
-#endif // GPE
+#endif // wxUSE_FONTDLG && !defined(__WXGPE__)
#if wxUSE_LISTBOX
+#include "wx/listbox.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
+ #include "wx/intl.h"
#endif
-#include "wx/listbox.h"
#include "wx/arrstr.h"
#include "wx/utils.h"
-#include "wx/intl.h"
#include "wx/checklst.h"
#include "wx/settings.h"
#include "wx/gtk1/private.h"
#if wxUSE_TOOLTIPS
-#include "wx/tooltip.h"
+ #include "wx/tooltip.h"
#endif
#include <gdk/gdk.h>
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_MDI
+
#include "wx/mdi.h"
-#include "wx/notebook.h"
-#if wxUSE_MDI
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+#include "wx/notebook.h"
#include "wx/dialog.h"
#include "wx/menu.h"
-#include "wx/intl.h"
#include "wx/gtk1/private.h"
#include <glib.h>
#include "wx/wxprec.h"
#include "wx/menu.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/log.h"
-#include "wx/intl.h"
#include "wx/app.h"
#include "wx/bitmap.h"
text = mitem->GetText();
const wxBitmap *bitmap = &mitem->GetBitmap();
- // TODO
+ // TODO
wxUnusedVar(bitmap);
menuItem = gtk_menu_item_new_with_label( wxGTK_CONV( text ) );
label = GTK_LABEL( GTK_BIN(menuItem)->child );
/////////////////////////////////////////////////////////////////////////////
-// Name: notebook.cpp
+// Name: src/gtk1/notebook.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_NOTEBOOK
+
#include "wx/notebook.h"
-#if wxUSE_NOTEBOOK
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
#include "wx/panel.h"
#include "wx/utils.h"
#include "wx/imaglist.h"
-#include "wx/intl.h"
#include "wx/log.h"
#include "wx/bitmap.h"
#include "wx/fontutil.h"
wxString wxNotebook::GetPageText( size_t page ) const
{
- wxCHECK_MSG( m_widget != NULL, wxT(""), wxT("invalid notebook") );
+ wxCHECK_MSG( m_widget != NULL, wxEmptyString, wxT("invalid notebook") );
wxGtkNotebookPage* nb_page = GetNotebookPage(page);
if (nb_page)
return nb_page->m_text;
else
- return wxT("");
+ return wxEmptyString;
}
int wxNotebook::GetPageImage( size_t page ) const
/* set the label text */
nb_page->m_text = text;
- if (nb_page->m_text.IsEmpty()) nb_page->m_text = wxT("");
+ if (nb_page->m_text.empty()) nb_page->m_text = wxT("");
nb_page->m_label = GTK_LABEL( gtk_label_new(wxGTK_CONV(nb_page->m_text)) );
gtk_box_pack_end( GTK_BOX(nb_page->m_box), GTK_WIDGET(nb_page->m_label), FALSE, FALSE, m_padding );
#include "wx/wxprec.h"
#include "wx/textctrl.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/utils.h"
-#include "wx/intl.h"
#include "wx/log.h"
#include "wx/math.h"
#include "wx/settings.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/intl.h"
#endif
#include "wx/apptrait.h"
-#include "wx/intl.h"
#include "wx/log.h"
#include "wx/process.h"
#endif
#include "wx/window.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/dcclient.h"
#include "wx/frame.h"
#include "wx/app.h"
#include "wx/menu.h"
#include "wx/statusbr.h"
-#include "wx/intl.h"
#include "wx/settings.h"
#include "wx/log.h"
#include "wx/fontutil.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: app.cpp
+// Name: src/mac/carbon/app.cpp
// Purpose: wxApp
// Author: Stefan Csomor
// Modified by:
#include "wx/wxprec.h"
+#include "wx/app.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/window.h"
#include "wx/frame.h"
#include "wx/button.h"
-#include "wx/app.h"
#include "wx/utils.h"
#include "wx/gdicmn.h"
#include "wx/pen.h"
#include "wx/brush.h"
#include "wx/cursor.h"
-#include "wx/intl.h"
#include "wx/icon.h"
#include "wx/palette.h"
#include "wx/dc.h"
int wxId ;
} ;
-IdPair gCommandIds [] =
+IdPair gCommandIds [] =
{
{ kHICommandCut , wxID_CUT } ,
{ kHICommandCopy , wxID_COPY } ,
{ kHICommandRedo , wxID_REDO } ,
} ;
-int wxMacCommandToId( UInt32 macCommandId )
+int wxMacCommandToId( UInt32 macCommandId )
{
int wxid = 0 ;
-
+
switch ( macCommandId )
{
case kHICommandPreferences :
return wxid ;
}
-UInt32 wxIdToMacCommand( int wxId )
+UInt32 wxIdToMacCommand( int wxId )
{
UInt32 macId = 0 ;
-
+
if ( wxId == wxApp::s_macPreferencesMenuItemId )
macId = kHICommandPreferences ;
else if (wxId == wxApp::s_macExitMenuItemId)
return macId ;
}
-wxMenu* wxFindMenuFromMacCommand( const HICommand &command , wxMenuItem* &item )
+wxMenu* wxFindMenuFromMacCommand( const HICommand &command , wxMenuItem* &item )
{
wxMenu* itemMenu = NULL ;
int id = 0 ;
if ( item )
{
wxASSERT( itemMenu != NULL ) ;
-
+
switch ( cEvent.GetKind() )
{
case kEventProcessCommand :
{
wxUpdateUIEvent event(id);
event.SetEventObject( itemMenu );
-
+
bool processed = false;
-
+
// Try the menu's event handler
{
wxEvtHandler *handler = itemMenu->GetEventHandler();
if ( handler )
processed = handler->ProcessEvent(event);
}
-
+
// Try the window the menu was popped up from
// (and up through the hierarchy)
if ( !processed )
processed = win->GetEventHandler()->ProcessEvent(event);
break;
}
-
+
menu = menu->GetParent();
}
}
-
+
if ( processed )
{
// if anything changed, update the changed attribute
if ( !focus )
return false ;
- bool handled;
+ bool handled;
wxKeyEvent event(wxEVT_KEY_DOWN) ;
MacCreateKeyEvent( event, focus , keymessage , modifiers , when , wherex , wherey , uniChar ) ;
-
+
handled = focus->GetEventHandler()->ProcessEvent( event ) ;
if ( handled && event.GetSkipped() )
handled = false ;
wxKeyEvent event( wxEVT_KEY_UP ) ;
MacCreateKeyEvent( event, focus , keymessage , modifiers , when , wherex , wherey , uniChar ) ;
handled = focus->GetEventHandler()->ProcessEvent( event ) ;
-
+
return handled ;
}
{
if ( !focus )
return false ;
-
+
wxKeyEvent event(wxEVT_CHAR) ;
MacCreateKeyEvent( event, focus , keymessage , modifiers , when , wherex , wherey , uniChar ) ;
long keyval = event.m_keyCode ;
bool handled = false ;
wxTopLevelWindowMac *tlw = focus->MacGetTopLevelWindow() ;
-
+
if (tlw)
{
event.SetEventType( wxEVT_CHAR_HOOK );
event.Skip( false ) ;
handled = focus->GetEventHandler()->ProcessEvent( event ) ;
}
-
+
if ( !handled && (keyval == WXK_TAB) )
{
wxWindow* iter = focus->GetParent() ;
return handled ;
}
-// This method handles common code for SendKeyDown, SendKeyUp, and SendChar events.
+// This method handles common code for SendKeyDown, SendKeyUp, and SendChar events.
void wxApp::MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymessage , long modifiers , long when , short wherex , short wherey , wxChar uniChar )
{
short keycode, keychar ;
#ifndef WX_PRECOMP
#include "wx/object.h"
#include "wx/string.h"
+ #include "wx/intl.h"
#endif
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/module.h"
#include "wx/log.h"
-#include "wx/intl.h"
#include "wx/event.h"
#include "wx/sckaddr.h"
#if wxUSE_CLIPBOARD
+#include "wx/clipbrd.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/app.h"
#include "wx/frame.h"
#include "wx/bitmap.h"
#include "wx/utils.h"
#include "wx/metafile.h"
-#include "wx/clipbrd.h"
-#include "wx/intl.h"
#include "wx/log.h"
#ifndef __DARWIN__
#if wxUSE_DATAOBJ
+#include "wx/dataobj.h"
+
#ifndef WX_PRECOMP
-#include "wx/intl.h"
+ #include "wx/intl.h"
#endif
#include "wx/log.h"
-#include "wx/dataobj.h"
#include "wx/dcmemory.h"
#include "wx/mstream.h"
#include "wx/image.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: filedlg.cpp
+// Name: src/mac/carbon/filedlg.cpp
// Purpose: wxFileDialog
// Author: Stefan Csomor
// Modified by:
#include "wx/wxprec.h"
+#include "wx/filedlg.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/dialog.h"
-#include "wx/filedlg.h"
-#include "wx/intl.h"
#include "wx/tokenzr.h"
#include "wx/filename.h"
// an explanatory text, in that case the first part is name and extension at the same time
wxASSERT_MSG( filterIndex == 0 || !isName , wxT("incorrect format of format string") ) ;
- if ( current.IsEmpty() )
+ if ( current.empty() )
myData->extensions.Add( myData->name[filterIndex] ) ;
else
myData->extensions.Add( current.MakeUpper() ) ;
// Remove leading '.'
if (extension.length() && (extension.GetChar(0) == '.'))
extension = extension.Mid( 1 );
-
+
if (wxFileName::MacFindDefaultTypeAndCreator( extension, &fileType, &creator ))
myData->filtermactypes.Add( (OSType)fileType );
else
{
// let the user select bundles/programs in dialogs
dialogCreateOptions.optionFlags |= kNavSupportPackages;
-
+
navFilterUPP = NewNavObjectFilterUPP(CrossPlatformFilterCallback);
err = ::NavCreateGetFileDialog(
&dialogCreateOptions,
thePath = wxMacFSRefToPath( &theFSRef, navReply.saveFileName );
else
thePath = wxMacFSRefToPath( &theFSRef );
-
+
if (!thePath)
{
::NavDisposeReply(&navReply);
return (err == noErr) ? wxID_OK : wxID_CANCEL;
}
-
/////////////////////////////////////////////////////////////////////////////
-// Name: fontdlg.cpp
+// Name: src/mac/carbon/fontdlgosx.cpp
// Purpose: wxFontDialog class.
// Author: Ryan Norton
// Modified by:
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#include "wx/wxprec.h"
+
// ===========================================================================
// declarations
// ===========================================================================
// headers
// ---------------------------------------------------------------------------
-#include "wx/cmndata.h"
#include "wx/fontdlg.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
+#include "wx/cmndata.h"
#include "wx/fontutil.h"
#include "wx/log.h"
-
+
// ============================================================================
// implementation
// ============================================================================
#import <AppKit/AppKit.h>
#include "wx/mac/uma.h"
-#include "wx/intl.h"
@interface wxMacFontPanelAccView : NSView
-{
+{
BOOL m_okPressed ;
BOOL m_shouldClose ;
NSButton* m_cancelButton ;
- (id)initWithFrame:(NSRect)rectBox
{
[super initWithFrame:rectBox];
-
+
wxMacCFStringHolder cfOkString( wxT("OK"), wxLocale::GetSystemEncoding() );
wxMacCFStringHolder cfCancelString( wxT("Cancel"), wxLocale::GetSystemEncoding() );
NSRect rectCancel = NSMakeRect( 10.0 , 10.0 , 82 , 24 );
NSRect rectOK = NSMakeRect( 100.0 , 10.0 , 82 , 24 );
-
+
NSButton* cancelButton = [[NSButton alloc] initWithFrame:rectCancel];
[cancelButton setTitle:(NSString*)cfCancelString.Detach()];
[cancelButton setBezelStyle:NSRoundedBezelStyle];
[cancelButton setAction:@selector(cancelPressed:)];
[cancelButton setTarget:self];
m_cancelButton = cancelButton ;
-
+
NSButton* okButton = [[NSButton alloc] initWithFrame:rectOK];
[okButton setTitle:(NSString*)cfOkString.Detach()];
[okButton setBezelStyle:NSRoundedBezelStyle];
[self addSubview:cancelButton];
[self addSubview:okButton];
-
+
[self resetFlags];
return self;
}
- (void)resetFlags
{
m_okPressed = NO ;
- m_shouldClose = NO ;
+ m_shouldClose = NO ;
}
- (IBAction)cancelPressed:(id)sender
WindowRef carbonWindowRef = (WindowRef)[fontPanel windowRef] ;
SetWindowModality(carbonWindowRef, kWindowModalityAppModal , 0) ;
SetWindowGroup(carbonWindowRef , GetWindowGroupOfClass(kMovableModalWindowClass));
-
+
[fontPanel setFloatingPanel:NO] ;
[[fontPanel standardWindowButton:NSWindowCloseButton] setEnabled:NO] ;
-
+
wxMacFontPanelAccView* accessoryView = (wxMacFontPanelAccView*) [fontPanel accessoryView] ;
if ( accessoryView == nil)
{
NSRect rectBox = NSMakeRect( 0 , 0 , 192 , 40 );
accessoryView = [[wxMacFontPanelAccView alloc] initWithFrame:rectBox];
[fontPanel setAccessoryView:accessoryView];
-
+
[fontPanel setDefaultButtonCell:[[accessoryView okButton] cell]] ;
}
[accessoryView resetFlags];
-
+
NSModalSession session = [NSApp beginModalSessionForWindow:fontPanel];
[NSApp runModalSession:session];
[[fontPanel standardWindowButton:NSWindowCloseButton] setEnabled:YES] ;
if( FPIsFontPanelVisible())
FPShowHideFontPanel() ;
-
+
if ( [accessoryView closedWithOk])
{
retval = wxID_OK ;
- (BOOL)windowShouldClose:(id)sender
{
m_bIsClosed = true;
-
+
[NSApp abortModal];
[NSApp stopModal];
return YES;
{
m_bIsClosed = true;
m_bIsOpen = false;
-
+
[NSApp abortModal];
[NSApp stopModal];
return YES;
m_fontData = data;
//
- // This is the key call - this initializes
- // events and window stuff for cocoa for carbon
- // applications.
+ // This is the key call - this initializes
+ // events and window stuff for cocoa for carbon
+ // applications.
//
- // This is also the only call here that is
- // 10.2+ specific (the rest is OSX only),
- // which, ironically, the carbon font
- // panel requires.
+ // This is also the only call here that is
+ // 10.2+ specific (the rest is OSX only),
+ // which, ironically, the carbon font
+ // panel requires.
//
bool bOK = NSApplicationLoad();
//Get the initial wx font
wxFont& thewxfont = m_fontData.m_initialFont;
-
- //if the font is valid set the default (selected) font of the
+
+ //if the font is valid set the default (selected) font of the
//NSFontDialog to that font
if (thewxfont.Ok())
{
NSFontTraitMask theMask = 0;
-
+
if(thewxfont.GetStyle() == wxFONTSTYLE_ITALIC)
theMask |= NSItalicFontMask;
-
+
if(thewxfont.IsFixedWidth())
theMask |= NSFixedPitchFontMask;
- NSFont* theDefaultFont =
+ NSFont* theDefaultFont =
[[NSFontManager sharedFontManager] fontWithFamily:
wxNSStringWithWxString(thewxfont.GetFaceName())
traits:theMask
thewxfont.GetWeight() == wxLIGHT ? 0 : 5
size: (float)(thewxfont.GetPointSize())
];
-
+
wxASSERT_MSG(theDefaultFont, wxT("Invalid default font for wxCocoaFontDialog!"));
//Apple docs say to call NSFontManager::setSelectedFont
alpha:1.0]
];
else
- [[NSColorPanel sharedColorPanel] setColor:[NSColor blackColor]];
-
+ [[NSColorPanel sharedColorPanel] setColor:[NSColor blackColor]];
+
//We're done - free up the pool
[thePool release];
-
+
return bOK;
}
int wxFontDialog::ShowModal()
-{
- //Start the pool. Required for carbon interaction
+{
+ //Start the pool. Required for carbon interaction
//(For those curious, the only thing that happens
//if you don't do this is a bunch of error
//messages about leaks on the console,
thePool = [[NSAutoreleasePool alloc] init];
//Get the shared color and font panel
- NSFontPanel* theFontPanel = [NSFontPanel sharedFontPanel];
+ NSFontPanel* theFontPanel = [NSFontPanel sharedFontPanel];
NSColorPanel* theColorPanel = [NSColorPanel sharedColorPanel];
//Create and assign the delegates (cocoa event handlers) so
wxWCODelegate* theCPDelegate = [[wxWCODelegate alloc] init];
[theColorPanel setDelegate:theCPDelegate];
-
+
//
- // Begin the modal loop for the font and color panels
+ // Begin the modal loop for the font and color panels
//
- // The idea is that we first make the font panel modal,
+ // The idea is that we first make the font panel modal,
// but if the color panel is opened, unless we stop the
// modal loop the color panel opens behind the font panel
// with no input acceptable to it - which makes it useless.
//
- // So we set up delegates for both the color and font panels,
- // and the if the font panel opens the color panel, we
+ // So we set up delegates for both the color and font panels,
+ // and the if the font panel opens the color panel, we
// stop the modal loop, and start a separate modal loop for
// the color panel until the color panel closes, switching
// back to the font panel modal loop once it does close.
do
{
//
- // Start the font panel modal loop
+ // Start the font panel modal loop
//
NSModalSession session = [NSApp beginModalSessionForWindow:theFontPanel];
- for (;;)
+ for (;;)
{
[NSApp runModalSession:session];
-
+
//If the font panel is closed or the font panel
//opened the color panel, break
if ([theFPDelegate isClosed] || [theCPDelegate isOpen])
break;
}
[NSApp endModalSession:session];
-
+
//is the color panel open?
if ([theCPDelegate isOpen])
{
//
- // Start the color panel modal loop
+ // Start the color panel modal loop
//
NSModalSession session = [NSApp beginModalSessionForWindow:theColorPanel];
- for (;;)
+ for (;;)
{
[NSApp runModalSession:session];
-
+
//If the color panel is closed, return the font panel modal loop
if ([theCPDelegate isClosed])
break;
//out of its modal loop because the color panel was
//opened) return the font panel modal loop
}while([theFPDelegate isClosed] == NO);
-
+
//free up the memory for the delegates - we don't need them anymore
[theFPDelegate release];
[theCPDelegate release];
-
+
//Get the font the user selected
- NSFont* theFont = [theFontPanel panelConvertFont:[NSFont userFontOfSize:0]];
-
+ NSFont* theFont = [theFontPanel panelConvertFont:[NSFont userFontOfSize:0]];
+
//Get more information about the user's chosen font
NSFontTraitMask theTraits = [[NSFontManager sharedFontManager] traitsOfFont:theFont];
int theFontWeight = [[NSFontManager sharedFontManager] weightOfFont:theFont];
int theFontSize = (int) [theFont pointSize];
-
+
//Set the wx font to the appropriate data
if(theTraits & NSFixedPitchFontMask)
m_fontData.m_chosenFont.SetFamily(wxTELETYPE);
-
+
m_fontData.m_chosenFont.SetFaceName(wxStringWithNSString([theFont familyName]));
m_fontData.m_chosenFont.SetPointSize(theFontSize);
m_fontData.m_chosenFont.SetStyle(theTraits & NSItalicFontMask ? wxFONTSTYLE_ITALIC : 0);
m_fontData.m_chosenFont.SetWeight(theFontWeight < 5 ? wxLIGHT :
- theFontWeight >= 9 ? wxBOLD : wxNORMAL);
-
+ theFontWeight >= 9 ? wxBOLD : wxNORMAL);
+
//Get the shared color panel along with the chosen color and set the chosen color
NSColor* theColor = [[theColorPanel color] colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
-
+
m_fontData.m_fontColour.Set((unsigned char) ([theColor redComponent] * 255.0),
(unsigned char) ([theColor greenComponent] * 255.0),
(unsigned char) ([theColor blueComponent] * 255.0));
//Friendly debug stuff
#ifdef FONTDLGDEBUG
- wxPrintf(wxT("---Font Panel---\n--NS--\nSize:%f\nWeight:%i\nTraits:%i\n--WX--\nFaceName:%s\nPointSize:%i\nStyle:%i\nWeight:%i\nColor:%i,%i,%i\n---END Font Panel---\n"),
-
+ wxPrintf(wxT("---Font Panel---\n--NS--\nSize:%f\nWeight:%i\nTraits:%i\n--WX--\nFaceName:%s\nPointSize:%i\nStyle:%i\nWeight:%i\nColor:%i,%i,%i\n---END Font Panel---\n"),
+
(float) theFontSize,
theFontWeight,
theTraits,
-
+
m_fontData.m_chosenFont.GetFaceName().c_str(),
m_fontData.m_chosenFont.GetPointSize(),
m_fontData.m_chosenFont.GetStyle(),
m_fontData.m_chosenFont.GetWeight(),
- m_fontData.m_fontColour.Red(),
- m_fontData.m_fontColour.Green(),
+ m_fontData.m_fontColour.Red(),
+ m_fontData.m_fontColour.Green(),
m_fontData.m_fontColour.Blue() );
#endif
#if wxUSE_FONTMAP
+#include "wx/fontenum.h"
+
#ifndef WX_PRECOMP
- #include "wx/font.h"
+ #include "wx/font.h"
+ #include "wx/intl.h"
#endif
-#include "wx/fontenum.h"
#include "wx/fontutil.h"
#include "wx/fontmap.h"
#include "wx/fontutil.h"
#include "wx/encinfo.h"
-#include "wx/intl.h"
#include "wx/mac/private.h"
return true;
}
-#endif
+#endif // wxUSE_FONTMAP
#if wxUSE_MIMETYPE
+#include "wx/mac/mimetype.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/string.h"
+ #include "wx/intl.h"
#if wxUSE_GUI
#include "wx/icon.h"
#include "wx/log.h"
#include "wx/file.h"
-#include "wx/intl.h"
#include "wx/confbase.h"
-#include "wx/mac/mimetype.h"
#include "wx/mac/private.h"
// other standard headers
//
#include "wx/mac/corefoundation/cfstring.h"
-#include "wx/intl.h" //wxLocale for wxCFString
#define wxCF_RELEASE true
#define wxCF_RETAIN false
#include "wx/wxprec.h"
-#include "wx/app.h"
#include "wx/msgdlg.h"
-#include "wx/intl.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
+#include "wx/app.h"
#include "wx/mac/uma.h"
return resultbutton;
}
-
#ifndef WX_PRECOMP
#include "wx/object.h"
#include "wx/string.h"
+ #include "wx/intl.h"
#endif
#include "wx/log.h"
#include "wx/file.h"
#include "wx/timer.h"
-#include "wx/intl.h"
// Carbon QT Implementation Details -
//
#if wxUSE_TEXTCTRL
+#include "wx/textctrl.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
#ifdef __DARWIN__
- #include <sys/types.h>
- #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
#else
- #include <stat.h>
+ #include <stat.h>
#endif
#include "wx/msgdlg.h"
#include "wx/dc.h"
#include "wx/button.h"
#include "wx/toplevel.h"
-#include "wx/textctrl.h"
#include "wx/settings.h"
#include "wx/filefn.h"
#include "wx/utils.h"
#include "wx/sysopt.h"
#include "wx/menu.h"
-#include "wx/intl.h"
#if defined(__BORLANDC__) && !defined(__WIN32__)
#include <alloc.h>
if ( key == 'a' && event.MetaDown() )
{
- SelectAll() ;
-
+ SelectAll() ;
+
return ;
}
(((UniChar*)*theText)[actualSize]) = 0 ;
wxMBConvUTF16 converter ;
size_t noChars = converter.MB2WC( NULL , (const char*)*theText , 0 ) ;
- wxASSERT_MSG( noChars != wxCONV_FAILED, _T("Unable to count the number of characters in this string!") );
+ wxASSERT_MSG( noChars != wxCONV_FAILED, _T("Unable to count the number of characters in this string!") );
ptr = new wxChar[noChars + 1] ;
noChars = converter.MB2WC( ptr , (const char*)*theText , noChars + 1 ) ;
- wxASSERT_MSG( noChars != wxCONV_FAILED, _T("Conversion of string failed!") );
+ wxASSERT_MSG( noChars != wxCONV_FAILED, _T("Conversion of string failed!") );
ptr[noChars] = 0 ;
HUnlock( theText ) ;
#endif
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#include "wx/utils.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/app.h"
#include "wx/apptrait.h"
#include "wx/mac/uma.h"
#include "wx/font.h"
#include "wx/toplevel.h"
-#else
- #include "wx/intl.h"
#endif
#include <ctype.h>
kMetroNubUserAPIVersion <= block->apiHiVersion)
{
// success!
- gMetroNubEntry = block;
+ gMetroNubEntry = block;
}
}
}
}
if ( err == noErr )
{
-
+
if ( IsEventInQueue( GetMainEventQueue() , s_wakeupEvent ) )
return;
s_wakeupEvent.SetCurrentTime();
OSType wxMacCreator = 'WXMC';
OSType wxMacControlProperty = 'MCCT';
-void wxMacControl::SetReferenceInNativeControl()
+void wxMacControl::SetReferenceInNativeControl()
{
void * data = this;
verify_noerr( SetControlProperty ( m_controlRef ,
wxMacCreator,wxMacControlProperty, sizeof(data), &data ) );
}
-wxMacControl* wxMacControl::GetReferenceFromNativeControl(ControlRef control)
+wxMacControl* wxMacControl::GetReferenceFromNativeControl(ControlRef control)
{
wxMacControl* ctl = NULL;
UInt32 actualSize;
}
pascal Boolean wxMacDataBrowserControl::DataBrowserCompareProc(
- ControlRef browser,
- DataBrowserItemID itemOneID,
- DataBrowserItemID itemTwoID,
- DataBrowserPropertyID sortProperty)
+ ControlRef browser,
+ DataBrowserItemID itemOneID,
+ DataBrowserItemID itemTwoID,
+ DataBrowserPropertyID sortProperty)
{
wxMacDataBrowserControl* ctl = dynamic_cast<wxMacDataBrowserControl*>( wxMacControl::GetReferenceFromNativeControl( browser ) );
if ( ctl != 0 )
DataBrowserItemCompareUPP gDataBrowserItemCompareUPP = NULL;
wxMacDataBrowserControl::wxMacDataBrowserControl( wxWindow* peer, const wxPoint& pos, const wxSize& size, long style) : wxMacControl( peer )
-{
+{
Rect bounds = wxMacGetBoundsForControl( peer, pos, size );
OSStatus err = ::CreateDataBrowserControl(
MAC_WXHWND(peer->MacGetTopLevelWindowRef()),
OSStatus wxMacDataBrowserControl::GetItemCount( DataBrowserItemID container,
Boolean recurse,
DataBrowserItemState state,
- UInt32 *numItems) const
+ UInt32 *numItems) const
{
- return GetDataBrowserItemCount( m_controlRef, container, recurse, state, numItems );
+ return GetDataBrowserItemCount( m_controlRef, container, recurse, state, numItems );
}
OSStatus wxMacDataBrowserControl::GetItems( DataBrowserItemID container,
Boolean recurse,
DataBrowserItemState state,
- Handle items) const
+ Handle items) const
{
- return GetDataBrowserItems( m_controlRef, container, recurse, state, items );
+ return GetDataBrowserItems( m_controlRef, container, recurse, state, items );
}
OSStatus wxMacDataBrowserControl::SetSelectionFlags( DataBrowserSelectionFlags options )
return SetDataBrowserCallbacks( m_controlRef, callbacks );
}
-OSStatus wxMacDataBrowserControl::UpdateItems(
+OSStatus wxMacDataBrowserControl::UpdateItems(
DataBrowserItemID container,
UInt32 numItems,
const DataBrowserItemID *items,
return GetDataBrowserTableViewItemRow( m_controlRef, item, row );
}
-OSStatus wxMacDataBrowserControl::SetDefaultRowHeight( UInt16 height )
+OSStatus wxMacDataBrowserControl::SetDefaultRowHeight( UInt16 height )
{
- return SetDataBrowserTableViewRowHeight( m_controlRef , height );
+ return SetDataBrowserTableViewRowHeight( m_controlRef , height );
}
-OSStatus wxMacDataBrowserControl::GetDefaultRowHeight( UInt16 * height ) const
+OSStatus wxMacDataBrowserControl::GetDefaultRowHeight( UInt16 * height ) const
{
- return GetDataBrowserTableViewRowHeight( m_controlRef, height );
+ return GetDataBrowserTableViewRowHeight( m_controlRef, height );
}
-
-OSStatus wxMacDataBrowserControl::SetRowHeight( DataBrowserItemID item , UInt16 height)
+
+OSStatus wxMacDataBrowserControl::SetRowHeight( DataBrowserItemID item , UInt16 height)
{
return SetDataBrowserTableViewItemRowHeight( m_controlRef, item , height );
}
-OSStatus wxMacDataBrowserControl::GetRowHeight( DataBrowserItemID item , UInt16 *height) const
+OSStatus wxMacDataBrowserControl::GetRowHeight( DataBrowserItemID item , UInt16 *height) const
{
return GetDataBrowserTableViewItemRowHeight( m_controlRef, item , height);
}
-OSStatus wxMacDataBrowserControl::GetColumnWidth( DataBrowserPropertyID column , UInt16 *width ) const
+OSStatus wxMacDataBrowserControl::GetColumnWidth( DataBrowserPropertyID column , UInt16 *width ) const
{
return GetDataBrowserTableViewNamedColumnWidth( m_controlRef , column , width );
}
-OSStatus wxMacDataBrowserControl::SetColumnWidth( DataBrowserPropertyID column , UInt16 width )
+OSStatus wxMacDataBrowserControl::SetColumnWidth( DataBrowserPropertyID column , UInt16 width )
{
return SetDataBrowserTableViewNamedColumnWidth( m_controlRef , column , width );
}
-OSStatus wxMacDataBrowserControl::GetDefaultColumnWidth( UInt16 *width ) const
+OSStatus wxMacDataBrowserControl::GetDefaultColumnWidth( UInt16 *width ) const
{
return GetDataBrowserTableViewColumnWidth( m_controlRef , width );
}
-OSStatus wxMacDataBrowserControl::SetDefaultColumnWidth( UInt16 width )
+OSStatus wxMacDataBrowserControl::SetDefaultColumnWidth( UInt16 width )
{
return SetDataBrowserTableViewColumnWidth( m_controlRef , width );
}
-OSStatus wxMacDataBrowserControl::GetColumnCount(UInt32* numColumns) const
+OSStatus wxMacDataBrowserControl::GetColumnCount(UInt32* numColumns) const
{
return GetDataBrowserTableViewColumnCount( m_controlRef, numColumns);
}
-OSStatus wxMacDataBrowserControl::GetColumnPosition( DataBrowserPropertyID column,
+OSStatus wxMacDataBrowserControl::GetColumnPosition( DataBrowserPropertyID column,
UInt32 *position) const
{
return GetDataBrowserTableViewColumnPosition( m_controlRef , column , position);
}
-OSStatus wxMacDataBrowserControl::SetColumnPosition( DataBrowserPropertyID column, UInt32 position)
+OSStatus wxMacDataBrowserControl::SetColumnPosition( DataBrowserPropertyID column, UInt32 position)
{
return SetDataBrowserTableViewColumnPosition( m_controlRef , column , position);
}
-OSStatus wxMacDataBrowserControl::GetScrollPosition( UInt32 *top , UInt32 *left ) const
+OSStatus wxMacDataBrowserControl::GetScrollPosition( UInt32 *top , UInt32 *left ) const
{
return GetDataBrowserScrollPosition( m_controlRef , top , left );
}
-OSStatus wxMacDataBrowserControl::SetScrollPosition( UInt32 top , UInt32 left )
+OSStatus wxMacDataBrowserControl::SetScrollPosition( UInt32 top , UInt32 left )
{
return SetDataBrowserScrollPosition( m_controlRef , top , left );
}
-OSStatus wxMacDataBrowserControl::GetSortProperty( DataBrowserPropertyID *column ) const
+OSStatus wxMacDataBrowserControl::GetSortProperty( DataBrowserPropertyID *column ) const
{
return GetDataBrowserSortProperty( m_controlRef , column );
}
-OSStatus wxMacDataBrowserControl::SetSortProperty( DataBrowserPropertyID column )
+OSStatus wxMacDataBrowserControl::SetSortProperty( DataBrowserPropertyID column )
{
return SetDataBrowserSortProperty( m_controlRef , column );
}
-
-OSStatus wxMacDataBrowserControl::GetSortOrder( DataBrowserSortOrder *order ) const
+
+OSStatus wxMacDataBrowserControl::GetSortOrder( DataBrowserSortOrder *order ) const
{
return GetDataBrowserSortOrder( m_controlRef , order );
}
-OSStatus wxMacDataBrowserControl::SetSortOrder( DataBrowserSortOrder order )
+OSStatus wxMacDataBrowserControl::SetSortOrder( DataBrowserSortOrder order )
{
return SetDataBrowserSortOrder( m_controlRef , order );
}
-OSStatus wxMacDataBrowserControl::GetPropertyFlags( DataBrowserPropertyID property,
- DataBrowserPropertyFlags *flags ) const
+OSStatus wxMacDataBrowserControl::GetPropertyFlags( DataBrowserPropertyID property,
+ DataBrowserPropertyFlags *flags ) const
{
return GetDataBrowserPropertyFlags( m_controlRef , property , flags );
}
-OSStatus wxMacDataBrowserControl::SetPropertyFlags( DataBrowserPropertyID property,
- DataBrowserPropertyFlags flags )
+OSStatus wxMacDataBrowserControl::SetPropertyFlags( DataBrowserPropertyID property,
+ DataBrowserPropertyFlags flags )
{
return SetDataBrowserPropertyFlags( m_controlRef , property , flags );
}
-OSStatus wxMacDataBrowserControl::GetHeaderDesc( DataBrowserPropertyID property,
- DataBrowserListViewHeaderDesc *desc ) const
+OSStatus wxMacDataBrowserControl::GetHeaderDesc( DataBrowserPropertyID property,
+ DataBrowserListViewHeaderDesc *desc ) const
{
return GetDataBrowserListViewHeaderDesc( m_controlRef , property , desc );
}
-OSStatus wxMacDataBrowserControl::SetHeaderDesc( DataBrowserPropertyID property,
- DataBrowserListViewHeaderDesc *desc )
+OSStatus wxMacDataBrowserControl::SetHeaderDesc( DataBrowserPropertyID property,
+ DataBrowserListViewHeaderDesc *desc )
{
- return SetDataBrowserListViewHeaderDesc( m_controlRef , property , desc );
+ return SetDataBrowserListViewHeaderDesc( m_controlRef , property , desc );
}
-OSStatus wxMacDataBrowserControl::SetDisclosureColumn( DataBrowserPropertyID property ,
- Boolean expandableRows )
+OSStatus wxMacDataBrowserControl::SetDisclosureColumn( DataBrowserPropertyID property ,
+ Boolean expandableRows )
{
return SetDataBrowserListViewDisclosureColumn( m_controlRef, property, expandableRows);
}
// ============================================================================
-// Higher-level Databrowser
+// Higher-level Databrowser
// ============================================================================
//
// basing on data item objects
//
wxMacDataItem::wxMacDataItem()
-{
+{
}
-wxMacDataItem::~wxMacDataItem()
-{
+wxMacDataItem::~wxMacDataItem()
+{
}
-
-bool wxMacDataItem::IsLessThan(wxMacDataItemBrowserControl *owner ,
- const wxMacDataItem*,
+
+bool wxMacDataItem::IsLessThan(wxMacDataItemBrowserControl *owner ,
+ const wxMacDataItem*,
DataBrowserPropertyID property) const
{
return false;
}
-OSStatus wxMacDataItem::GetSetData(wxMacDataItemBrowserControl *owner ,
+OSStatus wxMacDataItem::GetSetData(wxMacDataItemBrowserControl *owner ,
DataBrowserPropertyID property,
DataBrowserItemDataRef itemData,
- bool changeValue )
+ bool changeValue )
{
return errDataBrowserPropertyNotSupported;
}
-void wxMacDataItem::Notification(wxMacDataItemBrowserControl *owner ,
+void wxMacDataItem::Notification(wxMacDataItemBrowserControl *owner ,
DataBrowserItemNotification message,
DataBrowserItemDataRef itemData ) const
{
}
-wxMacDataItemBrowserControl::wxMacDataItemBrowserControl( wxWindow* peer , const wxPoint& pos, const wxSize& size, long style) :
+wxMacDataItemBrowserControl::wxMacDataItemBrowserControl( wxWindow* peer , const wxPoint& pos, const wxSize& size, long style) :
wxMacDataBrowserControl( peer, pos, size, style )
-{
+{
m_suppressSelection = false;
}
-
-wxMacDataItemBrowserSelectionSuppressor::wxMacDataItemBrowserSelectionSuppressor(wxMacDataItemBrowserControl *browser)
+
+wxMacDataItemBrowserSelectionSuppressor::wxMacDataItemBrowserSelectionSuppressor(wxMacDataItemBrowserControl *browser)
{
m_former = browser->SuppressSelection(true);
m_browser = browser;
return former;
}
-Boolean wxMacDataItemBrowserControl::CompareItems(DataBrowserItemID itemOneID,
- DataBrowserItemID itemTwoID,
- DataBrowserPropertyID sortProperty)
+Boolean wxMacDataItemBrowserControl::CompareItems(DataBrowserItemID itemOneID,
+ DataBrowserItemID itemTwoID,
+ DataBrowserPropertyID sortProperty)
{
wxMacDataItem* itemOne = (wxMacDataItem*) itemOneID;
wxMacDataItem* itemTwo = (wxMacDataItem*) itemTwoID;
return CompareItems( itemOne , itemTwo , sortProperty );
}
-Boolean wxMacDataItemBrowserControl::CompareItems(const wxMacDataItem* itemOne,
- const wxMacDataItem* itemTwo,
- DataBrowserPropertyID sortProperty)
+Boolean wxMacDataItemBrowserControl::CompareItems(const wxMacDataItem* itemOne,
+ const wxMacDataItem* itemTwo,
+ DataBrowserPropertyID sortProperty)
{
Boolean retval = false;
if ( itemOne != NULL )
DataBrowserItemID itemID,
DataBrowserPropertyID property,
DataBrowserItemDataRef itemData,
- Boolean changeValue )
+ Boolean changeValue )
{
wxMacDataItem* item = (wxMacDataItem*) itemID;
return GetSetItemData(item, property, itemData , changeValue );
wxMacDataItem* item,
DataBrowserPropertyID property,
DataBrowserItemDataRef itemData,
- Boolean changeValue )
+ Boolean changeValue )
{
OSStatus err = errDataBrowserPropertyNotSupported;
switch( property )
if ( item != NULL )
err = item->GetSetData( this, property , itemData , changeValue );
break;
-
+
}
return err;
}
void wxMacDataItemBrowserControl::ItemNotification(
DataBrowserItemID itemID,
DataBrowserItemNotification message,
- DataBrowserItemDataRef itemData)
+ DataBrowserItemDataRef itemData)
{
- wxMacDataItem* item = (wxMacDataItem*) itemID;
+ wxMacDataItem* item = (wxMacDataItem*) itemID;
ItemNotification( item , message, itemData);
}
void wxMacDataItemBrowserControl::ItemNotification(
const wxMacDataItem* item,
DataBrowserItemNotification message,
- DataBrowserItemDataRef itemData)
+ DataBrowserItemDataRef itemData)
{
if (item != NULL)
item->Notification( this, message, itemData);
}
-unsigned int wxMacDataItemBrowserControl::GetItemCount(const wxMacDataItem* container,
- bool recurse , DataBrowserItemState state) const
+unsigned int wxMacDataItemBrowserControl::GetItemCount(const wxMacDataItem* container,
+ bool recurse , DataBrowserItemState state) const
{
UInt32 numItems = 0;
- verify_noerr( wxMacDataBrowserControl::GetItemCount( (DataBrowserItemID)container,
- recurse, state, &numItems ) );
+ verify_noerr( wxMacDataBrowserControl::GetItemCount( (DataBrowserItemID)container,
+ recurse, state, &numItems ) );
return numItems;
}
-void wxMacDataItemBrowserControl::GetItems(const wxMacDataItem* container,
- bool recurse , DataBrowserItemState state, wxArrayMacDataItemPtr &items) const
+void wxMacDataItemBrowserControl::GetItems(const wxMacDataItem* container,
+ bool recurse , DataBrowserItemState state, wxArrayMacDataItemPtr &items) const
{
Handle handle = NewHandle(0);
- verify_noerr( wxMacDataBrowserControl::GetItems( (DataBrowserItemID)container ,
- recurse , state, handle) );
+ verify_noerr( wxMacDataBrowserControl::GetItems( (DataBrowserItemID)container ,
+ recurse , state, handle) );
int itemCount = GetHandleSize(handle)/sizeof(DataBrowserItemID);
HLock( handle );
DataBrowserItemID id;
OSStatus err = GetItemID( (DataBrowserTableViewRowIndex) n , &id);
wxASSERT( err == noErr);
- return (wxMacDataItem*) id;
+ return (wxMacDataItem*) id;
}
-void wxMacDataItemBrowserControl::UpdateItem(const wxMacDataItem *container,
+void wxMacDataItemBrowserControl::UpdateItem(const wxMacDataItem *container,
const wxMacDataItem *item , DataBrowserPropertyID property) const
{
- verify_noerr( wxMacDataBrowserControl::UpdateItems((DataBrowserItemID)container, 1,
+ verify_noerr( wxMacDataBrowserControl::UpdateItems((DataBrowserItemID)container, 1,
(DataBrowserItemID*) &item, kDataBrowserItemNoProperty /* notSorted */, property ) );
}
-void wxMacDataItemBrowserControl::UpdateItems(const wxMacDataItem *container,
+void wxMacDataItemBrowserControl::UpdateItems(const wxMacDataItem *container,
wxArrayMacDataItemPtr &itemArray , DataBrowserPropertyID property) const
{
unsigned int noItems = itemArray.GetCount();
for ( unsigned int i = 0; i < noItems; ++i )
items[i] = (DataBrowserItemID) itemArray[i];
- verify_noerr( wxMacDataBrowserControl::UpdateItems((DataBrowserItemID)container, noItems,
+ verify_noerr( wxMacDataBrowserControl::UpdateItems((DataBrowserItemID)container, noItems,
items, kDataBrowserItemNoProperty /* notSorted */, property ) );
delete [] items;
}
void wxMacDataItemBrowserControl::AddItem(wxMacDataItem *container, wxMacDataItem *item)
{
- verify_noerr( wxMacDataBrowserControl::AddItems( (DataBrowserItemID)container, 1,
+ verify_noerr( wxMacDataBrowserControl::AddItems( (DataBrowserItemID)container, 1,
(DataBrowserItemID*) &item, kDataBrowserItemNoProperty ) );
}
-void wxMacDataItemBrowserControl::AddItems(wxMacDataItem *container, wxArrayMacDataItemPtr &itemArray )
+void wxMacDataItemBrowserControl::AddItems(wxMacDataItem *container, wxArrayMacDataItemPtr &itemArray )
{
unsigned int noItems = itemArray.GetCount();
DataBrowserItemID *items = new DataBrowserItemID[noItems];
for ( unsigned int i = 0; i < noItems; ++i )
items[i] = (DataBrowserItemID) itemArray[i];
- verify_noerr( wxMacDataBrowserControl::AddItems( (DataBrowserItemID)container, noItems,
+ verify_noerr( wxMacDataBrowserControl::AddItems( (DataBrowserItemID)container, noItems,
(DataBrowserItemID*) items, kDataBrowserItemNoProperty ) );
delete [] items;
}
-void wxMacDataItemBrowserControl::RemoveItem(wxMacDataItem *container, wxMacDataItem* item)
+void wxMacDataItemBrowserControl::RemoveItem(wxMacDataItem *container, wxMacDataItem* item)
{
- OSStatus err = wxMacDataBrowserControl::RemoveItems( (DataBrowserItemID)container, 1,
+ OSStatus err = wxMacDataBrowserControl::RemoveItems( (DataBrowserItemID)container, 1,
(UInt32*) &item, kDataBrowserItemNoProperty );
verify_noerr( err );
}
-void wxMacDataItemBrowserControl::RemoveItems(wxMacDataItem *container, wxArrayMacDataItemPtr &itemArray)
+void wxMacDataItemBrowserControl::RemoveItems(wxMacDataItem *container, wxArrayMacDataItemPtr &itemArray)
{
unsigned int noItems = itemArray.GetCount();
DataBrowserItemID *items = new DataBrowserItemID[noItems];
for ( unsigned int i = 0; i < noItems; ++i )
items[i] = (DataBrowserItemID) itemArray[i];
- OSStatus err = wxMacDataBrowserControl::RemoveItems( (DataBrowserItemID)container, noItems,
+ OSStatus err = wxMacDataBrowserControl::RemoveItems( (DataBrowserItemID)container, noItems,
(UInt32*) items, kDataBrowserItemNoProperty );
verify_noerr( err );
delete [] items;
}
-void wxMacDataItemBrowserControl::RemoveAllItems(wxMacDataItem *container)
+void wxMacDataItemBrowserControl::RemoveAllItems(wxMacDataItem *container)
{
OSStatus err = wxMacDataBrowserControl::RemoveItems( (DataBrowserItemID)container, 0 , NULL , kDataBrowserItemNoProperty );
verify_noerr( err );
}
-void wxMacDataItemBrowserControl::SetSelectedItem(wxMacDataItem* item , DataBrowserSetOption option)
+void wxMacDataItemBrowserControl::SetSelectedItem(wxMacDataItem* item , DataBrowserSetOption option)
{
verify_noerr(wxMacDataBrowserControl::SetSelectedItems( 1, (DataBrowserItemID*) &item, option ));
}
-void wxMacDataItemBrowserControl::SetSelectedAllItems(DataBrowserSetOption option)
+void wxMacDataItemBrowserControl::SetSelectedAllItems(DataBrowserSetOption option)
{
verify_noerr(wxMacDataBrowserControl::SetSelectedItems( 0 , NULL , option ));
}
-void wxMacDataItemBrowserControl::SetSelectedItems(wxArrayMacDataItemPtr &itemArray , DataBrowserSetOption option)
+void wxMacDataItemBrowserControl::SetSelectedItems(wxArrayMacDataItemPtr &itemArray , DataBrowserSetOption option)
{
unsigned int noItems = itemArray.GetCount();
DataBrowserItemID *items = new DataBrowserItemID[noItems];
return wxMacDataBrowserControl::IsItemSelected( (DataBrowserItemID) item);
}
-void wxMacDataItemBrowserControl::RevealItem( wxMacDataItem* item, DataBrowserRevealOptions options)
+void wxMacDataItemBrowserControl::RevealItem( wxMacDataItem* item, DataBrowserRevealOptions options)
{
verify_noerr(wxMacDataBrowserControl::RevealItem( (DataBrowserItemID) item, kDataBrowserNoItem , options ) );
}
-void wxMacDataItemBrowserControl::GetSelectionAnchor( wxMacDataItemPtr* first , wxMacDataItemPtr* last) const
+void wxMacDataItemBrowserControl::GetSelectionAnchor( wxMacDataItemPtr* first , wxMacDataItemPtr* last) const
{
- verify_noerr(wxMacDataBrowserControl::GetSelectionAnchor( (DataBrowserItemID*) first, (DataBrowserItemID*) last) );
+ verify_noerr(wxMacDataBrowserControl::GetSelectionAnchor( (DataBrowserItemID*) first, (DataBrowserItemID*) last) );
}
-
+
//
// Tab Control
wxASSERT_MSG( genericRGBColorSpace != NULL, wxT("couldn't create the generic RGB color space") );
// we opened the profile so it is up to us to close it
- CMCloseProfile(genericRGBProfile);
+ CMCloseProfile(genericRGBProfile);
}
}
}
#pragma hdrstop
#endif
+#include "wx/app.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/window.h"
#include "wx/frame.h"
#include "wx/button.h"
-#include "wx/app.h"
#include "wx/utils.h"
#include "wx/gdicmn.h"
#include "wx/pen.h"
#include "wx/brush.h"
#include "wx/cursor.h"
-#include "wx/intl.h"
#include "wx/icon.h"
#include "wx/palette.h"
#include "wx/dc.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: clipbrd.cpp
+// Name: src/mac/classic/clipbrd.cpp
// Purpose: Clipboard functionality
// Author: Stefan Csomor
// Modified by:
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#include "wx/wxprec.h"
+
+#include "wx/clipbrd.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/app.h"
#include "wx/frame.h"
#include "wx/bitmap.h"
#include "wx/utils.h"
#include "wx/metafile.h"
-#include "wx/clipbrd.h"
-#include "wx/intl.h"
#include "wx/log.h"
#ifndef __DARWIN__
size_t sz = data->GetDataSize( array[i] ) ;
void* buf = malloc( sz + 1 ) ;
if ( buf )
- {
+ {
data->GetDataHere( array[i] , buf ) ;
OSType mactype = 0 ;
switch ( array[i].GetType() )
wxCHECK_RET( m_open, wxT("clipboard not open") );
m_open = false ;
-
- // Get rid of cached object. If this is not done copying from another application will
- // only work once
+
+ // Get rid of cached object. If this is not done copying from another application will
+ // only work once
if (m_data)
{
delete m_data;
m_data = (wxDataObject*) NULL;
- }
-
+ }
+
}
bool wxClipboard::IsSupported( const wxDataFormat &dataFormat )
#pragma hdrstop
#endif
+#include "wx/filedlg.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/dialog.h"
-#include "wx/filedlg.h"
-#include "wx/intl.h"
#include "wx/tokenzr.h"
#include "wx/filename.h"
#pragma hdrstop
#endif
+#include "wx/mac/mimetype.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/string.h"
+ #include "wx/intl.h"
#if wxUSE_GUI
#include "wx/icon.h"
#endif
#include "wx/log.h"
#include "wx/file.h"
-#include "wx/intl.h"
#include "wx/confbase.h"
-#include "wx/mac/mimetype.h"
-
// other standard headers
#include <ctype.h>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#include "wx/app.h"
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
#include "wx/msgdlg.h"
-#include "wx/intl.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
+#include "wx/app.h"
#include "wx/mac/uma.h"
IMPLEMENT_CLASS(wxMessageDialog, wxDialog)
return resultbutton ;
}
-
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#include "wx/utils.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/app.h"
#include "wx/apptrait.h"
#if wxUSE_GUI
#include "wx/mac/uma.h"
#include "wx/font.h"
-#else
- #include "wx/intl.h"
#endif
#include <ctype.h>
void wxMacConvertNewlines13To10( wxString * data )
{
- size_t len = data->Length() ;
+ size_t len = data->length() ;
if ( len == 0 || wxStrchr(data->c_str(),0x0d)==NULL)
return ;
void wxMacConvertNewlines10To13( wxString * data )
{
- size_t len = data->Length() ;
+ size_t len = data->length() ;
- if ( data->Length() == 0 || wxStrchr(data->c_str(),0x0a)==NULL)
+ if ( data->empty() || wxStrchr(data->c_str(),0x0a)==NULL)
return ;
wxString temp(*data) ;
#endif
#include "wx/bitmap.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/icon.h"
#include "wx/filefn.h"
#include "wx/image.h"
#include "wx/dcmemory.h"
#include "wx/utils.h"
#include "wx/log.h"
-#include "wx/intl.h"
#include "wx/image.h"
#include "wx/xpmdecod.h"
#endif
#include "wx/cursor.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/module.h"
#include "wx/utils.h"
#include "wx/log.h"
-#include "wx/intl.h"
#include "wx/hashmap.h"
#include "wx/mgl/private.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/intl.h"
#endif
-#include "wx/intl.h"
#include "wx/apptrait.h"
#include "wx/log.h"
#include "wx/process.h"
#pragma hdrstop
#endif
+#include "wx/window.h"
+
#ifndef WX_PRECOMP
- #include "wx/window.h"
#include "wx/msgdlg.h"
#include "wx/accel.h"
#include "wx/dc.h"
#include "wx/utils.h"
#include "wx/app.h"
#include "wx/panel.h"
+ #include "wx/intl.h"
#endif
#if wxUSE_DRAG_AND_DROP
#include "wx/log.h"
#include "wx/sysopt.h"
#include "wx/mgl/private.h"
-#include "wx/intl.h"
#include "wx/dcscreen.h"
#include "wx/caret.h"
#define XtDisplay XTDISPLAY
#endif
+#include "wx/app.h"
+
#ifndef WX_PRECOMP
#include "wx/hash.h"
+ #include "wx/intl.h"
#endif
-#include "wx/app.h"
#include "wx/utils.h"
#include "wx/module.h"
#include "wx/memory.h"
#include "wx/log.h"
-#include "wx/intl.h"
#include "wx/evtloop.h"
#if wxUSE_THREADS
#if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/window.h"
#include "wx/app.h"
#include "wx/gdicmn.h"
-#include "wx/intl.h"
#include "wx/utils.h"
#include "wx/log.h"
#define XtWindow XTWINDOW
#endif
-#include "wx/utils.h"
#include "wx/filedlg.h"
-#include "wx/intl.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
+#include "wx/utils.h"
#include "wx/app.h"
#include "wx/settings.h"
#include "wx/tokenzr.h"
#pragma message enable nosimpint
#endif
-#include "wx/app.h"
-#include "wx/intl.h"
#include "wx/msgdlg.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
+#include "wx/app.h"
#include "wx/motif/private.h"
#include "wx/settings.h"
#if wxUSE_MIMETYPE
+#include "wx/msdos/mimetype.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/string.h"
+ #include "wx/intl.h"
#if wxUSE_GUI
#include "wx/icon.h"
#endif
#include "wx/log.h"
#include "wx/file.h"
-#include "wx/intl.h"
#include "wx/confbase.h"
-#include "wx/msdos/mimetype.h"
-
// other standard headers
#include <ctype.h>
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/intl.h"
#endif
-#include "wx/intl.h"
#include "wx/apptrait.h"
#include "wx/log.h"
#include "wx/process.h"
#pragma hdrstop
#endif
+#if wxUSE_WXDIB
+
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/log.h"
+ #include "wx/intl.h"
#endif //WX_PRECOMP
-#if wxUSE_WXDIB
-
#include "wx/bitmap.h"
-#include "wx/intl.h"
#include "wx/file.h"
#include <stdio.h>
#endif // wxUSE_IMAGE
#endif // wxUSE_WXDIB
-
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_DRAGIMAGE
#ifndef WX_PRECOMP
-#include <stdio.h>
-#include "wx/window.h"
-#include "wx/dcclient.h"
-#include "wx/dcscreen.h"
-#include "wx/dcmemory.h"
-#include "wx/settings.h"
+ #include <stdio.h>
+ #include "wx/window.h"
+ #include "wx/dcclient.h"
+ #include "wx/dcscreen.h"
+ #include "wx/dcmemory.h"
+ #include "wx/settings.h"
+ #include "wx/intl.h"
#endif
#include "wx/msw/private.h"
#include "wx/log.h"
-#include "wx/intl.h"
#include "wx/frame.h"
#include "wx/image.h"
if (!m_hCursorImageList)
{
#ifndef SM_CXCURSOR
- // Smartphone may not have these metric symbol
- int cxCursor = 16;
+ // Smartphone may not have these metric symbol
+ int cxCursor = 16;
int cyCursor = 16;
#else
int cxCursor = ::GetSystemMetrics(SM_CXCURSOR);
#include "wx/dc.h"
#include "wx/string.h"
#include "wx/dcmemory.h"
+ #include "wx/intl.h"
#include <stdio.h>
#endif
#include "wx/log.h"
-#include "wx/intl.h"
#include "wx/image.h"
#include "wx/msw/imaglist.h"
#if wxUSE_MIMETYPE
+#include "wx/msw/mimetype.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/string.h"
+ #include "wx/intl.h"
#if wxUSE_GUI
#include "wx/icon.h"
#include "wx/msgdlg.h"
#include "wx/log.h"
#include "wx/file.h"
#include "wx/iconloc.h"
-#include "wx/intl.h"
#include "wx/confbase.h"
#ifdef __WXMSW__
#include "wx/msw/private.h"
#endif // OS
-#include "wx/msw/mimetype.h"
-
// other standard headers
#include <ctype.h>
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/intl.h"
#endif
-#include "wx/intl.h"
#include "wx/log.h"
#include "wx/file.h"
#include "wx/wfstream.h"
#pragma hdrstop
#endif
+#if wxUSE_STATUSBAR && wxUSE_NATIVE_STATUSBAR
+
+#include "wx/statusbr.h"
+
#ifndef WX_PRECOMP
- #include "wx/frame.h"
- #include "wx/settings.h"
- #include "wx/dcclient.h"
+ #include "wx/frame.h"
+ #include "wx/settings.h"
+ #include "wx/dcclient.h"
+ #include "wx/intl.h"
#endif
-#if wxUSE_STATUSBAR && wxUSE_NATIVE_STATUSBAR
-
-#include "wx/intl.h"
#include "wx/log.h"
-#include "wx/statusbr.h"
#include "wx/msw/private.h"
#include <windowsx.h>
#include "wx/settings.h"
#include "wx/statbox.h"
#include "wx/sizer.h"
+ #include "wx/intl.h"
#endif
#if wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
#include "wx/spinctrl.h"
#endif // wxUSE_SPINCTRL
-#include "wx/intl.h"
#include "wx/log.h"
#include "wx/textctrl.h"
#if wxUSE_MIMETYPE
+#include "wx/os2/mimetype.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/string.h"
+ #include "wx/intl.h"
#if wxUSE_GUI
#include "wx/icon.h"
#endif
#include "wx/log.h"
#include "wx/file.h"
#include "wx/iconloc.h"
-#include "wx/intl.h"
#include "wx/confbase.h"
-#include "wx/os2/mimetype.h"
-
// other standard headers
#include <ctype.h>
// Created: 04/22/98
// RCS-ID: $Id$
// Copyright: (c) Stefan Neis (2003)
-//
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#if wxUSE_THREADS
-#include <stdio.h>
+#include "wx/thread.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif //WX_PRECOMP
#include "wx/app.h"
#include "wx/apptrait.h"
#include "wx/module.h"
-#include "wx/intl.h"
#include "wx/utils.h"
#include "wx/log.h"
-#include "wx/thread.h"
+
+#include <stdio.h>
#define INCL_DOSSEMAPHORES
#define INCL_DOSPROCESS
#include "wx/window.h"
#include "wx/event.h"
#include "wx/app.h"
+ #include "wx/intl.h"
#endif
#include "wx/os2/private.h"
-#include "wx/intl.h"
#include "wx/log.h"
#include "wx/timer.h"
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/app.h"
+ #include "wx/intl.h"
#endif //WX_PRECOMP
#include "wx/os2/private.h"
-#include "wx/intl.h"
#include "wx/apptrait.h"
#include <ctype.h>
#include "wx/statusbr.h"
#include "wx/toolbar.h"
#include "wx/settings.h"
+ #include "wx/intl.h"
#include <stdio.h>
#endif
#include "wx/caret.h"
#endif // wxUSE_CARET
-#include "wx/intl.h"
#include "wx/log.h"
#pragma hdrstop
#endif
-#ifndef WX_PRECOMP
-#endif
-
#if wxUSE_DATEPICKCTRL
#include "wx/datectrl.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/app.h"
-#include "wx/intl.h"
#include "wx/dynlib.h"
#define _WX_DEFINE_DATE_EVENTS_
}
#endif // wxUSE_DATEPICKCTRL
-
#pragma hdrstop
#endif
+#if wxUSE_WXDIB
+
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/log.h"
+ #include "wx/intl.h"
#endif //WX_PRECOMP
-#if wxUSE_WXDIB
-
#include "wx/bitmap.h"
-#include "wx/intl.h"
#include "wx/file.h"
#include "wx/image.h"
#endif // wxUSE_IMAGE
#endif // wxUSE_WXDIB
-
#if wxUSE_DRAGIMAGE
#ifndef WX_PRECOMP
-#include <stdio.h>
-#include "wx/window.h"
-#include "wx/dcclient.h"
-#include "wx/dcscreen.h"
-#include "wx/dcmemory.h"
-#include "wx/settings.h"
+ #include <stdio.h>
+ #include "wx/window.h"
+ #include "wx/dcclient.h"
+ #include "wx/dcscreen.h"
+ #include "wx/dcmemory.h"
+ #include "wx/settings.h"
+ #include "wx/intl.h"
#endif
#include "wx/log.h"
-#include "wx/intl.h"
#include "wx/frame.h"
#include "wx/image.h"
#include "wx/dc.h"
#include "wx/string.h"
#include "wx/dcmemory.h"
+ #include "wx/intl.h"
#endif
#include "wx/log.h"
-#include "wx/intl.h"
#include "wx/palmos/imaglist.h"
#include "wx/palmos/private.h"
{
return false;
}
-
#pragma hdrstop
#endif
+#if wxUSE_NATIVE_STATUSBAR
+
+#include "wx/statusbr.h"
+
#ifndef WX_PRECOMP
#include "wx/frame.h"
#include "wx/settings.h"
#include "wx/dcclient.h"
+ #include "wx/intl.h"
#endif
-#if wxUSE_NATIVE_STATUSBAR
-
-#include "wx/intl.h"
#include "wx/log.h"
-#include "wx/statusbr.h"
#include <StatusBar.h>
#include "wx/msgdlg.h"
#include "wx/settings.h"
#include "wx/statbox.h"
+ #include "wx/intl.h"
#endif
#if wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
#include "wx/spinctrl.h"
#endif // wxUSE_SPINCTRL
-#include "wx/intl.h"
#include "wx/log.h"
#include "wx/textctrl.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: richtext/richtextxml.cpp
+// Name: src/richtext/richtextxml.cpp
// Purpose: XML and HTML I/O for wxRichTextCtrl
// Author: Julian Smart
// Modified by:
#include "wx/richtext/richtextxml.h"
#ifndef WX_PRECOMP
- #include "wx/wx.h"
+ #include "wx/wx.h"
+ #include "wx/intl.h"
#endif
#include "wx/filename.h"
#include "wx/module.h"
#include "wx/txtstrm.h"
#include "wx/xml/xml.h"
-#include "wx/intl.h"
IMPLEMENT_DYNAMIC_CLASS(wxRichTextXMLHandler, wxRichTextFileHandler)
wxString text2 = textChild->GetContent();
// Strip whitespace from end
- if (text2.Length() > 0 && text2[text2.Length()-1] == wxT('\n'))
- text2 = text2.Mid(0, text2.Length()-1);
+ if (!text2.empty() && text2[text2.length()-1] == wxT('\n'))
+ text2 = text2.Mid(0, text2.length()-1);
- if (text2.Length() > 0 && text2[0] == wxT('"'))
+ if (!text2.empty() && text2[0] == wxT('"'))
text2 = text2.Mid(1);
- if (text2.Length() > 0 && text2[text2.Length()-1] == wxT('"'))
- text2 = text2.Mid(0, text2.Length() - 1);
+ if (!text2.empty() && text2[text2.length()-1] == wxT('"'))
+ text2 = text2.Mid(0, text2.length() - 1);
text += text2;
}
wxStringInputStream strStream(data);
- imageObj->GetImageBlock().ReadHex(strStream, data.Length(), imageType);
+ imageObj->GetImageBlock().ReadHex(strStream, data.length(), imageType);
}
}
child = child->GetNext();
for (i = 0; i < len; i++)
{
c = str.GetChar(i);
-
+
// Original code excluded "&" but we _do_ want to convert
// the ampersand beginning & because otherwise when read in,
// the original "&" becomes "&".
#endif
// If SetEncoding has been called, change the output encoding.
- if (!m_encoding.IsEmpty() && m_encoding.Lower() != fileEncoding.Lower())
+ if (!m_encoding.empty() && m_encoding.Lower() != fileEncoding.Lower())
{
if (m_encoding == wxT("<System>"))
{
}
// GetSystemEncodingName may not have returned a name
- if (fileEncoding.IsEmpty())
+ if (fileEncoding.empty())
#if wxUSE_UNICODE
fileEncoding = wxT("UTF-8");
#else
if (deleteConvFile)
delete convFile;
-
+
return success;
}
OutputString(stream, style + wxT(">"), convMem, convFile);
wxString str = text.GetText();
- if (str.Length() > 0 && (str[0] == wxT(' ') || str[str.Length()-1] == wxT(' ')))
+ if (!str.empty() && (str[0] == wxT(' ') || str[str.length()-1] == wxT(' ')))
{
OutputString(stream, wxT("\""), convMem, convFile);
OutputStringEnt(stream, str, convMem, convFile);
#endif
// wxUSE_STREAMS
-
+
#endif
// wxUSE_RICHTEXT && wxUSE_XML
#if wxUSE_DIALUP_MANAGER
+#include "wx/dialup.h"
+
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/intl.h"
#endif // !PCH
#include "wx/event.h"
-#include "wx/dialup.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/intl.h"
#include "wx/app.h"
#include "wx/wxchar.h"
#if wxUSE_DISPLAY
+#include "wx/display.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/gdicmn.h"
#include "wx/string.h"
#include "wx/utils.h"
+ #include "wx/intl.h"
#endif /* WX_PRECOMP */
-#include "wx/display.h"
#include "wx/display_impl.h"
-#include "wx/intl.h"
#include "wx/log.h"
/* These must be included after the wx files. Otherwise the Data macro in
#if wxUSE_MIMETYPE && wxUSE_FILE && wxUSE_TEXTFILE
+#include "wx/unix/mimetype.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/string.h"
+ #include "wx/intl.h"
#endif
#include "wx/log.h"
#include "wx/file.h"
-#include "wx/intl.h"
#include "wx/confbase.h"
#include "wx/ffile.h"
#include "wx/iconloc.h"
#include "wx/filename.h"
-#include "wx/unix/mimetype.h"
-
#if wxUSE_LIBGNOMEVFS
// Not GUI dependent
#include "wx/gtk/gnome/gvfs.h"
#if wxUSE_THREADS
+#include "wx/thread.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
+ #include "wx/intl.h"
#endif
-#include "wx/thread.h"
#include "wx/module.h"
#include "wx/utils.h"
#include "wx/log.h"
-#include "wx/intl.h"
#include "wx/timer.h"
#include "wx/stopwatch.h"
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#include "wx/utils.h"
+
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/intl.h"
#endif
-#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
#include "wx/apptrait.h"
-#include "wx/utils.h"
#include "wx/process.h"
#include "wx/thread.h"
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#include "wx/app.h"
+
#ifndef WX_PRECOMP
#include "wx/hash.h"
+ #include "wx/intl.h"
#endif
#include "wx/frame.h"
-#include "wx/app.h"
#include "wx/utils.h"
#include "wx/gdicmn.h"
#include "wx/icon.h"
#include "wx/module.h"
#include "wx/memory.h"
#include "wx/log.h"
-#include "wx/intl.h"
#include "wx/evtloop.h"
#include "wx/timer.h"
#include "wx/filename.h"
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/window.h"
#include "wx/app.h"
#include "wx/gdicmn.h"
-#include "wx/intl.h"
#include "wx/utils.h"
#include "wx/log.h"
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
#include "wx/textctrl.h"
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/utils.h"
-#include "wx/intl.h"
#include "wx/log.h"
#include "wx/settings.h"
#include "wx/panel.h"
#include "wx/xml/xml.h"
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/wfstream.h"
#include "wx/datstrm.h"
#include "wx/zstream.h"
#include "wx/log.h"
-#include "wx/intl.h"
#include "wx/strconv.h"
#include "expat.h" // from Expat
/////////////////////////////////////////////////////////////////////////////
-// Name: xh_chckl.cpp
+// Name: src/xrc/xh_chckl.cpp
// Purpose: XRC resource for wxCheckList
// Author: Bob Mitchell
// Created: 2000/03/21
#pragma hdrstop
#endif
-#if wxUSE_XRC
-
-#if wxUSE_CHECKLISTBOX
+#if wxUSE_XRC && wxUSE_CHECKLISTBOX
#include "wx/xrc/xh_chckl.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/checklst.h"
-#include "wx/intl.h"
#include "wx/log.h"
IMPLEMENT_DYNAMIC_CLASS(wxCheckListBoxXmlHandler, wxXmlResourceHandler)
XRC_ADD_STYLE(wxLB_ALWAYS_SB);
XRC_ADD_STYLE(wxLB_NEEDED_SB);
XRC_ADD_STYLE(wxLB_SORT);
-
+
AddWindowStyles();
}
(m_insideBox && node->GetName() == wxT("item")));
}
-#endif // wxUSE_CHECKLISTBOX
-
-#endif // wxUSE_XRC
+#endif // wxUSE_XRC && wxUSE_CHECKLISTBOX
/////////////////////////////////////////////////////////////////////////////
-// Name: xh_choic.cpp
+// Name: src/xrc/xh_choic.cpp
// Purpose: XRC resource for wxChoice
// Author: Bob Mitchell
// Created: 2000/03/21
#if wxUSE_XRC
#include "wx/xrc/xh_choic.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/choice.h"
-#include "wx/intl.h"
IMPLEMENT_DYNAMIC_CLASS(wxChoiceXmlHandler, wxXmlResourceHandler)
/////////////////////////////////////////////////////////////////////////////
-// Name: xh_combo.cpp
+// Name: src/xrc/xh_combo.cpp
// Purpose: XRC resource for wxRadioBox
// Author: Bob Mitchell
// Created: 2000/03/21
#if wxUSE_XRC && wxUSE_COMBOBOX
#include "wx/xrc/xh_combo.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/combobox.h"
-#include "wx/intl.h"
IMPLEMENT_DYNAMIC_CLASS(wxComboBoxXmlHandler, wxXmlResourceHandler)
#if wxUSE_XRC
#include "wx/xrc/xh_dlg.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/dialog.h"
#include "wx/frame.h"
#include "wx/log.h"
-#include "wx/intl.h"
IMPLEMENT_DYNAMIC_CLASS(wxDialogXmlHandler, wxXmlResourceHandler)
#if wxUSE_XRC
#include "wx/xrc/xh_frame.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/frame.h"
#include "wx/dialog.h" // to get wxDEFAULT_DIALOG_STYLE
#include "wx/log.h"
-#include "wx/intl.h"
IMPLEMENT_DYNAMIC_CLASS(wxFrameXmlHandler, wxXmlResourceHandler)
/////////////////////////////////////////////////////////////////////////////
-// Name: xh_listb.cpp
+// Name: src/xrc/xh_listb.cpp
// Purpose: XRC resource for wxListBox
// Author: Bob Mitchell & Vaclav Slavik
// Created: 2000/07/29
#if wxUSE_XRC
#include "wx/xrc/xh_listb.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/listbox.h"
-#include "wx/intl.h"
IMPLEMENT_DYNAMIC_CLASS(wxListBoxXmlHandler, wxXmlResourceHandler)
#if wxUSE_XRC && wxUSE_MDI
#include "wx/xrc/xh_mdi.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/mdi.h"
#include "wx/dialog.h" // to get wxDEFAULT_DIALOG_STYLE
#include "wx/log.h"
-#include "wx/intl.h"
IMPLEMENT_DYNAMIC_CLASS(wxMdiXmlHandler, wxXmlResourceHandler)
IsOfClass(node, wxT("wxMDIChildFrame")));
}
-#endif // wxUSE_XRC
+#endif // wxUSE_XRC && wxUSE_MDI
/////////////////////////////////////////////////////////////////////////////
-// Name: xh_radbx.cpp
+// Name: src/xrc/xh_radbx.cpp
// Purpose: XRC resource for wxRadioBox
// Author: Bob Mitchell
// Created: 2000/03/21
#if wxUSE_XRC && wxUSE_RADIOBOX
#include "wx/xrc/xh_radbx.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#include "wx/radiobox.h"
-#include "wx/intl.h"
IMPLEMENT_DYNAMIC_CLASS(wxRadioBoxXmlHandler, wxXmlResourceHandler)
/////////////////////////////////////////////////////////////////////////////
-// Name: xmlres.cpp
+// Name: src/xrc/xmlres.cpp
// Purpose: XRC resources
// Author: Vaclav Slavik
// Created: 2000/03/05
#if wxUSE_XRC
+#include "wx/xrc/xmlres.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+#endif
+
#ifndef __WXWINCE__
-#include <locale.h>
+ #include <locale.h>
#endif
#include "wx/dialog.h"
#include "wx/filesys.h"
#include "wx/filename.h"
#include "wx/log.h"
-#include "wx/intl.h"
#include "wx/tokenzr.h"
#include "wx/fontenum.h"
#include "wx/module.h"
#include "wx/settings.h"
#include "wx/xml/xml.h"
-#include "wx/xrc/xmlres.h"
#include "wx/arrimpl.cpp"
WX_DEFINE_OBJARRAY(wxXmlResourceDataRecords)
// find colour using HTML syntax (#RRGGBB)
unsigned long tmp = 0;
- if (v.Length() != 7 || v[0u] != wxT('#') ||
+ if (v.length() != 7 || v[0u] != wxT('#') ||
wxSscanf(v.c_str(), wxT("#%lX"), &tmp) != 1)
{
// the colour doesn't use #RRGGBB format, check if it is symbolic
bool is_dlg;
long sx, sy = 0;
- is_dlg = s[s.Length()-1] == wxT('d');
+ is_dlg = s[s.length()-1] == wxT('d');
if (is_dlg) s.RemoveLast();
if (!s.BeforeFirst(wxT(',')).ToLong(&sx) ||
bool is_dlg;
long sx;
- is_dlg = s[s.Length()-1] == wxT('d');
+ is_dlg = s[s.length()-1] == wxT('d');
if (is_dlg) s.RemoveLast();
if (!s.ToLong(&sx))