inline bool RightIsDown(void) const { return m_rightDown; }
// True if a button is down and the mouse is moving
- inline bool Dragging(void) const { return ((m_eventType == wxEVENT_TYPE_MOTION) && (LeftIsDown() || MiddleIsDown() || RightIsDown())); }
+ inline bool Dragging(void) const { return ((m_eventType == wxEVT_MOTION) && (LeftIsDown() || MiddleIsDown() || RightIsDown())); }
// True if the mouse is moving, and no button is down
inline bool Moving(void) const { return (m_eventType == wxEVT_MOTION); }
wxWindow *dialogParent;
// Area reserved for grids of colours
- wxRectangle standardColoursRect;
- wxRectangle customColoursRect;
- wxRectangle singleCustomColourRect;
+ wxRect standardColoursRect;
+ wxRect customColoursRect;
+ wxRect singleCustomColourRect;
// Size of each colour rectangle
wxIntPoint smallRectangleSize;
wxWindow *dialogParent;
// Area reserved for font display
- wxRectangle fontRect;
+ wxRect fontRect;
wxChoice *familyChoice;
wxChoice *styleChoice;
inline wxScrollBar *GetVertScrollBar(void) { return m_vScrollBar; }
inline bool GetEditable(void) { return m_editable; }
void SetEditable(bool edit);
- inline wxRectangle& GetCurrentRect(void) { return m_currentRect; }
+ inline wxRect& GetCurrentRect(void) { return m_currentRect; }
inline bool CurrentCellVisible(void) { return m_currentRectVisible; }
inline void SetDividerPen(wxPen *pen) { m_divisionPen = pen; }
inline wxPen *GetDividerPen(void) { return m_divisionPen; }
virtual void DrawEditableArea(wxDC *dc);
virtual void DrawGridLines(wxDC *dc);
virtual void DrawColumnLabels(wxDC *dc);
- virtual void DrawColumnLabel(wxDC *dc, wxRectangle *rect, int col);
+ virtual void DrawColumnLabel(wxDC *dc, wxRect *rect, int col);
virtual void DrawRowLabels(wxDC *dc);
- virtual void DrawRowLabel(wxDC *dc, wxRectangle *rect, int row);
+ virtual void DrawRowLabel(wxDC *dc, wxRect *rect, int row);
virtual void DrawCells(wxDC *dc);
- virtual void DrawCellValue(wxDC *dc, wxRectangle *rect, int row, int col);
- virtual void DrawCellBackground(wxDC *dc, wxRectangle *rect, int row, int col);
- virtual void DrawTextRect(wxDC *dc, const wxString& text, wxRectangle *rect, int flag);
- virtual void DrawBitmapRect(wxDC *dc, wxBitmap *bitmap, wxRectangle *rect, int flag);
+ virtual void DrawCellValue(wxDC *dc, wxRect *rect, int row, int col);
+ virtual void DrawCellBackground(wxDC *dc, wxRect *rect, int row, int col);
+ virtual void DrawTextRect(wxDC *dc, const wxString& text, wxRect *rect, int flag);
+ virtual void DrawBitmapRect(wxDC *dc, wxBitmap *bitmap, wxRect *rect, int flag);
// Refresh cell and optionally set the text field
void RefreshCell(int row, int col, bool setText = FALSE);
wxScrollBar* m_vScrollBar;
int m_wCursorRow;
int m_wCursorColumn;
- wxRectangle m_currentRect;
+ wxRect m_currentRect;
bool m_currentRectVisible;
wxGridCell*** m_gridCells;
wxGridCell** m_rowLabelCells;
wxBitmap* m_doubleBufferingBitmap;
// Position of Edit control
- wxRectangle m_editControlPosition;
+ wxRect m_editControlPosition;
// Drag status
int m_dragStatus;
virtual void DrawField(wxDC& dc, int i);
// Get the position and size of the field's internal bounding rectangle
- virtual bool GetFieldRect(int i, wxRectangle& rect) const;
+ virtual bool GetFieldRect(int i, wxRect& rect) const;
inline int GetBorderX() const { return m_borderX; }
inline int GetBorderY() const { return m_borderY; }
inline wxPen *GetBackgroundPen(void) const { return m_backgroundPen; }
inline wxBrush *GetBackgroundBrush(void) const { return m_backgroundBrush; }
- inline void SetViewRect(const wxRectangle& rect) { m_tabViewRect = rect; }
+ inline void SetViewRect(const wxRect& rect) { m_tabViewRect = rect; }
inline wxRect GetViewRect(void) const { return m_tabViewRect; }
// Calculate tab width to fit to view, and optionally adjust the view
~wxScreenDC(void);
static bool StartDrawingOnTop( wxWindow *window );
- static bool StartDrawingOnTop( wxRectangle *rect = (wxRectangle *) NULL );
+ static bool StartDrawingOnTop( wxRect *rect = (wxRect *) NULL );
static bool EndDrawingOnTop(void);
// implementation
~wxScreenDC(void);
static bool StartDrawingOnTop( wxWindow *window );
- static bool StartDrawingOnTop( wxRectangle *rect = (wxRectangle *) NULL );
+ static bool StartDrawingOnTop( wxRect *rect = (wxRect *) NULL );
static bool EndDrawingOnTop(void);
// implementation
bool SetItemData(long item, long data) ;
// Gets the item rectangle
- bool GetItemRect(long item, wxRectangle& rect, int code = wxLIST_RECT_BOUNDS) const ;
+ bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ;
// Gets the item position
bool GetItemPosition(long item, wxPoint& pos) const ;
}
// bounding rect
- bool GetItemRect(long item, wxRectangle& rect, bool textOnly = FALSE) const;
+ bool GetItemRect(long item, wxRect& rect, bool textOnly = FALSE) const;
//
wxTextCtrl* GetEditControl() const;
class WXDLLEXPORT wxColourMap;
class WXDLLEXPORT wxFont;
class WXDLLEXPORT wxMenu;
-class WXDLLEXPORT wxRectangle;
+class WXDLLEXPORT wxRect;
class WXDLLEXPORT wxBitmap;
class WXDLLEXPORT wxSizer;
class WXDLLEXPORT wxList;
virtual bool PopupMenu(wxMenu *menu, int x, int y);
// Send the window a refresh event
- virtual void Refresh(bool eraseBack = TRUE, const wxRectangle *rect = NULL);
+ virtual void Refresh(bool eraseBack = TRUE, const wxRect *rect = NULL);
// New functions that will replace the above.
virtual void SetScrollbar(int orient, int pos, int thumbVisible,
virtual int GetScrollRange(int orient) const;
virtual int GetScrollThumb(int orient) const;
- virtual void ScrollWindow(int dx, int dy, const wxRectangle *rect = NULL);
+ virtual void ScrollWindow(int dx, int dy, const wxRect *rect = NULL);
// Caret manipulation
virtual void CreateCaret(int w, int h);
// For double-click detection
long m_lastTS; // last timestamp
int m_lastButton; // last pressed button
- wxList m_updateRects; // List of wxRectangles representing damaged region
+ wxList m_updateRects; // List of wxRects representing damaged region
bool m_isShown;
protected:
WXWidget m_mainWidget;
// Compatibility with X's requirements for
// drawing on top of all windows
static bool StartDrawingOnTop(wxWindow* WXUNUSED(window)) { return TRUE; }
- static bool StartDrawingOnTop(wxRectangle* WXUNUSED(rect) = NULL) { return TRUE; }
+ static bool StartDrawingOnTop(wxRect* WXUNUSED(rect) = NULL) { return TRUE; }
static bool EndDrawingOnTop(void) { return TRUE; }
};
bool SetItemData(long item, long data) ;
// Gets the item rectangle
- bool GetItemRect(long item, wxRectangle& rect, int code = wxLIST_RECT_BOUNDS) const ;
+ bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ;
// Gets the item position
bool GetItemPosition(long item, wxPoint& pos) const ;
#include "wx/control.h"
#include "wx/event.h"
+#ifdef __MINGW32__
+#undef GetFirstChild()
+#undef GetNextSibling()
+#endif
+
// the type for "untyped" data
typedef long wxDataType;
// get the bounding rectangle of the item (or of its label only)
// @@@ do we really need to expose this functions to the application?
void GetBoundingRect(const wxTreeItemId& item,
- wxRectangle& rect,
+ wxRect& rect,
bool textOnly = FALSE) const;
// deprecated
// Compatibility with X's requirements for
// drawing on top of all windows
static bool StartDrawingOnTop(wxWindow* WXUNUSED(window)) { return TRUE; }
- static bool StartDrawingOnTop(wxRectangle* WXUNUSED(rect) = NULL) { return TRUE; }
+ static bool StartDrawingOnTop(wxRect* WXUNUSED(rect) = NULL) { return TRUE; }
static bool EndDrawingOnTop() { return TRUE; }
};
class WXDLLEXPORT wxColourMap;
class WXDLLEXPORT wxFont;
class WXDLLEXPORT wxMenu;
-class WXDLLEXPORT wxRectangle;
+class WXDLLEXPORT wxRect;
class WXDLLEXPORT wxBitmap;
class WXDLLEXPORT wxSizer;
class WXDLLEXPORT wxList;
virtual bool PopupMenu(wxMenu *menu, int x, int y);
// Send the window a refresh event
- virtual void Refresh(bool eraseBack = TRUE, const wxRectangle *rect = NULL);
+ virtual void Refresh(bool eraseBack = TRUE, const wxRect *rect = NULL);
// New functions that will replace the above.
virtual void SetScrollbar(int orient, int pos, int thumbVisible,
virtual int GetScrollRange(int orient) const;
virtual int GetScrollThumb(int orient) const;
- virtual void ScrollWindow(int dx, int dy, const wxRectangle *rect = NULL);
+ virtual void ScrollWindow(int dx, int dy, const wxRect *rect = NULL);
// Caret manipulation
virtual void CreateCaret(int w, int h);
// Compatibility with X's requirements for
// drawing on top of all windows
static bool StartDrawingOnTop(wxWindow* WXUNUSED(window)) { return TRUE; }
- static bool StartDrawingOnTop(wxRectangle* WXUNUSED(rect) = NULL) { return TRUE; }
+ static bool StartDrawingOnTop(wxRect* WXUNUSED(rect) = NULL) { return TRUE; }
static bool EndDrawingOnTop() { return TRUE; }
};
bool SetItemData(long item, long data) ;
// Gets the item rectangle
- bool GetItemRect(long item, wxRectangle& rect, int code = wxLIST_RECT_BOUNDS) const ;
+ bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ;
// Gets the item position
bool GetItemPosition(long item, wxPoint& pos) const ;
}
// bounding rect
- bool GetItemRect(long item, wxRectangle& rect, bool textOnly = FALSE) const;
+ bool GetItemRect(long item, wxRect& rect, bool textOnly = FALSE) const;
//
wxTextCtrl* GetEditControl() const;
class WXDLLEXPORT wxColourMap;
class WXDLLEXPORT wxFont;
class WXDLLEXPORT wxMenu;
-class WXDLLEXPORT wxRectangle;
+class WXDLLEXPORT wxRect;
class WXDLLEXPORT wxBitmap;
class WXDLLEXPORT wxSizer;
class WXDLLEXPORT wxList;
virtual bool PopupMenu(wxMenu *menu, int x, int y);
// Send the window a refresh event
- virtual void Refresh(bool eraseBack = TRUE, const wxRectangle *rect = NULL);
+ virtual void Refresh(bool eraseBack = TRUE, const wxRect *rect = NULL);
// New functions that will replace the above.
virtual void SetScrollbar(int orient, int pos, int thumbVisible,
virtual int GetScrollRange(int orient) const;
virtual int GetScrollThumb(int orient) const;
- virtual void ScrollWindow(int dx, int dy, const wxRectangle *rect = NULL);
+ virtual void ScrollWindow(int dx, int dy, const wxRect *rect = NULL);
// Caret manipulation
virtual void CreateCaret(int w, int h);
return;
int i;
- wxRectangle rect;
+ wxRect rect;
// Draw letters for columns
rect.y = m_topOfSheet + 1;
}
}
-void wxGenericGrid::DrawColumnLabel(wxDC *dc, wxRectangle *rect, int col)
+void wxGenericGrid::DrawColumnLabel(wxDC *dc, wxRect *rect, int col)
{
wxGridCell *cell = GetLabelCell(wxHORIZONTAL, col);
if (cell)
{
- wxRectangle rect2;
+ wxRect rect2;
rect2 = *rect;
rect2.x += 3;
rect2.y += 2;
return;
int i;
- wxRectangle rect;
+ wxRect rect;
// Draw numbers for rows
rect.x = m_leftOfSheet;
}
}
-void wxGenericGrid::DrawRowLabel(wxDC *dc, wxRectangle *rect, int row)
+void wxGenericGrid::DrawRowLabel(wxDC *dc, wxRect *rect, int row)
{
wxGridCell *cell = GetLabelCell(wxVERTICAL, row);
if (cell)
{
- wxRectangle rect2;
+ wxRect rect2;
rect2 = *rect;
rect2.x += 3;
rect2.y += 2;
dc->SetPen(*wxBLACK_PEN);
}
-void wxGenericGrid::DrawCellBackground(wxDC *dc, wxRectangle *rect, int row, int col)
+void wxGenericGrid::DrawCellBackground(wxDC *dc, wxRect *rect, int row, int col)
{
wxGridCell *cell = GetCell(row, col);
if (cell)
}
}
-void wxGenericGrid::DrawCellValue(wxDC *dc, wxRectangle *rect, int row, int col)
+void wxGenericGrid::DrawCellValue(wxDC *dc, wxRect *rect, int row, int col)
{
wxGridCell *cell = GetCell(row, col);
if (cell)
{
wxBitmap *bitmap = cell->GetCellBitmap();
- wxRectangle rect2;
+ wxRect rect2;
rect2 = *rect;
rect2.x += 3;
rect2.y += 2;
strcpy(szEdit, m_textItem->GetValue());
- wxRectangle rect;
+ wxRect rect;
rect = m_currentRect;
rect.x += 3;
rect.y += 2;
else m_currentRectVisible = TRUE;
}
-static bool wxRectIntersection(wxRectangle *rect1, wxRectangle *rect2, wxRectangle *rect3)
+static bool wxRectIntersection(wxRect *rect1, wxRect *rect2, wxRect *rect3)
{
int x2_1 = rect1->x + rect1->width;
int y2_1 = rect1->y + rect1->height;
return TRUE;
}
-void wxGenericGrid::DrawTextRect(wxDC *dc, const wxString& text, wxRectangle *rect, int flag)
+void wxGenericGrid::DrawTextRect(wxDC *dc, const wxString& text, wxRect *rect, int flag)
{
dc->BeginDrawing();
// If we're already clipping, we need to find the intersection
// between current clipping area and text clipping area.
- wxRectangle clipRect;
- wxRectangle clipRect2;
+ wxRect clipRect;
+ wxRect clipRect2;
long clipX, clipY, clipW, clipH;
dc->GetClippingBox(&clipX, &clipY, &clipW, &clipH);
clipRect.x = (int)clipX; clipRect.y = (int)clipY;
dc->EndDrawing();
}
-void wxGenericGrid::DrawBitmapRect(wxDC *dc, wxBitmap *bitmap, wxRectangle *rect, int flag)
+void wxGenericGrid::DrawBitmapRect(wxDC *dc, wxBitmap *bitmap, wxRect *rect, int flag)
{
dc->BeginDrawing();
// If we're already clipping, we need to find the intersection
// between current clipping area and text clipping area.
- wxRectangle clipRect;
- wxRectangle clipRect2;
+ wxRect clipRect;
+ wxRect clipRect2;
long clipX, clipY, clipW, clipH;
dc->GetClippingBox(&clipX, &clipY, &clipW, &clipH);
clipRect.x = (int)clipX; clipRect.y = (int)clipY;
{
int leftMargin = 2;
- wxRectangle rect;
+ wxRect rect;
GetFieldRect(i, rect);
wxString text(GetStatusText(i));
void wxStatusBar::DrawField(wxDC& dc, int i)
{
- wxRectangle rect;
+ wxRect rect;
GetFieldRect(i, rect);
// Draw border
}
// Get the position and size of the field's internal bounding rectangle
-bool wxStatusBar::GetFieldRect(int n, wxRectangle& rect) const
+bool wxStatusBar::GetFieldRect(int n, wxRect& rect) const
{
if ((n < 0) || (n >= m_nFields))
return FALSE;
window->GetSize( &w, &h );
window->ClientToScreen( &x, &y );
- wxRectangle rect;
+ wxRect rect;
rect.x = x;
rect.y = y;
rect.width = 0;
return StartDrawingOnTop( &rect );
}
-bool wxScreenDC::StartDrawingOnTop( wxRectangle *rect )
+bool wxScreenDC::StartDrawingOnTop( wxRect *rect )
{
int x = 0;
int y = 0;
window->GetSize( &w, &h );
window->ClientToScreen( &x, &y );
- wxRectangle rect;
+ wxRect rect;
rect.x = x;
rect.y = y;
rect.width = 0;
return StartDrawingOnTop( &rect );
}
-bool wxScreenDC::StartDrawingOnTop( wxRectangle *rect )
+bool wxScreenDC::StartDrawingOnTop( wxRect *rect )
{
int x = 0;
int y = 0;
}
// Gets the item rectangle
-bool wxListCtrl::GetItemRect(long item, wxRectangle& rect, int code) const
+bool wxListCtrl::GetItemRect(long item, wxRect& rect, int code) const
{
// TODO
return FALSE;
return SetItem(info);
}
-bool wxTreeCtrl::GetItemRect(long item, wxRectangle& rect, bool textOnly) const
+bool wxTreeCtrl::GetItemRect(long item, wxRect& rect, bool textOnly) const
{
// TODO
return FALSE;
*externalLeading = 0;
}
-void wxWindow::Refresh(bool eraseBack, const wxRectangle *rect)
+void wxWindow::Refresh(bool eraseBack, const wxRect *rect)
{
Display *display = XtDisplay((Widget) GetMainWidget());
Window thisWindow = XtWindow((Widget) GetMainWidget());
}
// Does a physical scroll
-void wxWindow::ScrollWindow(int dx, int dy, const wxRectangle *rect)
+void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect)
{
// cerr << "Scrolling. delta = " << dx << ", " << dy << endl;
int x, y, w, h;
}
// Gets the item rectangle
-bool wxListCtrl::GetItemRect(long item, wxRectangle& rect, int code) const
+bool wxListCtrl::GetItemRect(long item, wxRect& rect, int code) const
{
RECT rect2;
// fontToUse->ReleaseResource();
}
-void wxWindow::Refresh(bool eraseBack, const wxRectangle *rect)
+void wxWindow::Refresh(bool eraseBack, const wxRect *rect)
{
HWND hWnd = (HWND) GetHWND();
if (hWnd)
}
}
-void wxWindow::ScrollWindow(int dx, int dy, const wxRectangle *rect)
+void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect)
{
RECT rect2;
if ( rect )
// TODO
}
-void wxWindow::Refresh(bool eraseBack, const wxRectangle *rect)
+void wxWindow::Refresh(bool eraseBack, const wxRect *rect)
{
// TODO
}
}
// Does a physical scroll
-void wxWindow::ScrollWindow(int dx, int dy, const wxRectangle *rect)
+void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect)
{
// TODO
return 0;
}
// Gets the item rectangle
-bool wxListCtrl::GetItemRect(long item, wxRectangle& rect, int code) const
+bool wxListCtrl::GetItemRect(long item, wxRect& rect, int code) const
{
// TODO
return FALSE;
return SetItem(info);
}
-bool wxTreeCtrl::GetItemRect(long item, wxRectangle& rect, bool textOnly) const
+bool wxTreeCtrl::GetItemRect(long item, wxRect& rect, bool textOnly) const
{
// TODO
return FALSE;
// TODO
}
-void wxWindow::Refresh(bool eraseBack, const wxRectangle *rect)
+void wxWindow::Refresh(bool eraseBack, const wxRect *rect)
{
// TODO
}
}
// Does a physical scroll
-void wxWindow::ScrollWindow(int dx, int dy, const wxRectangle *rect)
+void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect)
{
// TODO
return;
void* platformPrint = printInfo->print.embedPrint.platformPrint;
HDC hDC = (HDC) platformPrint;
- wxRectangle rect;
+ wxRect rect;
rect.x = printWindow->x;
rect.y = printWindow->y;
rect.width = printWindow->width;
}
}
-void wxPluginFrame::OnPrint(wxPrinterDC& dc, wxRectangle& rect)
+void wxPluginFrame::OnPrint(wxPrinterDC& dc, wxRect& rect)
{
// We must do some transformations here
RECT winRect;
virtual void OnNPPrint(NPPrint* printInfo);
// Overridables: high-level
- virtual void OnPrint(wxPrinterDC& dc, wxRectangle& rect);
+ virtual void OnPrint(wxPrinterDC& dc, wxRect& rect);
virtual void OnDraw(wxDC& dc);
protected: