#pragma hdrstop
#endif
-#include "wx/defs.h"
#include "wx/cursor.h"
/* Current cursor, in order to hang on to
/////////////////////////////////////////////////////////////////////////////
-// Name: mgl/dir.cpp
+// Name: src/mgl/dir.cpp
// Purpose: wxDir implementation for MGL
// Author: Vaclav Slavik, Vadim Zeitlin
// Modified by:
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-// ============================================================================
-// declarations
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#pragma hdrstop
#endif
-#include "wx/defs.h"
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
#ifndef __UNIX__
}
#endif // !__UNIX__
-
/////////////////////////////////////////////////////////////////////////////
-// Name: src/unix/fontenum.cpp
+// Name: src/mgl/fontenum.cpp
// Purpose: wxFontEnumerator class for MGL
// Author: Vaclav Slavik
// RCS-ID: $Id$
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
// ============================================================================
// declarations
// ============================================================================
// headers
// ----------------------------------------------------------------------------
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-
-#include "wx/defs.h"
#include "wx/dynarray.h"
#include "wx/string.h"
#include "wx/utils.h"
bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
bool fixedWidthOnly)
{
- bool found = FALSE;
+ bool found = false;
wxMGLFontFamilyList *list = wxTheFontsManager->GetFamilyList();
wxMGLFontFamilyList::Node *node;
wxMGLFontFamily *f = NULL;
if ( encoding != wxFONTENCODING_SYSTEM )
wxGetNativeFontEncoding(encoding, &info);
-
+
for (node = list->GetFirst(); node; node = node->GetNext())
{
f = node->GetData();
if ( (!fixedWidthOnly || f->GetInfo()->isFixed) &&
(encoding == wxFONTENCODING_SYSTEM || wxTestFontEncoding(info)) )
{
- found = TRUE;
+ found = true;
if ( !OnFacename(f->GetName()) )
- return TRUE;
+ return true;
}
}
bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
{
- static wxFontEncoding encodings[] =
+ static wxFontEncoding encodings[] =
{
wxFONTENCODING_ISO8859_1,
wxFONTENCODING_ISO8859_2,
wxFONTENCODING_CP1256,
wxFONTENCODING_CP1257,
wxFONTENCODING_KOI8,
-
+
wxFONTENCODING_SYSTEM
};
-
- static const char *encodingNames[] =
+
+ static const char *encodingNames[] =
{
"iso88590-1",
"iso88590-2",
"koi-8",
NULL
};
-
+
wxNativeEncodingInfo info;
info.facename = family;
-
+
for (size_t i = 0; encodings[i] != wxFONTENCODING_SYSTEM; i++)
{
if ( !wxGetNativeFontEncoding(encodings[i], &info) ||
- !wxTestFontEncoding(info) )
+ !wxTestFontEncoding(info) )
continue;
if ( !OnFontEncoding(family, encodingNames[i]) )
break;
}
- return TRUE;
+ return true;
}
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
// ============================================================================
// declarations
// ============================================================================
// headers
// ----------------------------------------------------------------------------
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
#ifndef WX_PRECOMP
- #include "wx/defs.h"
#include "wx/toplevel.h"
#include "wx/app.h"
#endif // WX_PRECOMP
/////////////////////////////////////////////////////////////////////////////
-// Name: bmpbuttn.cpp
+// Name: src/motif/bmpbuttn.cpp
// Purpose: wxBitmapButton
// Author: Julian Smart
// Modified by:
#define XtScreen XTSCREEN
#endif
-#include "wx/defs.h"
-
#include "wx/bmpbuttn.h"
#ifdef __VMS__
xmPushButtonWidgetClass, parentWidget,
#endif
// See comment for wxButton::SetDefault
- // XmNdefaultButtonShadowThickness, 1,
+ // XmNdefaultButtonShadowThickness, 1,
XmNrecomputeSize, False,
NULL);
return ret;
}
-
/////////////////////////////////////////////////////////////////////////////
-// Name: bitmap.cpp
+// Name: src/motif/bmpmotif.cpp
// Purpose: wxBitmap
// Author: Julian Smart, originally in bitmap.cpp
// Modified by:
#define XtDisplay XTDISPLAY
#endif
-#include "wx/defs.h"
#include "wx/motif/bmpmotif.h"
#ifdef __VMS__
/////////////////////////////////////////////////////////////////////////////
-// Name: button.cpp
+// Name: src/motif/button.cpp
// Purpose: wxButton
// Author: Julian Smart
// Modified by:
#define XtDisplay XTDISPLAY
#endif
-#include "wx/defs.h"
-
#include "wx/button.h"
#ifdef __VMS__
wxString label(lbl);
if (label.empty() && wxIsStockID(id))
label = wxGetStockLabel(id);
-
+
if( !CreateControl( parent, id, pos, size, style, validator, name ) )
return false;
XmNlabelString, text(),
XmNrecomputeSize, False,
// See comment for wxButton::SetDefault
- // XmNdefaultButtonShadowThickness, 1,
+ // XmNdefaultButtonShadowThickness, 1,
NULL);
XtAddCallback ((Widget) m_mainWidget,
/////////////////////////////////////////////////////////////////////////////
-// Name: checkbox.cpp
+// Name: src/motif/checkbox.cpp
// Purpose: wxCheckBox
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#define XtDisplay XTDISPLAY
#endif
-#include "wx/defs.h"
-
#include "wx/checkbox.h"
#include "wx/tglbtn.h"
#include "wx/utils.h"
wxString label1(wxStripMenuCodes(label));
wxXmString text( label1 );
-
+
Widget parentWidget = (Widget) parent->GetClientWidget();
m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("toggle",
XmNtoggleMode, Is3State() ? XmTOGGLE_INDETERMINATE : XmTOGGLE_BOOLEAN,
#endif
NULL);
-
+
XtAddCallback( (Widget)m_mainWidget,
XmNvalueChangedCallback, (XtCallbackProc)wxCheckBoxCallback,
(XtPointer)this );
#if wxUSE_CHECKLISTBOX
-#include "wx/defs.h"
-
#include "wx/checklst.h"
#include "wx/arrstr.h"
#define XtDisplay XTDISPLAY
#endif
-#include "wx/defs.h"
-
#if wxUSE_CLIPBOARD
#include "wx/app.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: control.cpp
+// Name: src/motif/control.cpp
// Purpose: wxControl class
// Author: Julian Smart
// Modified by:
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/defs.h"
-
#include "wx/control.h"
#include "wx/panel.h"
#include "wx/utils.h"
///////////////////////////////////////////////////////////////////////////////
-// Name: dataobj.cpp
+// Name: src/motif/dataobj.cpp
// Purpose: wxDataObject class
// Author: Julian Smart
// Id: $Id$
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/defs.h"
-
#if wxUSE_CLIPBOARD
#include "wx/dataobj.h"
{
char *t = XGetAtomName ((Display*) wxGetDisplay(), m_format);
wxString ret( t ); // this will convert from ascii to Unicode
- if (t)
+ if (t)
XFree( t );
return ret;
}
/////////////////////////////////////////////////////////////////////////////
-// Name: dc.cpp
+// Name: src/motif/dc.cpp
// Purpose: wxDC class
// Author: Julian Smart
// Modified by:
#include "wx/dc.h"
#include "wx/dcmemory.h"
-#include "wx/defs.h"
- IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
+IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
//-----------------------------------------------------------------------------
// wxDC
m_scaleX = m_logicalScaleX * m_userScaleX;
m_scaleY = m_logicalScaleY * m_userScaleY;
}
-
/////////////////////////////////////////////////////////////////////////////
-// Name: filedlg.cpp
+// Name: src/motif/filedlg.cpp
// Purpose: wxFileDialog
// Author: Julian Smart
// Modified by:
#define XtWindow XTWINDOW
#endif
-#include "wx/defs.h"
#include "wx/utils.h"
#include "wx/filedlg.h"
#include "wx/intl.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/defs.h"
-
#ifdef __VMS
#pragma message disable nosimpint
#include "wx/vms_x_fix.h"
wxString wxFont::GetFaceName() const
{
- wxCHECK_MSG( Ok(), wxT(""), wxT("invalid font") );
+ wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") );
return M_FONTDATA->m_faceName ;
}
{
wxCHECK_MSG( Ok(), (wxNativeFontInfo *)NULL, wxT("invalid font") );
- if(M_FONTDATA->m_nativeFontInfo.GetXFontName().IsEmpty())
+ if(M_FONTDATA->m_nativeFontInfo.GetXFontName().empty())
GetInternalFont();
return &(M_FONTDATA->m_nativeFontInfo);
#endif
f->m_display = ( display ? display : wxGetDisplay() );
f->m_scale = intScale;
-
+
#if wxMOTIF_USE_RENDER_TABLE
XmRendition rendition;
XmRenderTable renderTable;
{
XRectangle ink, logical;
WXFontSet fset = font.GetFontSet(scale, display);
-
+
XmbTextExtents( (XFontSet)fset, str.c_str(), str.length(), &ink, &logical);
if( width ) *width = logical.width;
if( height ) *height = logical.height;
- if( ascent ) *ascent = -logical.y;
- if( descent ) *descent = logical.height + logical.y;
+ if( ascent ) *ascent = -logical.y;
+ if( descent ) *descent = logical.height + logical.y;
}
#else // if !wxMOTIF_NEW_FONT_HANDLING
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/defs.h"
-
#include "wx/menu.h"
#include "wx/menuitem.h"
#include "wx/log.h"
return true;
}
-
///////////////////////////////////////////////////////////////////////////////
-// Name: menuitem.cpp
+// Name: src/motif/menuitem.cpp
// Purpose: wxMenuItem implementation
// Author: Julian Smart
// Modified by:
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/defs.h"
-
#include "wx/menu.h"
#include "wx/menuitem.h"
#include "wx/utils.h"
(wxStripMenuCodes(m_text),
xmLabelGadgetClass, (Widget) menu, NULL);
}
- else if ((!m_text.IsNull() && m_text != "") && (!m_subMenu))
+ else if (!m_text.empty() && !m_subMenu)
{
wxString strName = wxStripMenuCodes(m_text);
if (IsCheckable())
; // Nothing
}
- else if ((!m_text.IsNull() && (m_text != "")) && !m_subMenu)
+ else if (!m_text.empty() && !m_subMenu)
{
if (m_buttonWidget)
{
}
}
}
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/defs.h"
-
#ifdef __VMS
#define XtDisplay XTDISPLAY
#pragma message disable nosimpint
#define XtDisplay XTDISPLAY
#endif
-#include "wx/defs.h"
-
#include "wx/radiobut.h"
#include "wx/utils.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/defs.h"
#include "wx/scrolbar.h"
#ifdef __VMS__
/////////////////////////////////////////////////////////////////////////////
-// Name: slider.cpp
+// Name: src/motif/slider.cpp
// Purpose: wxSlider
// Author: Julian Smart
// Modified by:
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/defs.h"
-
#if wxUSE_SLIDER
#include "wx/slider.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/defs.h"
-
#if wxUSE_SPINBTN
#include "wx/spinbutt.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: statbmp.cpp
+// Name: src/motif/statbmp.cpp
// Purpose: wxStaticBitmap
// Author: Julian Smart
// Modified by:
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/defs.h"
-
#include "wx/statbmp.h"
#ifdef __VMS__
XmNlabelType, XmSTRING,
XmNlabelPixmap, XmUNSPECIFIED_PIXMAP,
NULL);
- }
+ }
}
void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
m_bitmapCache.SetColoursChanged();
wxWindow::ChangeForegroundColour();
}
-
/////////////////////////////////////////////////////////////////////////////
-// Name: statbox.cpp
+// Name: src/motif/statbox.cpp
// Purpose: wxStaticBox
// Author: Julian Smart
// Modified by:
#define XtDisplay XTDISPLAY
#endif
-#include "wx/defs.h"
-
#include "wx/statbox.h"
#include "wx/utils.h"
// XmNshadowType, XmSHADOW_IN,
NULL);
- bool hasLabel = (!label.IsNull() && !label.IsEmpty()) ;
- if (hasLabel)
+ if (!label.empty())
{
wxString label1(wxStripMenuCodes(label));
wxXmString text(label1);
#if wxCHECK_MOTIF_VERSION( 2, 0 )
XmNframeChildType, XmFRAME_TITLE_CHILD,
#else
- XmNchildType, XmFRAME_TITLE_CHILD,
+ XmNchildType, XmFRAME_TITLE_CHILD,
#endif
NULL);
}
-
+
AttachWidget (parent, m_mainWidget, NULL, pos.x, pos.y, size.x, size.y);
ChangeBackgroundColour();
/////////////////////////////////////////////////////////////////////////////
-// Name: stattext.cpp
+// Name: src/motif/stattext.cpp
// Purpose: wxStaticText
// Author: Julian Smart
// Modified by:
#define XtDisplay XTDISPLAY
#endif
-#include "wx/defs.h"
-
#if wxUSE_STATTEXT
#include "wx/stattext.h"
#define XtParent XTPARENT
#endif
-#include "wx/defs.h"
-
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
int wxTextCtrl::GetLineLength(long lineNo) const
{
wxString str = GetLineText (lineNo);
- return (int) str.Length();
+ return (int) str.length();
}
wxString wxTextCtrl::GetLineText(long lineNo) const
#include "wx/wxprec.h"
#ifdef __BORLANDC__
- #pragma hdrstop
+ #pragma hdrstop
#endif
-#ifndef WX_PRECOMP
- #include "wx/defs.h"
-#endif
+#if wxUSE_MIMETYPE
#ifndef WX_PRECOMP
- #include "wx/string.h"
- #if wxUSE_GUI
- #include "wx/icon.h"
- #endif
+ #include "wx/string.h"
+ #if wxUSE_GUI
+ #include "wx/icon.h"
+ #endif
#endif //WX_PRECOMP
-#if wxUSE_MIMETYPE
-
#include "wx/log.h"
#include "wx/file.h"
#include "wx/intl.h"
#ifndef WX_PRECOMP
#include <stdio.h>
- #include "wx/defs.h"
#include "wx/colour.h"
#include "wx/gdicmn.h"
#include "wx/utils.h"
#if wxUSE_FONTDLG
#ifndef WX_PRECOMP
- #include "wx/defs.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#endif
#pragma hdrstop
#endif
+#if wxUSE_GAUGE
+
#ifndef WX_PRECOMP
- #include "wx/defs.h"
#endif
-#if wxUSE_GAUGE
-
#include "wx/gauge.h"
#include "wx/msw/private.h"
#endif
#ifndef WX_PRECOMP
-#include "wx/defs.h"
+ #include "wx/log.h"
#endif
#include "wx/filefn.h"
-#include "wx/log.h"
#if wxUSE_HELP && wxUSE_MS_HTML_HELP \
&& wxUSE_WXHTML_HELP && !defined(__WXUNIVERSAL__)
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
+#if wxUSE_HELP
+
#ifndef WX_PRECOMP
-#include "wx/defs.h"
#endif
-#if wxUSE_HELP
-
#include "wx/filefn.h"
#include "wx/msw/helpwin.h"
bool wxWinHelpController::LoadFile(const wxString& file)
{
- if (!file.IsEmpty())
+ if (!file.empty())
m_helpFile = file;
return true;
}
bool wxWinHelpController::DisplayContents(void)
{
- if (m_helpFile.IsEmpty()) return false;
+ if (m_helpFile.empty()) return false;
wxString str = GetValidFilename(m_helpFile);
bool wxWinHelpController::DisplaySection(int section)
{
// Use context number
- if (m_helpFile.IsEmpty()) return false;
+ if (m_helpFile.empty()) return false;
wxString str = GetValidFilename(m_helpFile);
bool wxWinHelpController::DisplayContextPopup(int contextId)
{
- if (m_helpFile.IsEmpty()) return false;
+ if (m_helpFile.empty()) return false;
wxString str = GetValidFilename(m_helpFile);
bool wxWinHelpController::KeywordSearch(const wxString& k,
wxHelpSearchMode WXUNUSED(mode))
{
- if (m_helpFile.IsEmpty()) return false;
+ if (m_helpFile.empty()) return false;
wxString str = GetValidFilename(m_helpFile);
wxSplitPath(file, & path, & name, & ext);
wxString fullName;
- if (path.IsEmpty())
+ if (path.empty())
fullName = name + wxT(".hlp");
else if (path.Last() == wxT('\\'))
fullName = path + name + wxT(".hlp");
/////////////////////////////////////////////////////////////////////////////
-// Name: msw/icon.cpp
+// Name: src/msw/icon.cpp
// Purpose: wxIcon class
// Author: Julian Smart
// Modified by: 20.11.99 (VZ): don't derive from wxBitmap any more
return handler->Load(this, filename, type, desiredWidth, desiredHeight);
}
-
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/app.h"
- #include "wx/defs.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/msgdlg.h"
}
return ans;
}
-
/////////////////////////////////////////////////////////////////////////////
-// Name: msw/mslu.cpp
+// Name: src/msw/mslu.cpp
// Purpose: Fixes for bugs in MSLU
// Author: Vaclav Slavik
// Modified by:
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
-#include <dir.h>
+ #pragma hdrstop
+ #include <dir.h>
#endif
#ifndef WX_PRECOMP
- #include "wx/defs.h"
#include "wx/utils.h"
#endif
}
#ifdef __BORLANDC__
-//here _stati64 is defined as stati64, see msw/mslu.h line 62
+//here _stati64 is defined as stati64, see msw/mslu.h line 62
#undef _stati64
WXDLLIMPEXP_BASE int wxMSLU__wstati64(const wxChar *name, struct _stati64 *buffer)
{
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
-#pragma hdrstop
+ #pragma hdrstop
#endif
-#include "wx/defs.h"
-
// Watcom C++ gives a linker error if this is compiled in.
// With Borland C++, all samples crash if this is compiled in.
#if wxUSE_OLE && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) && !defined(__CYGWIN10__)
{
wxDateTime date( variant.GetDateTime() );
oleVariant.vt = VT_DATE;
-
+
long dosDateTime = date.GetAsDOS();
short dosDate = short((dosDateTime & 0xFFFF0000) >> 16);
short dosTime = short(dosDateTime & 0xFFFF);
-
+
DosDateTimeToVariantTime(dosDate, dosTime, & oleVariant.date);
}
#endif
unsigned short dosDate = 0;
unsigned short dosTime = 0;
VariantTimeToDosDateTime(oleVariant.date, & dosDate, & dosTime);
-
+
long dosDateTime = (dosDate << 16) || dosTime;
wxDateTime date;
date.SetFromDOS(dosDateTime);
///////////////////////////////////////////////////////////////////////////////
-// Name: msw/popupwin.cpp
+// Name: src/msw/popupwin.cpp
// Purpose: implements wxPopupWindow for MSW
// Author: Vadim Zeitlin
// Modified by:
#pragma hdrstop
#endif
+#if wxUSE_POPUPWIN
+
#ifndef WX_PRECOMP
-#include "wx/defs.h"
#endif //WX_PRECOMP
-#if wxUSE_POPUPWIN
-
#include "wx/popupwin.h"
#include "wx/msw/private.h" // for GetDesktopWindow()
}
#endif // #if wxUSE_POPUPWIN
-
/////////////////////////////////////////////////////////////////////////////
-// Name: printwin.cpp
+// Name: src/msw/printwin.cpp
// Purpose: wxWindowsPrinter framework
// Author: Julian Smart
// Modified by:
#pragma hdrstop
#endif
-#include "wx/defs.h"
-
// Don't use the Windows printer if we're in wxUniv mode and using
// the PostScript architecture
#if wxUSE_PRINTING_ARCHITECTURE && (!defined(__WXUNIVERSAL__) || !wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW)
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#ifndef WX_PRECOMP
-#include "wx/defs.h"
-#include "wx/window.h"
-#include "wx/frame.h"
-#include "wx/utils.h"
-#include "wx/menu.h"
+ #include "wx/window.h"
+ #include "wx/frame.h"
+ #include "wx/utils.h"
+ #include "wx/menu.h"
#endif
#include "wx/msw/private.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: filefn.cpp
+// Name: src/msw/wince/filefn.cpp
// Purpose: File- and directory-related functions
// Author: Julian Smart
// Modified by:
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/defs.h"
-#include "wx/file.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
+#include "wx/file.h"
+
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
DWORD off0 = SetFilePointer((HANDLE) fd, 0, &high0, FILE_CURRENT);
if (off0 == 0xFFFFFFFF && GetLastError() != NO_ERROR)
return -1;
-
+
LONG high1 = 0;
DWORD off1 = SetFilePointer((HANDLE) fd, 0, &high0, FILE_END);
if (off1 == 0xFFFFFFFF && GetLastError() != NO_ERROR)
return -1;
-
+
if (off0 == off1 && high0 == high1)
return 1;
else
/////////////////////////////////////////////////////////////////////////////
-// Name: combobox.cpp
+// Name: src/os2/combobox.cpp
// Purpose: wxComboBox class
// Author: David Webster
// Modified by:
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_COMBOBOX
+
#ifndef WX_PRECOMP
- #include "wx/defs.h"
#include "wx/settings.h"
#endif
-#if wxUSE_COMBOBOX
-
#include "wx/combobox.h"
#include "wx/clipbrd.h"
#include "wx/os2/private.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_DATAOBJ
+
#ifndef WX_PRECOMP
- #include "wx/defs.h"
#include "wx/intl.h"
#include "wx/log.h"
#endif
-#if wxUSE_DATAOBJ
-
#include "wx/dataobj.h"
#include "wx/mstream.h"
#include "wx/image.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: dirdlg.cpp
+// Name: src/os2/dirdlg.cpp
// Purpose: wxDirDialog
// Author: David Webster
// Modified by:
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
-#include <stdio.h>
-#include "wx/defs.h"
-#include "wx/utils.h"
-#include "wx/dialog.h"
-#include "wx/dirdlg.h"
+ #include <stdio.h>
+ #include "wx/utils.h"
+ #include "wx/dialog.h"
+ #include "wx/dirdlg.h"
#endif
#include "wx/os2/private.h"
// TODO
return wxID_CANCEL;
}
-
/////////////////////////////////////////////////////////////////////////////
-// Name: fontdlg.cpp
+// Name: src/os2/fontdlg.cpp
// Purpose: wxFontDialog class. NOTE: you can use the generic class
// if you wish, instead of implementing this.
// Author: David Webster
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
-#include <stdio.h>
-#include "wx/defs.h"
-#include "wx/utils.h"
-#include "wx/dialog.h"
-#include "wx/math.h"
+ #include <stdio.h>
+ #include "wx/utils.h"
+ #include "wx/dialog.h"
+ #include "wx/math.h"
#endif
#include "wx/fontdlg.h"
}
return wxID_CANCEL;
} // end of wxFontDialg::ShowModal
-
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
- #include "wx/defs.h"
#include "wx/object.h"
#include "wx/dynarray.h"
#include "wx/list.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: gauge.cpp
+// Name: src/os2/gauge.cpp
// Purpose: wxGauge class
// Author: David Webster
// Modified by:
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
-#include "wx/defs.h"
-#include "wx/utils.h"
-#include "wx/scrolwin.h"
+ #include "wx/utils.h"
+ #include "wx/scrolwin.h"
#endif
#include "wx/os2/private.h"
return m_nGaugePos;
} // end of wxGauge::GetValue
-bool wxGauge::SetBackgroundColour(
- const wxColour& rColour
-)
+bool wxGauge::SetBackgroundColour( const wxColour& rColour )
{
if (!wxControl::SetBackgroundColour(rColour))
- return FALSE;
+ return false;
LONG lColor = (LONG)rColour.GetPixel();
,sizeof(LONG)
,(PVOID)&lColor
);
- return TRUE;
+ return true;
} // end of wxGauge::SetBackgroundColour
void wxGauge::SetBezelFace(
{
} // end of wxGauge::SetBezelFace
-bool wxGauge::SetForegroundColour(
- const wxColour& rColour
-)
+bool wxGauge::SetForegroundColour( const wxColour& rColour )
{
if (!wxControl::SetForegroundColour(rColour))
- return FALSE;
+ return false;
- LONG lColor = (LONG)rColour.GetPixel();
+ LONG lColor = (LONG)rColour.GetPixel();
::WinSetPresParam( GetHwnd()
,PP_FOREGROUNDCOLOR
,(PVOID)&lColor
);
- return TRUE;
+ return true;
} // end of wxGauge::SetForegroundColour
void wxGauge::SetRange(
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/defs.h"
-
#if wxUSE_SOCKETS
#include <stdlib.h>
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_HELP
+
#ifndef WX_PRECOMP
-#include "wx/defs.h"
#endif
#include "wx/os2/helpwin.h"
-#if wxUSE_HELP
#include <time.h>
#include "wx/os2/private.h"
void wxWinHelpController::OnQuit()
{
}
+
#endif // wxUSE_HELP
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#ifndef WX_PRECOMP
- #include "wx/defs.h"
#include "wx/list.h"
#include "wx/utils.h"
#include "wx/app.h"
//
#include "wx/wxprec.h"
-#include "wx/defs.h"
-
#if wxUSE_JOYSTICK
#include "wx/string.h"
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
-#include <stdio.h>
-#include "wx/defs.h"
-#include "wx/utils.h"
-#include "wx/dialog.h"
-#include "wx/app.h"
-#include "wx/msgdlg.h"
-#include "wx/math.h"
+ #include <stdio.h>
+ #include "wx/utils.h"
+ #include "wx/dialog.h"
+ #include "wx/app.h"
+ #include "wx/msgdlg.h"
+ #include "wx/math.h"
#endif
#include "wx/os2/private.h"
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
-#include <stdio.h>
-#include "wx/defs.h"
-#include "wx/string.h"
-#include "wx/os2/private.h"
-#include "wx/palette.h"
-#include "wx/app.h"
+ #include <stdio.h>
+ #include "wx/string.h"
+ #include "wx/os2/private.h"
+ #include "wx/palette.h"
+ #include "wx/app.h"
#endif
#define INCL_PM
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
-#include <stdio.h>
-#include "wx/defs.h"
-#include "wx/pen.h"
-#include "wx/brush.h"
-#include "wx/gdicmn.h"
+ #include <stdio.h>
+ #include "wx/pen.h"
+ #include "wx/brush.h"
+ #include "wx/gdicmn.h"
#endif
#include "wx/module.h"
#endif
#ifndef WX_PRECOMP
- #include "wx/defs.h"
#include "wx/intl.h"
#endif
#if wxUSE_FONTDLG
#ifndef WX_PRECOMP
- #include "wx/defs.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/math.h"
#pragma hdrstop
#endif
+#if wxUSE_GAUGE
+
#ifndef WX_PRECOMP
- #include "wx/defs.h"
#endif
-#if wxUSE_GAUGE
-
#include "wx/gauge.h"
#include "wx/palmos/private.h"
#pragma hdrstop
#endif
+#if wxUSE_HELP
+
#ifndef WX_PRECOMP
-#include "wx/defs.h"
#endif
-#if wxUSE_HELP
-
#include "wx/filefn.h"
#include <time.h>
#endif
#ifndef WX_PRECOMP
- #include "wx/defs.h"
#include "wx/list.h"
#include "wx/utils.h"
#include "wx/app.h"
{
return false;
}
-
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/app.h"
- #include "wx/defs.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/msgdlg.h"
return wxResult;
}
-
#pragma hdrstop
#endif
+#if wxUSE_POPUPWIN
+
#ifndef WX_PRECOMP
-#include "wx/defs.h"
#endif //WX_PRECOMP
-#if wxUSE_POPUPWIN
-
#include "wx/popupwin.h"
#include "wx/palmos/private.h" // for GetDesktopWindow()
}
#endif // #if wxUSE_POPUPWIN
-
#pragma hdrstop
#endif
-#include "wx/defs.h"
-
// Don't use the Windows printer if we're in wxUniv mode and using
// the PostScript architecture
#if wxUSE_PRINTING_ARCHITECTURE && (!defined(__WXUNIVERSAL__) || !wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW)
/////////////////////////////////////////////////////////////////////////
-// File: taskbar.cpp
+// File: src/palmos/taskbar.cpp
// Purpose: Implements wxTaskBarIcon class for manipulating icons on
// the task bar.
// Author: Julian Smart
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#ifndef WX_PRECOMP
-#include "wx/defs.h"
-#include "wx/window.h"
-#include "wx/frame.h"
-#include "wx/utils.h"
-#include "wx/menu.h"
+ #include "wx/window.h"
+ #include "wx/frame.h"
+ #include "wx/utils.h"
+ #include "wx/menu.h"
#endif
#if defined(__WIN95__)
}
#endif // __WIN95__
-
#if wxUSE_DIALUP_MANAGER
#ifndef WX_PRECOMP
-# include "wx/defs.h"
+ #include "wx/string.h"
#endif // !PCH
-#include "wx/string.h"
#include "wx/event.h"
#include "wx/dialup.h"
#include "wx/timer.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: joystick.cpp
+// Name: src/unix/joystick.cpp
// Purpose: wxJoystick class
// Author: Ported to Linux by Guilhem Lavaux
// Modified by:
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/defs.h"
-
#if wxUSE_JOYSTICK
#include "wx/joystick.h"
if (m_device == -1)
{
dev_name.Printf( wxT("/dev/input/js%d"), joystick);
- m_device = open(dev_name.fn_str(), O_RDONLY);
+ m_device = open(dev_name.fn_str(), O_RDONLY);
}
if (m_device != -1)
break;
close(fd);
}
-
+
if (j == 0) {
for (j=0; j<4; j++) {
dev_name.Printf(wxT("/dev/input/js%d"), j);
close(fd);
}
}
-
+
return j;
}
return false;
}
#endif // wxUSE_JOYSTICK
-
/////////////////////////////////////////////////////////////////////////////
-// Name: unix/mimetype.cpp
+// Name: src/unix/mimetype.cpp
// Purpose: classes and functions to manage MIME types
// Author: Vadim Zeitlin
// Modified by:
#include "wx/wxprec.h"
#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
- #include "wx/defs.h"
+ #pragma hdrstop
#endif
#if wxUSE_MIMETYPE && wxUSE_FILE && wxUSE_TEXTFILE
#ifndef WX_PRECOMP
- #include "wx/string.h"
+ #include "wx/string.h"
#endif
#include "wx/log.h"
wxLogTrace(TRACE_MIME, wxT("--- Reading from Gnome file %s '%s' ---"),
filename.c_str(), pc);
-
+
// trim trailing space and tab
while ((*pc == wxT(' ')) || (*pc == wxT('\t')))
pc++;
{
wxString left_of_equal = sTmp.Left( equal_pos );
const wxChar *right_of_equal = pc;
- right_of_equal += equal_pos+1;
-
+ right_of_equal += equal_pos+1;
+
if (left_of_equal == wxT("icon_filename"))
{
// GNOME 2:
curIconFile = right_of_equal;
-
+
wxFileName newFile( curIconFile );
if (newFile.IsRelative() || newFile.FileExists())
{
size_t nDirs = search_dirs.GetCount();
-
+
for (size_t nDir = 0; nDir < nDirs; nDir++)
{
newFile.SetPath( search_dirs[nDir] );
{
// set the flag first to prevent recursion
m_initialized = true;
-
+
wxString wm = wxGetenv( wxT("WINDOWMANAGER") );
if (wm.Find( wxT("kde") ) != wxNOT_FOUND)
const wxString& strDesc)
{
int nIndex = AddToMimeData(strType, strIcon, entry, strExtensions, strDesc, true);
-
+
if ( nIndex == wxNOT_FOUND )
return false;
#endif
// wxUSE_MIMETYPE && wxUSE_FILE && wxUSE_TEXTFILE
-
/////////////////////////////////////////////////////////////////////////////
-// Name: unix/utilsunx.cpp
+// Name: src/unix/utilsunx.cpp
// Purpose: generic Unix implementation of many wx functions
// Author: Vadim Zeitlin
// Id: $Id$
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/defs.h"
-#include "wx/string.h"
+#ifndef WX_PRECOMP
+ #include "wx/string.h"
+#endif
#include "wx/intl.h"
#include "wx/log.h"
// split the command line in arguments
do
{
- argument=wxT("");
+ argument = wxEmptyString;
quotechar = wxT('\0');
// eat leading whitespace:
return wxString::FromAscii( buf );
}
wxFAIL_MSG( _T("uname failed") );
- return _T("");
+ return wxEmptyString;
}
#endif // !__WXMAC__
///////////////////////////////////////////////////////////////////////////////
-// Name: dataobj.cpp
+// Name: src/x11/dataobj.cpp
// Purpose: wxDataObject class
// Author: Julian Smart
// Id: $Id$
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
-#include "wx/defs.h"
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
#if wxUSE_DATAOBJ
#else
char *t = XGetAtomName ((Display*) wxGetDisplay(), m_format);
wxString ret = wxString::FromAscii( t );
- if (t)
+ if (t)
XFree( t );
return ret;
#endif
PrepareFormats();
m_type = wxDF_PRIVATE;
wxString tmp( id );
- m_format = XInternAtom( (Display*) wxGetDisplay(), tmp.ToAscii(), FALSE );
+ m_format = XInternAtom( (Display*) wxGetDisplay(), tmp.ToAscii(), FALSE );
#endif
}
bool wxDataObject::IsSupportedFormat(const wxDataFormat& format, Direction dir) const
{
size_t nFormatCount = GetFormatCount(dir);
- if ( nFormatCount == 1 )
+ if ( nFormatCount == 1 )
{
return format == GetPreferredFormat();
}
- else
+ else
{
wxDataFormat *formats = new wxDataFormat[nFormatCount];
GetAllFormats(formats,dir);
size_t n;
- for ( n = 0; n < nFormatCount; n++ )
+ for ( n = 0; n < nFormatCount; n++ )
{
if ( formats[n] == format )
break;
memcpy( buf, filenames.mbc_str(), filenames.Len() + 1 );
- return TRUE;
+ return true;
}
size_t wxFileDataObject::GetDataSize() const
}
#endif // 0/1
- return TRUE;
+ return true;
}
void wxFileDataObject::AddFile( const wxString &filename )
{
wxFAIL_MSG( wxT("attempt to copy empty bitmap failed") );
- return FALSE;
+ return false;
}
memcpy(buf, m_pngData, m_pngSize);
- return TRUE;
+ return true;
}
bool wxBitmapDataObject::SetData(size_t size, const void *buf)
wxPNGHandler handler;
if ( !handler.LoadFile( &image, mstream ) )
{
- return FALSE;
+ return false;
}
m_bitmap = image;
return m_bitmap.Ok();
#else
- return FALSE;
+ return false;
#endif
}
}
#endif // wxUSE_DATAOBJ
-
/////////////////////////////////////////////////////////////////////////////
-// Name: dc.cpp
+// Name: src/x11/dc.cpp
// Purpose: wxDC class
// Author: Julian Smart
// Modified by:
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
#include "wx/dc.h"
#include "wx/dcmemory.h"
-#include "wx/defs.h"
IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
wxDC::wxDC()
{
- m_ok = FALSE;
+ m_ok = false;
#if 1
m_mm_to_pix_x = 1.0;
(double)wxGetDisplaySizeMM().GetHeight();
#endif
- m_needComputeScaleX = FALSE; /* not used yet */
- m_needComputeScaleY = FALSE; /* not used yet */
+ m_needComputeScaleX = false; /* not used yet */
+ m_needComputeScaleY = false; /* not used yet */
m_logicalFunction = wxCOPY;
m_backgroundMode = wxTRANSPARENT;
- m_isInteractive = FALSE; // ???
+ m_isInteractive = false; // ???
}
void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
{
- m_clipping = TRUE;
+ m_clipping = true;
m_clipX1 = x;
m_clipY1 = y;
m_clipX2 = x + width;
}
if (mode != wxMM_TEXT)
{
- m_needComputeScaleX = TRUE;
- m_needComputeScaleY = TRUE;
+ m_needComputeScaleX = true;
+ m_needComputeScaleY = true;
}
}
m_scaleX = m_logicalScaleX * m_userScaleX;
m_scaleY = m_logicalScaleY * m_userScaleY;
}
-
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
// ============================================================================
// declarations
// ============================================================================
#pragma message enable nosimpint
#endif
-#include "wx/defs.h"
#include "wx/string.h"
#include "wx/font.h"
#include "wx/gdicmn.h"
int family = wxDEFAULT,
int style = wxDEFAULT,
int weight = wxDEFAULT,
- bool underlined = FALSE,
+ bool underlined = false,
const wxString& faceName = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
void SetFaceName(const wxString& facename);
void SetEncoding(wxFontEncoding encoding);
- void SetNoAntiAliasing( bool no = TRUE ) { m_noAA = no; }
+ void SetNoAntiAliasing( bool no = true ) { m_noAA = no; }
bool GetNoAntiAliasing() const { return m_noAA; }
// and this one also modifies all the other font data fields
void wxFontRefData::InitFromNative()
{
- m_noAA = FALSE;
+ m_noAA = false;
#if wxUSE_UNICODE
// Get native info
}
// Pango description are never underlined (?)
- m_underlined = FALSE;
+ m_underlined = false;
// Cannot we choose that
m_encoding = wxFONTENCODING_SYSTEM;
}
// X fonts are never underlined...
- m_underlined = FALSE;
+ m_underlined = false;
// deal with font encoding
wxString
m_refData = new wxFontRefData(pointSize, family, style, weight,
underlined, faceName, encoding);
- return TRUE;
+ return true;
}
#if !wxUSE_UNICODE
if( !fontname )
{
*this = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT);
- return TRUE;
+ return true;
}
m_refData = new wxFontRefData();
}
//else: unknown encoding - may be give a warning here?
else
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
#endif // !wxUSE_UNICODE
wxString wxFont::GetFaceName() const
{
- wxCHECK_MSG( Ok(), wxT(""), wxT("invalid font") );
+ wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") );
return M_FONTDATA->m_faceName;
}
bool wxFont::GetUnderlined() const
{
- wxCHECK_MSG( Ok(), FALSE, wxT("invalid font") );
+ wxCHECK_MSG( Ok(), false, wxT("invalid font") );
return M_FONTDATA->m_underlined;
}
bool wxFont::IsFixedWidth() const
{
- wxCHECK_MSG( Ok(), FALSE, wxT("invalid font") );
+ wxCHECK_MSG( Ok(), false, wxT("invalid font") );
#if wxUSE_UNICODE
return wxFontBase::IsFixedWidth();
#else
// Robert, is this right? HasNativeFont doesn't exist.
- if ( TRUE )
+ if ( true )
// if ( M_FONTDATA->HasNativeFont() )
{
// the monospace fonts are supposed to have "M" in the spacing field
if (xFontName == "-*-*-*-*-*--*-*-*-*-*-*-*-*")
// wxFont constructor not called with native font info parameter => take M_FONTDATA values
xFontName.Clear();
-
+
// not found, create a new one
XFontStruct *font = (XFontStruct *)
wxLoadQueryNearestFont(pointSize,
/////////////////////////////////////////////////////////////////////////////
-// Name: popupwin.cpp
+// Name: srx/x11/popupwin.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#include "wx/defs.h"
-#include "wx/log.h"
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
#if wxUSE_POPUPWIN
+#include "wx/log.h"
+
#include "wx/popupwin.h"
#include "wx/app.h"
#include "wx/settings.h"
if (!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("popup") ))
{
wxFAIL_MSG( wxT("wxPopupWindow creation failed") );
- return FALSE;
+ return false;
}
// All dialogs should really have this style
m_windowStyle = style;
m_windowStyle |= wxTAB_TRAVERSAL;
-
+
wxPoint pos( 20,20 );
wxSize size( 20,20 );
wxPoint pos2 = pos;
Visual *xvisual = DefaultVisual( xdisplay, xscreen );
Window xparent = RootWindow( xdisplay, xscreen );
Colormap cm = DefaultColormap( xdisplay, xscreen);
-
+
#if wxUSE_TWO_WINDOWS
- bool need_two_windows =
+ bool need_two_windows =
((( wxSUNKEN_BORDER | wxRAISED_BORDER | wxSIMPLE_BORDER | wxHSCROLL | wxVSCROLL ) & m_windowStyle) != 0);
#else
- bool need_two_windows = FALSE;
+ bool need_two_windows = false;
#endif
#if wxUSE_NANOX
long xattributes_mask = 0;
#else
-
+
XSetWindowAttributes xattributes;
long xattributes_mask = 0;
m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
m_backgroundColour.CalcPixel( (WXColormap) cm);
-
+
m_foregroundColour = *wxBLACK;
m_foregroundColour.CalcPixel( (WXColormap) cm);
-
+
xattributes_mask |= CWBackPixel;
xattributes.background_pixel = m_backgroundColour.GetPixel();
-
+
xattributes_mask |= CWBorderPixel;
xattributes.border_pixel = BlackPixel( xdisplay, xscreen );
-
+
xattributes_mask |= CWOverrideRedirect | CWSaveUnder;
xattributes.override_redirect = True;
xattributes.save_under = True;
-
+
xattributes_mask |= CWEventMask;
#endif
-
+
if (need_two_windows)
{
#if !wxUSE_NANOX
- xattributes.event_mask =
+ xattributes.event_mask =
ExposureMask | StructureNotifyMask | ColormapChangeMask;
#endif
-
- Window xwindow = XCreateWindow( xdisplay, xparent, pos.x, pos.y, size.x, size.y,
+
+ Window xwindow = XCreateWindow( xdisplay, xparent, pos.x, pos.y, size.x, size.y,
0, DefaultDepth(xdisplay,xscreen), InputOutput, xvisual, xattributes_mask, &xattributes );
-#if wxUSE_NANOX
+#if wxUSE_NANOX
XSelectInput( xdisplay, xwindow,
ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask |
KeymapStateMask | FocusChangeMask | ColormapChangeMask | StructureNotifyMask |
PropertyChangeMask );
#endif
-
+
// Set background to None which will prevent X11 from clearing the
// background comletely.
XSetWindowBackgroundPixmap( xdisplay, xwindow, None );
-
+
m_mainWindow = (WXWindow) xwindow;
wxAddWindowToTable( xwindow, (wxWindow*) this );
-
+
// XMapWindow( xdisplay, xwindow );
-#if !wxUSE_NANOX
- xattributes.event_mask =
+#if !wxUSE_NANOX
+ xattributes.event_mask =
ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask |
KeymapStateMask | FocusChangeMask | ColormapChangeMask | StructureNotifyMask |
PropertyChangeMask | VisibilityChangeMask ;
#endif
-
+
if (HasFlag( wxSUNKEN_BORDER) || HasFlag( wxRAISED_BORDER))
{
pos2.x = 2;
pos2.x = 0;
pos2.y = 0;
}
-
- xwindow = XCreateWindow( xdisplay, xwindow, pos2.x, pos2.y, size2.x, size2.y,
+
+ xwindow = XCreateWindow( xdisplay, xwindow, pos2.x, pos2.y, size2.x, size2.y,
0, DefaultDepth(xdisplay,xscreen), InputOutput, xvisual, xattributes_mask, &xattributes );
-
+
// Set background to None which will prevent X11 from clearing the
// background comletely.
XSetWindowBackgroundPixmap( xdisplay, xwindow, None );
-
-#if wxUSE_NANOX
+
+#if wxUSE_NANOX
XSelectInput( xdisplay, xwindow,
ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask |
KeymapStateMask | FocusChangeMask | ColormapChangeMask | StructureNotifyMask |
PropertyChangeMask );
#endif
-
+
m_clientWindow = (WXWindow) xwindow;
wxAddClientWindowToTable( xwindow, (wxWindow*) this );
-
- m_isShown = FALSE;
+
+ m_isShown = false;
XMapWindow( xdisplay, xwindow );
}
else
{
// One window
#if !wxUSE_NANOX
- xattributes.event_mask =
+ xattributes.event_mask =
ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask |
KeymapStateMask | FocusChangeMask | ColormapChangeMask | StructureNotifyMask |
PropertyChangeMask | VisibilityChangeMask ;
#endif
-
- Window xwindow = XCreateWindow( xdisplay, xparent, pos.x, pos.y, size.x, size.y,
+
+ Window xwindow = XCreateWindow( xdisplay, xparent, pos.x, pos.y, size.x, size.y,
0, DefaultDepth(xdisplay,xscreen), InputOutput, xvisual, xattributes_mask, &xattributes );
#if wxUSE_NANOX
KeymapStateMask | FocusChangeMask | ColormapChangeMask | StructureNotifyMask |
PropertyChangeMask );
#endif
-
+
// Set background to None which will prevent X11 from clearing the
// background comletely.
XSetWindowBackgroundPixmap( xdisplay, xwindow, None );
-
+
m_mainWindow = (WXWindow) xwindow;
m_clientWindow = (WXWindow) xwindow;
wxAddWindowToTable( xwindow, (wxWindow*) this );
-
- m_isShown = FALSE;
+
+ m_isShown = false;
// XMapWindow( xdisplay, xwindow );
}
wm_hints.initial_state = NormalState;
XSetWMHints( xdisplay, (Window) m_mainWindow, &wm_hints);
#endif
-
- return TRUE;
+
+ return true;
}
void wxPopupWindow::DoMoveWindow(int x, int y, int width, int height )
bool ret = wxWindowX11::Show( show );
Raise();
-
+
return ret;
}