wxPageSetupDialogData::wxPageSetupDialogData()
{
- m_paperSize = wxSize(0, 0);
+ m_paperSize = wxSize();
CalculatePaperSizeFromId();
- m_minMarginTopLeft = wxPoint(0, 0);
- m_minMarginBottomRight = wxPoint(0, 0);
- m_marginTopLeft = wxPoint(0, 0);
- m_marginBottomRight = wxPoint(0, 0);
+ m_minMarginTopLeft =
+ m_minMarginBottomRight =
+ m_marginTopLeft =
+ m_marginBottomRight = wxPoint();
// Flags
m_defaultMinMargins = false;
wxPageSetupDialogData::wxPageSetupDialogData(const wxPrintData& printData)
{
- m_paperSize = wxSize(0, 0);
- m_minMarginTopLeft = wxPoint(0, 0);
- m_minMarginBottomRight = wxPoint(0, 0);
- m_marginTopLeft = wxPoint(0, 0);
- m_marginBottomRight = wxPoint(0, 0);
+ m_paperSize = wxSize();
+ m_minMarginTopLeft =
+ m_minMarginBottomRight =
+ m_marginTopLeft =
+ m_marginBottomRight = wxPoint();
// Flags
m_defaultMinMargins = false;
{
if(m_imp)
return m_imp->GetVideoSize();
- return wxSize(0,0);
+ return wxSize();
}
//---------------------------------------------------------------------------
if (type)
return type->GetSize();
else
- return wxSize(0, 0);
+ return wxSize();
}
// Get the paper size
if (!show)
{
gdk_pointer_ungrab( (guint32)GDK_CURRENT_TIME );
-
+
gtk_grab_remove( m_widget );
}
#endif
#endif
bool ret = wxPopupWindow::Show( show );
-
+
#ifdef __WXGTK__
if (show)
{
gtk_grab_add( m_widget );
-
+
gdk_pointer_grab( m_widget->window, TRUE,
(GdkEventMask)
(GDK_BUTTON_PRESS_MASK |
if (show)
{
Window xwindow = (Window) m_clientWindow;
-
+
/* int res =*/ XGrabPointer(wxGlobalDisplay(), xwindow,
True,
ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask,
void wxPopupComboWindow::PositionNearCombo()
{
// the origin point must be in screen coords
- wxPoint ptOrigin = m_combo->ClientToScreen(wxPoint(0, 0));
+ wxPoint ptOrigin = m_combo->ClientToScreen(wxPoint());
#if 0 //def __WXUNIVERSAL__
// account for the fact that (0, 0) is not the top left corner of the
#endif
}
-wxPrintDialogBase *wxNativePrintFactory::CreatePrintDialog( wxWindow *parent,
+wxPrintDialogBase *wxNativePrintFactory::CreatePrintDialog( wxWindow *parent,
wxPrintDialogData *data )
{
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
#endif
}
-wxPrintDialogBase *wxNativePrintFactory::CreatePrintDialog( wxWindow *parent,
+wxPrintDialogBase *wxNativePrintFactory::CreatePrintDialog( wxWindow *parent,
wxPrintData *data )
{
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
#endif
}
-wxPageSetupDialogBase *wxNativePrintFactory::CreatePageSetupDialog( wxWindow *parent,
+wxPageSetupDialogBase *wxNativePrintFactory::CreatePageSetupDialog( wxWindow *parent,
wxPageSetupDialogData *data )
{
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
// the printer from the wxPrintDialog anyway.
return true;
#endif
-
+
}
-wxDialog *wxNativePrintFactory::CreatePrintSetupDialog( wxWindow *parent,
+wxDialog *wxNativePrintFactory::CreatePrintSetupDialog( wxWindow *parent,
wxPrintData *data )
{
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
bool wxNativePrintFactory::HasOwnPrintToFile()
{
// Only relevant for PostScript and here the
- // setup dialog provides no "print to file"
+ // setup dialog provides no "print to file"
// option. In the GNOME setup dialog, the
// setup dialog has its own print to file.
return false;
wxString wxNativePrintFactory::CreatePrinterLine()
{
// Only relevant for PostScript for now
-
+
// We should query "lpstat -d" here
return _("Generic PostScript");
}
bool wxNativePrintFactory::HasStatusLine()
{
// Only relevant for PostScript for now
- return true;
+ return true;
}
wxString wxNativePrintFactory::CreateStatusLine()
{
// Only relevant for PostScript for now
-
+
// We should query "lpstat -r" or "lpstat -p" here
return _("Ready");
}
IMPLEMENT_ABSTRACT_CLASS(wxPrintNativeDataBase, wxObject)
wxPrintNativeDataBase::wxPrintNativeDataBase()
-{
- m_ref = 1;
+{
+ m_ref = 1;
}
//----------------------------------------------------------------------------
wxPrintFactoryModule() {}
bool OnInit() { return true; }
void OnExit() { wxPrintFactory::SetPrintFactory( NULL ); }
-
+
private:
DECLARE_DYNAMIC_CLASS(wxPrintFactoryModule)
};
IMPLEMENT_ABSTRACT_CLASS(wxPrintDialogBase, wxDialog)
wxPrintDialogBase::wxPrintDialogBase(wxWindow *parent,
- wxWindowID id,
+ wxWindowID id,
const wxString &title,
const wxPoint &pos,
const wxSize &size,
IMPLEMENT_ABSTRACT_CLASS(wxPageSetupDialogBase, wxDialog)
wxPageSetupDialogBase::wxPageSetupDialogBase(wxWindow *parent,
- wxWindowID id,
+ wxWindowID id,
const wxString &title,
const wxPoint &pos,
const wxSize &size,
if (m_printPreview->GetPrintoutForPrinting())
buttons |= wxPREVIEW_PRINT;
- m_controlBar = new wxPreviewControlBar(m_printPreview, buttons, this, wxPoint(0, 0), wxSize(400, 40));
+ m_controlBar = new wxPreviewControlBar(m_printPreview, buttons, this, wxPoint(), wxSize(400, 40));
m_controlBar->CreateButtons();
}
m_sizer = NULL;
m_show = true;
m_userData = NULL;
- m_zoneRect = wxRect( 0, 0, 0, 0 );
+ m_zoneRect = wxRect();
}
void wxSizerItem::Init(const wxSizerFlags& flags)
, m_proportion( proportion )
, m_border( border )
, m_flag( flag )
- , m_zoneRect( 0, 0, 0, 0 )
+ , m_zoneRect()
, m_show( true )
, m_userData( userData )
{
, m_proportion( proportion )
, m_border( border )
, m_flag( flag )
- , m_zoneRect( 0, 0, 0, 0 )
+ , m_zoneRect()
, m_show( true )
, m_userData( userData )
{
, m_proportion( proportion )
, m_border( border )
, m_flag( flag )
- , m_zoneRect( 0, 0, 0, 0 )
+ , m_zoneRect()
, m_show( true )
, m_ratio( 0.0 )
, m_userData( userData )
//---------------------------------------------------------------------------
wxSizer::wxSizer()
- : m_minSize( wxSize( 0, 0 ) )
+ :m_minSize()
{
}
m_buttonCancel = mybutton;
break;
case wxID_HELP:
- case wxID_CONTEXT_HELP:
+ case wxID_CONTEXT_HELP:
m_buttonHelp = mybutton;
break;
default:
wxSize wxBookCtrlSizer::CalcMin()
{
- wxSize sizeBorder = m_bookctrl->CalcSizeFromPage(wxSize(0, 0));
+ wxSize sizeBorder = m_bookctrl->CalcSizeFromPage(wxSize());
sizeBorder.x += 5;
sizeBorder.y += 5;
wxSize wxWindowBase::DoGetBestSize() const
{
wxSize best;
-
+
if ( m_windowSizer )
{
best = m_windowSizer->GetMinSize();
// by default the origin is not shifted
wxPoint wxWindowBase::GetClientAreaOrigin() const
{
- return wxPoint(0, 0);
+ return wxPoint();
}
// set the min/max size of the window
// Since we don't paint the whole background make sure that the platform
// will use the right one.
SetBackgroundColour(GetBackgroundColour());
-
+
SetHolidayAttrs();
return true;
wxSize best(width, height);
CacheBestSize(best);
- return best;
+ return best;
}
void wxCalendarCtrl::DoSetSize(int x, int y,
leftarrow[1] = wxPoint(arrowheight / 2, 0);
leftarrow[2] = wxPoint(arrowheight / 2, arrowheight - 1);
- rightarrow[0] = wxPoint(0, 0);
+ rightarrow[0] = wxPoint();
rightarrow[1] = wxPoint(arrowheight / 2, arrowheight / 2);
rightarrow[2] = wxPoint(0, arrowheight - 1);
wxCoord arrowy = (m_heightRow - arrowheight) / 2;
wxCoord larrowx = (m_widthCol - (arrowheight / 2)) / 2;
wxCoord rarrowx = ((m_widthCol - (arrowheight / 2)) / 2) + m_widthCol*6;
- m_leftArrowRect = wxRect(0, 0, 0, 0);
- m_rightArrowRect = wxRect(0, 0, 0, 0);
+ m_leftArrowRect = m_rightArrowRect = wxRect();
if ( AllowMonthChange() )
{
{
const wxSize sizeChoice = m_choice->GetSize();
- wxPoint pt(0, 0);
+ wxPoint pt;
wxRect rectPage(pt, GetClientSize());
switch ( GetWindowStyle() & wxCHB_ALIGN_MASK )
{
bool wxGenericColourDialog::Create(wxWindow *parent, wxColourData *data)
{
if ( !wxDialog::Create(parent, wxID_ANY, _("Choose colour"),
- wxPoint(0, 0), wxSize(900, 900)) )
+ wxPoint(), wxSize(900, 900)) )
return false;
dialogParent = parent;
PaintHighlight(dc, false);
whichKind = 1;
colourSelection = which;
-
+
#if wxUSE_SLIDER
redSlider->SetValue( standardColours[colourSelection].Red() );
greenSlider->SetValue( standardColours[colourSelection].Green() );
blueSlider->SetValue( standardColours[colourSelection].Blue() );
#endif // wxUSE_SLIDER
-
- colourData.m_dataColour.Set(standardColours[colourSelection].Red(),
- standardColours[colourSelection].Green(),
+
+ colourData.m_dataColour.Set(standardColours[colourSelection].Red(),
+ standardColours[colourSelection].Green(),
standardColours[colourSelection].Blue());
PaintCustomColour(dc);
PaintHighlight(dc, false);
whichKind = 2;
colourSelection = which;
-
+
#if wxUSE_SLIDER
redSlider->SetValue( customColours[colourSelection].Red() );
greenSlider->SetValue( customColours[colourSelection].Green() );
blueSlider->SetValue( customColours[colourSelection].Blue() );
#endif // wxUSE_SLIDER
-
- colourData.m_dataColour.Set(customColours[colourSelection].Red(),
- customColours[colourSelection].Green(),
+
+ colourData.m_dataColour.Set(customColours[colourSelection].Red(),
+ customColours[colourSelection].Green(),
customColours[colourSelection].Blue());
-
+
PaintCustomColour(dc);
PaintHighlight(dc, true);
}
PaintHighlight(dc, true);
}
- customColours[colourSelection].Set(colourData.m_dataColour.Red(),
- colourData.m_dataColour.Green(),
+ customColours[colourSelection].Set(colourData.m_dataColour.Red(),
+ colourData.m_dataColour.Green(),
colourData.m_dataColour.Blue());
-
+
colourData.SetCustomColour(colourSelection, customColours[colourSelection]);
PaintCustomColours(dc);
#include "wx/dateevt.h"
#include "wx/generic/datectrl.h"
-#include "wx/arrstr.h"
+#include "wx/arrstr.h"
#include "wx/calctrl.h"
#include "wx/popupwin.h"
#include "wx/renderer.h"
m_popup->SetFont(GetFont());
wxPanel *panel=new wxPanel(m_popup, CTRLID_PAN,
- wxPoint(0, 0), wxDefaultSize,
+ wxPoint(), wxDefaultSize,
wxSUNKEN_BORDER);
m_cal = new wxCalendarCtrl(panel, CTRLID_CAL, wxDefaultDateTime,
- wxPoint(0,0), wxDefaultSize,
+ wxPoint(), wxDefaultSize,
wxCAL_SHOW_HOLIDAYS | wxSUNKEN_BORDER);
m_cal->Connect(CTRLID_CAL, CTRLID_CAL, wxEVT_CALENDAR_SEL_CHANGED,
(wxObjectEventFunction)
Init();
long treeStyle = wxTR_HAS_BUTTONS | wxTR_HIDE_ROOT;
-
+
#ifdef __WXGTK20__
treeStyle |= wxTR_NO_LINES;
#endif
filterStyle |= wxBORDER_SUNKEN;
m_treeCtrl = CreateTreeCtrl(this, wxID_TREECTRL,
- wxPoint(0,0), GetClientSize(), treeStyle);
+ wxPoint(), GetClientSize(), treeStyle);
if (!filter.empty() && (style & wxDIRCTRL_SHOW_FILTERS))
m_filterListCtrl = new wxDirFilterListCtrl(this, wxID_FILTERLISTCTRL, wxDefaultPosition, wxDefaultSize, filterStyle);
m_rootId = m_treeCtrl->AddRoot( rootName, 3, -1, rootData);
m_treeCtrl->SetItemHasChildren(m_rootId);
ExpandDir(m_rootId); // automatically expand first level
-
+
// Expand and select the default path
if (!m_defaultPath.empty())
{
// dragged.
wxSize clientSize;
- wxPoint pt(0, 0);
+ wxPoint pt;
if (!m_fullScreen)
{
clientSize = window->GetClientSize();
}
else
{
- rect = wxRect( 0, 0, 0, 0 );
+ rect = wxRect();
}
cellRect = CellToRect( bottomRight );
m_gridWin->GetClientSize( &cw, &ch );
if (right < 0 || bottom < 0 || left > cw || top > ch)
- return wxRect( 0, 0, 0, 0);
+ return wxRect();
rect.SetLeft( wxMax(0, left) );
rect.SetTop( wxMax(0, top) );
if ( IsSelected(n) )
{
wxHtmlSelection htmlSel;
- htmlSel.Set(wxPoint(0, 0), cell, wxPoint(INT_MAX, INT_MAX), cell);
+ htmlSel.Set(wxPoint(), cell, wxPoint(INT_MAX, INT_MAX), cell);
htmlRendInfo.SetSelection(&htmlSel);
if ( m_htmlRendStyle )
htmlRendInfo.SetStyle(m_htmlRendStyle);
{
const wxSize sizeList = m_list->GetSize();
- wxPoint pt(0, 0);
+ wxPoint pt;
wxRect rectPage(pt, GetClientSize());
switch ( GetWindowStyle() & wxLB_ALIGN_MASK )
{
else
{
// This is neccessary , because after a DnD operation in
- // from and to ourself, the up event is swallowed by the
+ // from and to ourself, the up event is swallowed by the
// DnD code. So on next non-up event (which means here and
// now) m_lineSelectSingleOnUp should be reset.
- m_lineSelectSingleOnUp = (size_t) -1;
+ m_lineSelectSingleOnUp = (size_t) -1;
}
if (event.RightDown())
{
}
else // multi sel & current is highlighted & no mod keys
{
- m_lineSelectSingleOnUp = current;
+ m_lineSelectSingleOnUp = current;
ChangeCurrent(current); // change focus
}
}
m_headerWin = new wxListHeaderWindow
(
this, wxID_ANY, m_mainWin,
- wxPoint(0, 0),
+ wxPoint(),
wxSize(GetClientSize().x, m_headerHeight),
wxTAB_TRAVERSAL
);
// don't create the inner window with the border
style &= ~wxBORDER_MASK;
- m_mainWin = new wxListMainWindow( this, wxID_ANY, wxPoint(0,0), size, style );
+ m_mainWin = new wxListMainWindow( this, wxID_ANY, wxPoint(), size, style );
#ifdef __WXMAC_CARBON__
// Human Interface Guidelines ask us for a special font in this case
{
SetWindowStyleFlag(style);
- bool success = wxNotebook::Create(parent, wxID_NOTEBOOK_CLIENT_AREA, wxPoint(0, 0), wxSize(100, 100), 0);
+ bool success = wxNotebook::Create(parent, wxID_NOTEBOOK_CLIENT_AREA, wxPoint(), wxSize(100, 100), 0);
if (success)
{
/*
wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent,
wxPrintDialogData* data)
: wxPrintDialogBase(parent, wxID_ANY, _("Print"),
- wxPoint(0, 0), wxSize(600, 600),
+ wxPoint(), wxSize(600, 600),
wxDEFAULT_DIALOG_STYLE |
wxTAB_TRAVERSAL)
{
wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent,
wxPrintData* data)
: wxPrintDialogBase(parent, wxID_ANY, _("Print"),
- wxPoint(0, 0), wxSize(600, 600),
+ wxPoint(), wxSize(600, 600),
wxDEFAULT_DIALOG_STYLE |
wxTAB_TRAVERSAL)
{
void wxGenericPrintDialog::Init(wxWindow * WXUNUSED(parent))
{
- // wxDialog::Create(parent, wxID_ANY, _("Print"), wxPoint(0, 0), wxSize(600, 600),
+ // wxDialog::Create(parent, wxID_ANY, _("Print"), wxPoint(), wxSize(600, 600),
// wxDEFAULT_DIALOG_STYLE | wxTAB_TRAVERSAL);
wxBoxSizer *mainsizer = new wxBoxSizer( wxVERTICAL );
END_EVENT_TABLE()
wxGenericPrintSetupDialog::wxGenericPrintSetupDialog(wxWindow *parent, wxPrintData* data):
-wxDialog(parent, wxID_ANY, _("Print Setup"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxTAB_TRAVERSAL)
+wxDialog(parent, wxID_ANY, _("Print Setup"), wxPoint(), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxTAB_TRAVERSAL)
{
Init(data);
}
: wxPageSetupDialogBase( parent,
wxID_ANY,
_("Page Setup"),
- wxPoint(0, 0),
+ wxPoint(),
wxSize(600, 600),
wxDEFAULT_DIALOG_STYLE|wxTAB_TRAVERSAL )
{
wxPoint pt[3] =
{
- wxPoint(0, 0),
+ wxPoint(),
wxPoint(rect.width, 0),
wxPoint(rect.width/2, rect.height - 2)
};
*/
wxSplashScreen::wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds, wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style):
- wxFrame(parent, id, wxEmptyString, wxPoint(0, 0), wxSize(100, 100), style)
+ wxFrame(parent, id, wxEmptyString, wxPoint(), wxSize(100, 100), style)
{
// At least for GTK+ 2.0, this hint is not available.
#if defined(__WXGTK20__)
GDK_WINDOW_TYPE_HINT_SPLASHSCREEN);
#endif
#endif
-
+
m_window = NULL;
m_splashStyle = splashStyle;
m_milliseconds = milliseconds;
m_firstY = 0;
m_sashPosition = m_requestedSashPosition = 0;
m_sashGravity = 0.0;
- m_lastSize = wxSize(0,0);
+ m_lastSize = wxSize();
m_checkRequestedSashPosition = false;
m_minimumPaneSize = 0;
m_sashCursorWE = wxCursor(wxCURSOR_SIZEWE);
if ( iconized )
{
- m_lastSize = wxSize(0,0);
+ m_lastSize = wxSize();
event.Skip();
y += wxSystemSettings::GetMetric(wxSYS_CURSOR_Y) / 2;
#if wxUSE_POPUPWIN
- Position(wxPoint(x, y), wxSize(0, 0));
+ Position(wxPoint(x, y), wxSize());
Popup(m_view);
#ifdef __WXGTK__
if (!GTK_WIDGET_HAS_GRAB(m_widget))