many warnings fixed (from HP-UX compilation log)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -317,15 +317,13 @@ public:
|
|||||||
private:
|
private:
|
||||||
wxString m_text;
|
wxString m_text;
|
||||||
|
|
||||||
#if defined(__VISAGECPP__)
|
// virtual function hiding supression
|
||||||
// Virtual function hiding supression
|
size_t GetDataSize(const wxDataFormat& format) const
|
||||||
size_t GetDataSize(const wxDataFormat& rFormat) const
|
{ return(wxDataObjectSimple::GetDataSize(format)); }
|
||||||
{ return(wxDataObjectSimple::GetDataSize(rFormat)); }
|
bool GetDataHere(const wxDataFormat& WXUNUSED(format), void *pBuf) const
|
||||||
bool GetDataHere(const wxDataFormat& WXUNUSED(rFormat), void *pBuf) const
|
{ return(wxDataObjectSimple::GetDataHere(pBuf)); }
|
||||||
{ return(GetDataHere(pBuf)); }
|
bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
|
||||||
bool SetData(const wxDataFormat& rFormat, size_t nLen, const void* pBuf)
|
{ return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
|
||||||
{ return(wxDataObjectSimple::SetData(rFormat, nLen, pBuf)); }
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -374,14 +372,12 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
wxArrayString m_filenames;
|
wxArrayString m_filenames;
|
||||||
|
|
||||||
#if defined(__VISAGECPP__)
|
|
||||||
private:
|
private:
|
||||||
// Virtual function hiding supression
|
// Virtual function hiding supression
|
||||||
size_t GetDataSize(const wxDataFormat& rFormat) const
|
size_t GetDataSize(const wxDataFormat& format) const
|
||||||
{ return(wxDataObjectSimple::GetDataSize(rFormat)); }
|
{ return(wxDataObjectSimple::GetDataSize(format)); }
|
||||||
bool GetDataHere(const wxDataFormat& WXUNUSED(rformat), void* pBuf) const
|
bool GetDataHere(const wxDataFormat& WXUNUSED(format), void* pBuf) const
|
||||||
{ return(GetDataHere(pBuf)); }
|
{ return(wxDataObjectSimple::GetDataHere(pBuf)); }
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -429,15 +425,13 @@ private:
|
|||||||
size_t m_size;
|
size_t m_size;
|
||||||
void *m_data;
|
void *m_data;
|
||||||
|
|
||||||
#if defined(__VISAGECPP__)
|
// virtual function hiding supression
|
||||||
// Virtual function hiding supression
|
size_t GetDataSize(const wxDataFormat& format) const
|
||||||
size_t GetDataSize(const wxDataFormat& rFormat) const
|
{ return(wxDataObjectSimple::GetDataSize(format)); }
|
||||||
{ return(wxDataObjectSimple::GetDataSize(rFormat)); }
|
bool GetDataHere(const wxDataFormat& format, void* pBuf) const
|
||||||
bool GetDataHere(const wxDataFormat& rFormat, void* pBuf) const
|
{ return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
|
||||||
{ return(wxDataObjectSimple::GetDataHere(rFormat, pBuf)); }
|
bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
|
||||||
bool SetData(const wxDataFormat& rFormat, size_t nLen, const void* pBuf)
|
{ return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
|
||||||
{ return(wxDataObjectSimple::SetData(rFormat, nLen, pBuf)); }
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -605,15 +605,21 @@ public:
|
|||||||
bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); }
|
bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); }
|
||||||
|
|
||||||
// Find the position of the event
|
// Find the position of the event
|
||||||
void GetPosition(long *xpos, long *ypos) const
|
void GetPosition(wxCoord *xpos, wxCoord *ypos) const
|
||||||
{ if (xpos) *xpos = m_x;
|
{
|
||||||
if (ypos) *ypos = m_y; }
|
if (xpos)
|
||||||
|
*xpos = m_x;
|
||||||
|
if (ypos)
|
||||||
|
*ypos = m_y;
|
||||||
|
}
|
||||||
|
|
||||||
void GetPosition(int *xpos, int *ypos) const
|
void GetPosition(int *xpos, int *ypos) const
|
||||||
{ if (xpos) *xpos = m_x;
|
{
|
||||||
if (ypos) *ypos = m_y; }
|
if (xpos)
|
||||||
void Position(long *xpos, long *ypos) const
|
*xpos = (int)m_x;
|
||||||
{ if (xpos) *xpos = m_x;
|
if (ypos)
|
||||||
if (ypos) *ypos = m_y; }
|
*ypos = (int)m_y;
|
||||||
|
}
|
||||||
|
|
||||||
// Find the position of the event
|
// Find the position of the event
|
||||||
wxPoint GetPosition() const { return wxPoint(m_x, m_y); }
|
wxPoint GetPosition() const { return wxPoint(m_x, m_y); }
|
||||||
@@ -623,6 +629,14 @@ public:
|
|||||||
|
|
||||||
// Compatibility
|
// Compatibility
|
||||||
#if WXWIN_COMPATIBILITY
|
#if WXWIN_COMPATIBILITY
|
||||||
|
void Position(long *xpos, long *ypos) const
|
||||||
|
{
|
||||||
|
if (xpos)
|
||||||
|
*xpos = (long)m_x;
|
||||||
|
if (ypos)
|
||||||
|
*ypos = (long)m_y;
|
||||||
|
}
|
||||||
|
|
||||||
void Position(float *xpos, float *ypos) const
|
void Position(float *xpos, float *ypos) const
|
||||||
{
|
{
|
||||||
*xpos = (float) m_x; *ypos = (float) m_y;
|
*xpos = (float) m_x; *ypos = (float) m_y;
|
||||||
@@ -638,8 +652,8 @@ public:
|
|||||||
void CopyObject(wxObject& obj) const;
|
void CopyObject(wxObject& obj) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
long m_x;
|
wxCoord m_x, m_y;
|
||||||
long m_y;
|
|
||||||
bool m_leftDown;
|
bool m_leftDown;
|
||||||
bool m_middleDown;
|
bool m_middleDown;
|
||||||
bool m_rightDown;
|
bool m_rightDown;
|
||||||
@@ -674,28 +688,34 @@ public:
|
|||||||
long KeyCode() const { return m_keyCode; }
|
long KeyCode() const { return m_keyCode; }
|
||||||
|
|
||||||
// Find the position of the event
|
// Find the position of the event
|
||||||
void GetPosition(long *xpos, long *ypos) const
|
void GetPosition(wxCoord *xpos, wxCoord *ypos) const
|
||||||
{ if (xpos) *xpos = m_x;
|
{
|
||||||
if (ypos) *ypos = m_y; }
|
if (xpos) *xpos = m_x;
|
||||||
|
if (ypos) *ypos = m_y;
|
||||||
|
}
|
||||||
|
|
||||||
void GetPosition(int *xpos, int *ypos) const
|
void GetPosition(int *xpos, int *ypos) const
|
||||||
{ if (xpos) *xpos = m_x;
|
{
|
||||||
if (ypos) *ypos = m_y; }
|
if (xpos) *xpos = (int)m_x;
|
||||||
|
if (ypos) *ypos = (int)m_y;
|
||||||
|
}
|
||||||
|
|
||||||
wxPoint GetPosition() const
|
wxPoint GetPosition() const
|
||||||
{ return wxPoint(m_x, m_y); }
|
{ return wxPoint(m_x, m_y); }
|
||||||
|
|
||||||
// Get X position
|
// Get X position
|
||||||
long GetX() const { return m_x; }
|
wxCoord GetX() const { return m_x; }
|
||||||
|
|
||||||
// Get Y position
|
// Get Y position
|
||||||
long GetY() const { return m_y; }
|
wxCoord GetY() const { return m_y; }
|
||||||
|
|
||||||
void CopyObject(wxObject& obj) const;
|
void CopyObject(wxObject& obj) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
long m_x;
|
wxCoord m_x, m_y;
|
||||||
long m_y;
|
|
||||||
long m_keyCode;
|
long m_keyCode;
|
||||||
|
|
||||||
bool m_controlDown;
|
bool m_controlDown;
|
||||||
bool m_shiftDown;
|
bool m_shiftDown;
|
||||||
bool m_altDown;
|
bool m_altDown;
|
||||||
|
@@ -48,6 +48,15 @@ protected:
|
|||||||
void *m_pngData;
|
void *m_pngData;
|
||||||
|
|
||||||
void DoConvertToPng();
|
void DoConvertToPng();
|
||||||
|
|
||||||
|
private:
|
||||||
|
// virtual function hiding supression
|
||||||
|
size_t GetDataSize(const wxDataFormat& format) const
|
||||||
|
{ return(wxDataObjectSimple::GetDataSize(format)); }
|
||||||
|
bool GetDataHere(const wxDataFormat& format, void* pBuf) const
|
||||||
|
{ return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
|
||||||
|
bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
|
||||||
|
{ return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -65,6 +74,15 @@ public:
|
|||||||
virtual size_t GetDataSize() const;
|
virtual size_t GetDataSize() const;
|
||||||
virtual bool GetDataHere(void *buf) const;
|
virtual bool GetDataHere(void *buf) const;
|
||||||
virtual bool SetData(size_t len, const void *buf);
|
virtual bool SetData(size_t len, const void *buf);
|
||||||
|
|
||||||
|
private:
|
||||||
|
// virtual function hiding supression
|
||||||
|
size_t GetDataSize(const wxDataFormat& format) const
|
||||||
|
{ return(wxDataObjectSimple::GetDataSize(format)); }
|
||||||
|
bool GetDataHere(const wxDataFormat& format, void* pBuf) const
|
||||||
|
{ return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
|
||||||
|
bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
|
||||||
|
{ return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _WX_GTK_DATAOBJ2_H_
|
#endif // _WX_GTK_DATAOBJ2_H_
|
||||||
|
@@ -116,12 +116,12 @@ public:
|
|||||||
void operator ++ ();
|
void operator ++ ();
|
||||||
void operator ++ (int);
|
void operator ++ (int);
|
||||||
|
|
||||||
long GetX() const;
|
wxCoord GetX() const;
|
||||||
long GetY() const;
|
wxCoord GetY() const;
|
||||||
long GetW() const;
|
wxCoord GetW() const;
|
||||||
long GetWidth() const { return GetW(); }
|
wxCoord GetWidth() const { return GetW(); }
|
||||||
long GetH() const;
|
wxCoord GetH() const;
|
||||||
long GetHeight() const { return GetH(); }
|
wxCoord GetHeight() const { return GetH(); }
|
||||||
wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); }
|
wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -48,6 +48,15 @@ protected:
|
|||||||
void *m_pngData;
|
void *m_pngData;
|
||||||
|
|
||||||
void DoConvertToPng();
|
void DoConvertToPng();
|
||||||
|
|
||||||
|
private:
|
||||||
|
// virtual function hiding supression
|
||||||
|
size_t GetDataSize(const wxDataFormat& format) const
|
||||||
|
{ return(wxDataObjectSimple::GetDataSize(format)); }
|
||||||
|
bool GetDataHere(const wxDataFormat& format, void* pBuf) const
|
||||||
|
{ return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
|
||||||
|
bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
|
||||||
|
{ return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -65,6 +74,15 @@ public:
|
|||||||
virtual size_t GetDataSize() const;
|
virtual size_t GetDataSize() const;
|
||||||
virtual bool GetDataHere(void *buf) const;
|
virtual bool GetDataHere(void *buf) const;
|
||||||
virtual bool SetData(size_t len, const void *buf);
|
virtual bool SetData(size_t len, const void *buf);
|
||||||
|
|
||||||
|
private:
|
||||||
|
// virtual function hiding supression
|
||||||
|
size_t GetDataSize(const wxDataFormat& format) const
|
||||||
|
{ return(wxDataObjectSimple::GetDataSize(format)); }
|
||||||
|
bool GetDataHere(const wxDataFormat& format, void* pBuf) const
|
||||||
|
{ return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
|
||||||
|
bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
|
||||||
|
{ return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _WX_GTK_DATAOBJ2_H_
|
#endif // _WX_GTK_DATAOBJ2_H_
|
||||||
|
@@ -116,12 +116,12 @@ public:
|
|||||||
void operator ++ ();
|
void operator ++ ();
|
||||||
void operator ++ (int);
|
void operator ++ (int);
|
||||||
|
|
||||||
long GetX() const;
|
wxCoord GetX() const;
|
||||||
long GetY() const;
|
wxCoord GetY() const;
|
||||||
long GetW() const;
|
wxCoord GetW() const;
|
||||||
long GetWidth() const { return GetW(); }
|
wxCoord GetWidth() const { return GetW(); }
|
||||||
long GetH() const;
|
wxCoord GetH() const;
|
||||||
long GetHeight() const { return GetH(); }
|
wxCoord GetHeight() const { return GetH(); }
|
||||||
wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); }
|
wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -40,9 +40,9 @@ class WXDLLEXPORT wxToolBarTool: public wxObject
|
|||||||
public:
|
public:
|
||||||
wxToolBarTool() {}
|
wxToolBarTool() {}
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
wxToolBarTool(wxToolBar *owner,
|
wxToolBarTool(wxToolBar *owner,
|
||||||
int theIndex = 0, const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap,
|
int theIndex = 0, const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap,
|
||||||
bool toggle = FALSE, wxObject *clientData = (wxObject *) NULL,
|
bool toggle = FALSE, wxObject *clientData = (wxObject *) NULL,
|
||||||
const wxString& shortHelpString = "", const wxString& longHelpString = "",
|
const wxString& shortHelpString = "", const wxString& longHelpString = "",
|
||||||
GtkWidget *pixmap = (GtkWidget *) NULL );
|
GtkWidget *pixmap = (GtkWidget *) NULL );
|
||||||
#else
|
#else
|
||||||
@@ -84,8 +84,8 @@ class WXDLLEXPORT wxToolBarBase : public wxControl
|
|||||||
DECLARE_ABSTRACT_CLASS(wxToolBarBase)
|
DECLARE_ABSTRACT_CLASS(wxToolBarBase)
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxToolBarBase(void);
|
wxToolBarBase();
|
||||||
~wxToolBarBase(void);
|
~wxToolBarBase();
|
||||||
|
|
||||||
// Handle wxToolBar events
|
// Handle wxToolBar events
|
||||||
|
|
||||||
@@ -105,14 +105,14 @@ class WXDLLEXPORT wxToolBarBase : public wxControl
|
|||||||
virtual wxToolBarTool *AddTool(int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap,
|
virtual wxToolBarTool *AddTool(int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap,
|
||||||
bool toggle = FALSE, long xPos = -1, long yPos = -1, wxObject *clientData = NULL,
|
bool toggle = FALSE, long xPos = -1, long yPos = -1, wxObject *clientData = NULL,
|
||||||
const wxString& helpString1 = wxEmptyString, const wxString& helpString2 = wxEmptyString);
|
const wxString& helpString1 = wxEmptyString, const wxString& helpString2 = wxEmptyString);
|
||||||
virtual void AddSeparator(void);
|
virtual void AddSeparator();
|
||||||
virtual void ClearTools(void);
|
virtual void ClearTools();
|
||||||
|
|
||||||
virtual void EnableTool(int toolIndex, bool enable);
|
virtual void EnableTool(int toolIndex, bool enable);
|
||||||
virtual void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on
|
virtual void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on
|
||||||
virtual void SetToggle(int toolIndex, bool toggle); // Set this to be togglable (or not)
|
virtual void SetToggle(int toolIndex, bool toggle); // Set this to be togglable (or not)
|
||||||
virtual wxObject *GetToolClientData(int index) const;
|
virtual wxObject *GetToolClientData(int index) const;
|
||||||
inline wxList& GetTools(void) const { return (wxList&) m_tools; }
|
inline wxList& GetTools() const { return (wxList&) m_tools; }
|
||||||
|
|
||||||
// After the toolbar has initialized, this is the size the tools take up
|
// After the toolbar has initialized, this is the size the tools take up
|
||||||
#if WXWXIN_COMPATIBILITY
|
#if WXWXIN_COMPATIBILITY
|
||||||
@@ -135,34 +135,34 @@ class WXDLLEXPORT wxToolBarBase : public wxControl
|
|||||||
virtual void SetToolPacking(int packing);
|
virtual void SetToolPacking(int packing);
|
||||||
virtual void SetToolSeparation(int separation);
|
virtual void SetToolSeparation(int separation);
|
||||||
|
|
||||||
inline virtual wxSize GetToolMargins(void) { return wxSize(m_xMargin, m_yMargin); }
|
inline virtual wxSize GetToolMargins() { return wxSize(m_xMargin, m_yMargin); }
|
||||||
inline virtual int GetToolPacking(void) { return m_toolPacking; }
|
inline virtual int GetToolPacking() { return m_toolPacking; }
|
||||||
inline virtual int GetToolSeparation(void) { return m_toolSeparation; }
|
inline virtual int GetToolSeparation() { return m_toolSeparation; }
|
||||||
|
|
||||||
virtual void SetToolBitmapSize(const wxSize& size) { m_defaultWidth = size.x; m_defaultHeight = size.y; };
|
virtual void SetToolBitmapSize(const wxSize& size) { m_defaultWidth = size.x; m_defaultHeight = size.y; };
|
||||||
virtual wxSize GetToolBitmapSize(void) const { return wxSize(m_defaultWidth, m_defaultHeight); }
|
virtual wxSize GetToolBitmapSize() const { return wxSize(m_defaultWidth, m_defaultHeight); }
|
||||||
|
|
||||||
// The button size (in some implementations) is bigger than the bitmap size: this returns
|
// The button size (in some implementations) is bigger than the bitmap size: this returns
|
||||||
// the total button size.
|
// the total button size.
|
||||||
virtual wxSize GetToolSize(void) const { return wxSize(m_defaultWidth, m_defaultHeight); } ;
|
virtual wxSize GetToolSize() const { return wxSize(m_defaultWidth, m_defaultHeight); } ;
|
||||||
|
|
||||||
// Compatibility
|
// Compatibility
|
||||||
#if WXWIN_COMPATIBILITY
|
#if WXWIN_COMPATIBILITY
|
||||||
inline void SetDefaultSize(int w, int h) { SetDefaultSize(wxSize(w, h)); }
|
void SetDefaultSize(int w, int h) { SetDefaultSize(wxSize(w, h)); }
|
||||||
inline long GetDefaultWidth(void) const { return m_defaultWidth; }
|
long GetDefaultWidth() const { return m_defaultWidth; }
|
||||||
inline long GetDefaultHeight(void) const { return m_defaultHeight; }
|
long GetDefaultHeight() const { return m_defaultHeight; }
|
||||||
inline int GetDefaultButtonWidth(void) const { return (int) GetDefaultButtonSize().x; };
|
int GetDefaultButtonWidth() const { return (int) GetDefaultButtonSize().x; };
|
||||||
inline int GetDefaultButtonHeight(void) const { return (int) GetDefaultButtonSize().y; };
|
int GetDefaultButtonHeight() const { return (int) GetDefaultButtonSize().y; };
|
||||||
virtual void SetDefaultSize(const wxSize& size) { SetToolBitmapSize(size); }
|
virtual void SetDefaultSize(const wxSize& size) { SetToolBitmapSize(size); }
|
||||||
virtual wxSize GetDefaultSize(void) const { return GetToolBitmapSize(); }
|
virtual wxSize GetDefaultSize() const { return GetToolBitmapSize(); }
|
||||||
virtual wxSize GetDefaultButtonSize(void) const { return GetToolSize(); }
|
virtual wxSize GetDefaultButtonSize() const { return GetToolSize(); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Lay the tools out
|
// Lay the tools out
|
||||||
virtual void LayoutTools();
|
virtual void LayoutTools();
|
||||||
|
|
||||||
// Add all the buttons: required for Win95.
|
// Add all the buttons: required for Win95.
|
||||||
virtual bool CreateTools(void) { return TRUE; }
|
virtual bool CreateTools() { return TRUE; }
|
||||||
|
|
||||||
// Calls the appropriate function after tools have been created.
|
// Calls the appropriate function after tools have been created.
|
||||||
// E.g. Layout, or CreateTools.
|
// E.g. Layout, or CreateTools.
|
||||||
@@ -184,7 +184,7 @@ class WXDLLEXPORT wxToolBarBase : public wxControl
|
|||||||
virtual void Scroll(int x_pos, int y_pos);
|
virtual void Scroll(int x_pos, int y_pos);
|
||||||
virtual void GetScrollPixelsPerUnit(int *x_unit, int *y_unit) const;
|
virtual void GetScrollPixelsPerUnit(int *x_unit, int *y_unit) const;
|
||||||
virtual void EnableScrolling(bool x_scrolling, bool y_scrolling);
|
virtual void EnableScrolling(bool x_scrolling, bool y_scrolling);
|
||||||
virtual void AdjustScrollbars(void);
|
virtual void AdjustScrollbars();
|
||||||
|
|
||||||
// Prepare the DC by translating it according to the current scroll position
|
// Prepare the DC by translating it according to the current scroll position
|
||||||
virtual void PrepareDC(wxDC& dc);
|
virtual void PrepareDC(wxDC& dc);
|
||||||
@@ -199,7 +199,7 @@ class WXDLLEXPORT wxToolBarBase : public wxControl
|
|||||||
virtual void GetVirtualSize(int *x, int *y) const;
|
virtual void GetVirtualSize(int *x, int *y) const;
|
||||||
|
|
||||||
// Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
|
// Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
|
||||||
virtual void DoToolbarUpdates(void);
|
virtual void DoToolbarUpdates();
|
||||||
|
|
||||||
inline void SetMaxRowsCols(int rows, int cols) { m_maxRows = rows; m_maxCols = cols; }
|
inline void SetMaxRowsCols(int rows, int cols) { m_maxRows = rows; m_maxCols = cols; }
|
||||||
inline int GetMaxRows() const { return m_maxRows; }
|
inline int GetMaxRows() const { return m_maxRows; }
|
||||||
@@ -222,13 +222,14 @@ class WXDLLEXPORT wxToolBarBase : public wxControl
|
|||||||
int m_yMargin;
|
int m_yMargin;
|
||||||
int m_toolPacking;
|
int m_toolPacking;
|
||||||
int m_toolSeparation;
|
int m_toolSeparation;
|
||||||
long m_defaultWidth;
|
|
||||||
long m_defaultHeight;
|
wxCoord m_defaultWidth;
|
||||||
|
wxCoord m_defaultHeight;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
//// IMPLEMENTATION
|
//// IMPLEMENTATION
|
||||||
|
|
||||||
// Calculate scroll increment
|
// Calculate scroll increment
|
||||||
virtual int CalcScrollInc(wxScrollEvent& event);
|
virtual int CalcScrollInc(wxScrollEvent& event);
|
||||||
|
|
||||||
|
@@ -348,7 +348,8 @@ void wxClipboard::Clear()
|
|||||||
{
|
{
|
||||||
m_waiting = TRUE;
|
m_waiting = TRUE;
|
||||||
|
|
||||||
gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom, GDK_CURRENT_TIME );
|
gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom,
|
||||||
|
(guint32) GDK_CURRENT_TIME );
|
||||||
|
|
||||||
while (m_waiting) gtk_main_iteration();
|
while (m_waiting) gtk_main_iteration();
|
||||||
}
|
}
|
||||||
@@ -357,7 +358,8 @@ void wxClipboard::Clear()
|
|||||||
{
|
{
|
||||||
m_waiting = TRUE;
|
m_waiting = TRUE;
|
||||||
|
|
||||||
gtk_selection_owner_set( (GtkWidget*) NULL, GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME );
|
gtk_selection_owner_set( (GtkWidget*) NULL, GDK_SELECTION_PRIMARY,
|
||||||
|
(guint32) GDK_CURRENT_TIME );
|
||||||
|
|
||||||
while (m_waiting) gtk_main_iteration();
|
while (m_waiting) gtk_main_iteration();
|
||||||
}
|
}
|
||||||
@@ -443,7 +445,7 @@ bool wxClipboard::AddData( wxDataObject *data )
|
|||||||
/* Tell the world we offer clipboard data */
|
/* Tell the world we offer clipboard data */
|
||||||
bool res = (gtk_selection_owner_set( m_clipboardWidget,
|
bool res = (gtk_selection_owner_set( m_clipboardWidget,
|
||||||
clipboard,
|
clipboard,
|
||||||
GDK_CURRENT_TIME ));
|
(guint32) GDK_CURRENT_TIME ));
|
||||||
|
|
||||||
if (m_usePrimary)
|
if (m_usePrimary)
|
||||||
m_ownsPrimarySelection = res;
|
m_ownsPrimarySelection = res;
|
||||||
@@ -496,7 +498,7 @@ bool wxClipboard::IsSupported( const wxDataFormat& format )
|
|||||||
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
||||||
: g_clipboardAtom,
|
: g_clipboardAtom,
|
||||||
g_targetsAtom,
|
g_targetsAtom,
|
||||||
GDK_CURRENT_TIME );
|
(guint32) GDK_CURRENT_TIME );
|
||||||
|
|
||||||
while (m_waiting) gtk_main_iteration();
|
while (m_waiting) gtk_main_iteration();
|
||||||
|
|
||||||
@@ -542,7 +544,7 @@ bool wxClipboard::GetData( wxDataObject& data )
|
|||||||
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
||||||
: g_clipboardAtom,
|
: g_clipboardAtom,
|
||||||
g_targetsAtom,
|
g_targetsAtom,
|
||||||
GDK_CURRENT_TIME );
|
(guint32) GDK_CURRENT_TIME );
|
||||||
|
|
||||||
while (m_waiting) gtk_main_iteration();
|
while (m_waiting) gtk_main_iteration();
|
||||||
|
|
||||||
@@ -576,7 +578,7 @@ bool wxClipboard::GetData( wxDataObject& data )
|
|||||||
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
||||||
: g_clipboardAtom,
|
: g_clipboardAtom,
|
||||||
m_targetRequested,
|
m_targetRequested,
|
||||||
GDK_CURRENT_TIME );
|
(guint32) GDK_CURRENT_TIME );
|
||||||
|
|
||||||
while (m_waiting) gtk_main_iteration();
|
while (m_waiting) gtk_main_iteration();
|
||||||
|
|
||||||
|
@@ -619,13 +619,13 @@ void wxComboBox::OnSize( wxSizeEvent &event )
|
|||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
|
||||||
return;
|
#if 0
|
||||||
|
|
||||||
int w = 21;
|
int w = 21;
|
||||||
gtk_widget_set_usize( GTK_COMBO(m_widget)->entry, m_width-w-1, m_height );
|
gtk_widget_set_usize( GTK_COMBO(m_widget)->entry, m_width-w-1, m_height );
|
||||||
|
|
||||||
gtk_widget_set_uposition( GTK_COMBO(m_widget)->button, m_x+m_width-w, m_y );
|
gtk_widget_set_uposition( GTK_COMBO(m_widget)->button, m_x+m_width-w, m_y );
|
||||||
gtk_widget_set_usize( GTK_COMBO(m_widget)->button, w, m_height );
|
gtk_widget_set_usize( GTK_COMBO(m_widget)->button, w, m_height );
|
||||||
|
#endif // 0
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxComboBox::ApplyWidgetStyle()
|
void wxComboBox::ApplyWidgetStyle()
|
||||||
|
@@ -503,7 +503,7 @@ void wxDropTarget::RegisterWidget( GtkWidget *widget )
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
source_drag_data_get (GtkWidget *WXUNUSED(widget),
|
source_drag_data_get (GtkWidget *WXUNUSED(widget),
|
||||||
GdkDragContext *context,
|
GdkDragContext *WXUNUSED(context),
|
||||||
GtkSelectionData *selection_data,
|
GtkSelectionData *selection_data,
|
||||||
guint WXUNUSED(info),
|
guint WXUNUSED(info),
|
||||||
guint WXUNUSED(time),
|
guint WXUNUSED(time),
|
||||||
@@ -748,7 +748,7 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove )
|
|||||||
event.x = x;
|
event.x = x;
|
||||||
event.y = y;
|
event.y = y;
|
||||||
event.state = state;
|
event.state = state;
|
||||||
event.time = GDK_CURRENT_TIME;
|
event.time = (guint32)GDK_CURRENT_TIME;
|
||||||
|
|
||||||
/* GTK wants to know which button was pressed which caused the dragging */
|
/* GTK wants to know which button was pressed which caused the dragging */
|
||||||
int button_number = 0;
|
int button_number = 0;
|
||||||
|
@@ -187,7 +187,7 @@ wxFont::wxFont( GdkFont *WXUNUSED(font), char *xFontName )
|
|||||||
tn.GetNextToken(); // pixel size
|
tn.GetNextToken(); // pixel size
|
||||||
|
|
||||||
tmp = tn.GetNextToken(); // pointsize
|
tmp = tn.GetNextToken(); // pointsize
|
||||||
int num = wxStrtol (tmp.c_str(), (wxChar **) NULL, 10);
|
long num = wxStrtol (tmp.c_str(), (wxChar **) NULL, 10);
|
||||||
M_FONTDATA->m_pointSize = num / 10;
|
M_FONTDATA->m_pointSize = num / 10;
|
||||||
|
|
||||||
tn.GetNextToken(); // x-res
|
tn.GetNextToken(); // x-res
|
||||||
@@ -394,7 +394,7 @@ GdkFont *wxFont::GetInternalFont( float scale ) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
long int_scale = long(scale * 100.0 + 0.5); /* key for fontlist */
|
long int_scale = long(scale * 100.0 + 0.5); /* key for fontlist */
|
||||||
int point_scale = (M_FONTDATA->m_pointSize * 10 * int_scale) / 100;
|
int point_scale = (int)((M_FONTDATA->m_pointSize * 10 * int_scale) / 100);
|
||||||
GdkFont *font = (GdkFont *) NULL;
|
GdkFont *font = (GdkFont *) NULL;
|
||||||
|
|
||||||
wxNode *node = M_FONTDATA->m_scaled_xfonts.Find(int_scale);
|
wxNode *node = M_FONTDATA->m_scaled_xfonts.Find(int_scale);
|
||||||
|
@@ -116,7 +116,8 @@ bool wxSpinButton::Create(wxWindow *parent,
|
|||||||
|
|
||||||
m_widget = gtk_spin_button_new( m_adjust, 0, 0 );
|
m_widget = gtk_spin_button_new( m_adjust, 0, 0 );
|
||||||
|
|
||||||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget), (m_windowStyle & wxSP_WRAP) );
|
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget),
|
||||||
|
(int)(m_windowStyle & wxSP_WRAP) );
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT (m_adjust),
|
gtk_signal_connect( GTK_OBJECT (m_adjust),
|
||||||
"value_changed",
|
"value_changed",
|
||||||
|
@@ -116,7 +116,8 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
m_widget = gtk_spin_button_new( m_adjust, 1, 0 );
|
m_widget = gtk_spin_button_new( m_adjust, 1, 0 );
|
||||||
|
|
||||||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget), (m_windowStyle & wxSP_WRAP) );
|
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget),
|
||||||
|
(int)(m_windowStyle & wxSP_WRAP) );
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT (m_adjust),
|
gtk_signal_connect( GTK_OBJECT (m_adjust),
|
||||||
"value_changed",
|
"value_changed",
|
||||||
|
@@ -567,7 +567,7 @@ void wxTextCtrl::SetInsertionPoint( long pos )
|
|||||||
|
|
||||||
/* bring editable's cursor uptodate. bug in GTK. */
|
/* bring editable's cursor uptodate. bug in GTK. */
|
||||||
|
|
||||||
GTK_EDITABLE(m_text)->current_pos = pos;
|
GTK_EDITABLE(m_text)->current_pos = (guint32)pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -99,9 +99,10 @@ void wxToolTip::Enable( bool flag )
|
|||||||
|
|
||||||
void wxToolTip::SetDelay( long msecs )
|
void wxToolTip::SetDelay( long msecs )
|
||||||
{
|
{
|
||||||
if (!ss_tooltips) return;
|
if (!ss_tooltips)
|
||||||
|
return;
|
||||||
|
|
||||||
gtk_tooltips_set_delay( ss_tooltips, msecs );
|
gtk_tooltips_set_delay( ss_tooltips, (int)msecs );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -333,7 +333,7 @@ static void draw_frame( GtkWidget *widget, wxWindow *win )
|
|||||||
if (win->HasFlag(wxSIMPLE_BORDER))
|
if (win->HasFlag(wxSIMPLE_BORDER))
|
||||||
{
|
{
|
||||||
GdkGC *gc;
|
GdkGC *gc;
|
||||||
gc = gdk_gc_new( widget->window );
|
gc = gdk_gc_new( widget->window );
|
||||||
gdk_gc_set_foreground( gc, &widget->style->black );
|
gdk_gc_set_foreground( gc, &widget->style->black );
|
||||||
gdk_draw_rectangle( widget->window, gc, FALSE,
|
gdk_draw_rectangle( widget->window, gc, FALSE,
|
||||||
dx, dy,
|
dx, dy,
|
||||||
@@ -465,9 +465,9 @@ static long map_to_unmodified_wx_keysym( KeySym keysym )
|
|||||||
{
|
{
|
||||||
if (keysym <= 0xFF)
|
if (keysym <= 0xFF)
|
||||||
{
|
{
|
||||||
guint upper = gdk_keyval_to_upper( keysym );
|
guint upper = gdk_keyval_to_upper( (guint)keysym );
|
||||||
keysym = (upper != 0 ? upper : keysym ); /* to be MSW compatible */
|
keysym = (upper != 0 ? upper : keysym ); /* to be MSW compatible */
|
||||||
key_code = keysym;
|
key_code = (guint)keysym;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -564,7 +564,7 @@ static long map_to_wx_keysym( KeySym keysym )
|
|||||||
{
|
{
|
||||||
if (keysym <= 0xFF)
|
if (keysym <= 0xFF)
|
||||||
{
|
{
|
||||||
key_code = keysym;
|
key_code = (guint)keysym;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -614,7 +614,8 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
|
|||||||
// "draw" of m_wxwindow
|
// "draw" of m_wxwindow
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxWindow *win )
|
static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget),
|
||||||
|
GdkRectangle *rect, wxWindow *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle)
|
if (g_isIdle)
|
||||||
wxapp_install_idle_handler();
|
wxapp_install_idle_handler();
|
||||||
@@ -634,7 +635,7 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW
|
|||||||
(int)rect->width,
|
(int)rect->width,
|
||||||
(int)rect->height );
|
(int)rect->height );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
wxEraseEvent eevent( win->GetId() );
|
wxEraseEvent eevent( win->GetId() );
|
||||||
eevent.SetEventObject( win );
|
eevent.SetEventObject( win );
|
||||||
win->GetEventHandler()->ProcessEvent(eevent);
|
win->GetEventHandler()->ProcessEvent(eevent);
|
||||||
@@ -707,8 +708,8 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
|
|||||||
ret = ancestor->GetEventHandler()->ProcessEvent( command_event );
|
ret = ancestor->GetEventHandler()->ProcessEvent( command_event );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (ancestor->m_isFrame)
|
if (ancestor->m_isFrame)
|
||||||
break;
|
break;
|
||||||
ancestor = ancestor->GetParent();
|
ancestor = ancestor->GetParent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -740,11 +741,11 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
|
|||||||
if ( (!ret) &&
|
if ( (!ret) &&
|
||||||
((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab)) &&
|
((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab)) &&
|
||||||
(!win->HasFlag(wxTE_PROCESS_TAB)) &&
|
(!win->HasFlag(wxTE_PROCESS_TAB)) &&
|
||||||
(win->GetParent()) &&
|
(win->GetParent()) &&
|
||||||
(win->GetParent()->HasFlag( wxTAB_TRAVERSAL)) )
|
(win->GetParent()->HasFlag( wxTAB_TRAVERSAL)) )
|
||||||
{
|
{
|
||||||
wxNavigationKeyEvent new_event;
|
wxNavigationKeyEvent new_event;
|
||||||
new_event.SetEventObject( win );
|
new_event.SetEventObject( win );
|
||||||
/* GDK reports GDK_ISO_Left_Tab for SHIFT-TAB */
|
/* GDK reports GDK_ISO_Left_Tab for SHIFT-TAB */
|
||||||
new_event.SetDirection( (gdk_event->keyval == GDK_Tab) );
|
new_event.SetDirection( (gdk_event->keyval == GDK_Tab) );
|
||||||
/* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
|
/* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
|
||||||
@@ -967,23 +968,23 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
|
|||||||
|
|
||||||
if (!g_captureWindow)
|
if (!g_captureWindow)
|
||||||
{
|
{
|
||||||
int x = event.m_x;
|
wxCoord x = event.m_x;
|
||||||
int y = event.m_y;
|
wxCoord y = event.m_y;
|
||||||
if (win->m_wxwindow)
|
if (win->m_wxwindow)
|
||||||
{
|
{
|
||||||
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
||||||
x += pizza->xoffset;
|
x += pizza->xoffset;
|
||||||
y += pizza->yoffset;
|
y += pizza->yoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxNode *node = win->GetChildren().First();
|
wxNode *node = win->GetChildren().First();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
wxWindow *child = (wxWindow*)node->Data();
|
wxWindow *child = (wxWindow*)node->Data();
|
||||||
|
|
||||||
node = node->Next();
|
node = node->Next();
|
||||||
if (!child->IsShown())
|
if (!child->IsShown())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (child->m_isStaticBox)
|
if (child->m_isStaticBox)
|
||||||
{
|
{
|
||||||
@@ -1094,13 +1095,13 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
|
|||||||
|
|
||||||
if (!g_captureWindow)
|
if (!g_captureWindow)
|
||||||
{
|
{
|
||||||
int x = event.m_x;
|
wxCoord x = event.m_x;
|
||||||
int y = event.m_y;
|
wxCoord y = event.m_y;
|
||||||
if (win->m_wxwindow)
|
if (win->m_wxwindow)
|
||||||
{
|
{
|
||||||
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
||||||
x += pizza->xoffset;
|
x += pizza->xoffset;
|
||||||
y += pizza->yoffset;
|
y += pizza->yoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxNode *node = win->GetChildren().First();
|
wxNode *node = win->GetChildren().First();
|
||||||
@@ -1109,8 +1110,8 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
|
|||||||
wxWindow *child = (wxWindow*)node->Data();
|
wxWindow *child = (wxWindow*)node->Data();
|
||||||
|
|
||||||
node = node->Next();
|
node = node->Next();
|
||||||
if (!child->IsShown())
|
if (!child->IsShown())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (child->m_isStaticBox)
|
if (child->m_isStaticBox)
|
||||||
{
|
{
|
||||||
@@ -1214,13 +1215,13 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion
|
|||||||
|
|
||||||
if (!g_captureWindow)
|
if (!g_captureWindow)
|
||||||
{
|
{
|
||||||
int x = event.m_x;
|
wxCoord x = event.m_x;
|
||||||
int y = event.m_y;
|
wxCoord y = event.m_y;
|
||||||
if (win->m_wxwindow)
|
if (win->m_wxwindow)
|
||||||
{
|
{
|
||||||
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
||||||
x += pizza->xoffset;
|
x += pizza->xoffset;
|
||||||
y += pizza->yoffset;
|
y += pizza->yoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxNode *node = win->GetChildren().First();
|
wxNode *node = win->GetChildren().First();
|
||||||
@@ -1229,8 +1230,8 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion
|
|||||||
wxWindow *child = (wxWindow*)node->Data();
|
wxWindow *child = (wxWindow*)node->Data();
|
||||||
|
|
||||||
node = node->Next();
|
node = node->Next();
|
||||||
if (!child->IsShown())
|
if (!child->IsShown())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (child->m_isStaticBox)
|
if (child->m_isStaticBox)
|
||||||
{
|
{
|
||||||
@@ -1742,7 +1743,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
|
|||||||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( wxT("wxWindow creation failed") );
|
wxFAIL_MSG( wxT("wxWindow creation failed") );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_insertCallback = wxInsertChildInWindow;
|
m_insertCallback = wxInsertChildInWindow;
|
||||||
@@ -1951,15 +1952,15 @@ void wxWindow::PostCreation()
|
|||||||
if (m_wxwindow)
|
if (m_wxwindow)
|
||||||
{
|
{
|
||||||
if (!m_noExpose)
|
if (!m_noExpose)
|
||||||
{
|
{
|
||||||
/* these get reported to wxWindows -> wxPaintEvent */
|
/* these get reported to wxWindows -> wxPaintEvent */
|
||||||
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "expose_event",
|
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "expose_event",
|
||||||
GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this );
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw",
|
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw",
|
||||||
GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (GTK_MINOR_VERSION > 0)
|
#if (GTK_MINOR_VERSION > 0)
|
||||||
/* these are called when the "sunken" or "raised" borders are drawn */
|
/* these are called when the "sunken" or "raised" borders are drawn */
|
||||||
gtk_signal_connect( GTK_OBJECT(m_widget), "expose_event",
|
gtk_signal_connect( GTK_OBJECT(m_widget), "expose_event",
|
||||||
@@ -2040,7 +2041,7 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
GtkPizza *pizza = GTK_PIZZA(m_parent->m_wxwindow);
|
GtkPizza *pizza = GTK_PIZZA(m_parent->m_wxwindow);
|
||||||
|
|
||||||
if ((sizeFlags & wxSIZE_ALLOW_MINUS_ONE) == 0)
|
if ((sizeFlags & wxSIZE_ALLOW_MINUS_ONE) == 0)
|
||||||
{
|
{
|
||||||
if (x != -1) m_x = x + pizza->xoffset;
|
if (x != -1) m_x = x + pizza->xoffset;
|
||||||
@@ -2114,10 +2115,10 @@ void wxWindow::OnInternalIdle()
|
|||||||
if (cursor.Ok())
|
if (cursor.Ok())
|
||||||
{
|
{
|
||||||
/* I now set the cursor anew in every OnInternalIdle call
|
/* I now set the cursor anew in every OnInternalIdle call
|
||||||
as setting the cursor in a parent window also effects the
|
as setting the cursor in a parent window also effects the
|
||||||
windows above so that checking for the current cursor is
|
windows above so that checking for the current cursor is
|
||||||
not possible. */
|
not possible. */
|
||||||
|
|
||||||
if (m_wxwindow)
|
if (m_wxwindow)
|
||||||
{
|
{
|
||||||
GdkWindow *window = GTK_PIZZA(m_wxwindow)->bin_window;
|
GdkWindow *window = GTK_PIZZA(m_wxwindow)->bin_window;
|
||||||
@@ -2311,8 +2312,8 @@ void wxWindow::DoGetPosition( int *x, int *y ) const
|
|||||||
if (m_parent && m_parent->m_wxwindow)
|
if (m_parent && m_parent->m_wxwindow)
|
||||||
{
|
{
|
||||||
GtkPizza *pizza = GTK_PIZZA(m_parent->m_wxwindow);
|
GtkPizza *pizza = GTK_PIZZA(m_parent->m_wxwindow);
|
||||||
dx = pizza->xoffset;
|
dx = pizza->xoffset;
|
||||||
dy = pizza->yoffset;
|
dy = pizza->yoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x) (*x) = m_x - dx;
|
if (x) (*x) = m_x - dx;
|
||||||
@@ -2476,7 +2477,7 @@ void wxWindow::SetFocus()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// ?
|
// ?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2574,7 +2575,7 @@ void wxWindow::WarpPointer( int x, int y )
|
|||||||
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
||||||
else
|
else
|
||||||
window = GetConnectWidget()->window;
|
window = GetConnectWidget()->window;
|
||||||
|
|
||||||
if (window)
|
if (window)
|
||||||
gdk_window_warp_pointer( window, x, y );
|
gdk_window_warp_pointer( window, x, y );
|
||||||
}
|
}
|
||||||
@@ -2605,15 +2606,15 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
|
|||||||
if (!rect)
|
if (!rect)
|
||||||
{
|
{
|
||||||
if (m_wxwindow)
|
if (m_wxwindow)
|
||||||
{
|
{
|
||||||
GtkPizza *pizza = GTK_PIZZA(m_wxwindow);
|
GtkPizza *pizza = GTK_PIZZA(m_wxwindow);
|
||||||
gboolean old_clear = pizza->clear_on_draw;
|
gboolean old_clear = pizza->clear_on_draw;
|
||||||
gtk_pizza_set_clear( pizza, FALSE );
|
gtk_pizza_set_clear( pizza, FALSE );
|
||||||
|
|
||||||
gtk_widget_draw( m_wxwindow, (GdkRectangle*) NULL );
|
gtk_widget_draw( m_wxwindow, (GdkRectangle*) NULL );
|
||||||
|
|
||||||
gtk_pizza_set_clear( pizza, old_clear );
|
gtk_pizza_set_clear( pizza, old_clear );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
gtk_widget_draw( m_widget, (GdkRectangle*) NULL );
|
gtk_widget_draw( m_widget, (GdkRectangle*) NULL );
|
||||||
}
|
}
|
||||||
@@ -2626,15 +2627,15 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
|
|||||||
gdk_rect.height = rect->height;
|
gdk_rect.height = rect->height;
|
||||||
|
|
||||||
if (m_wxwindow)
|
if (m_wxwindow)
|
||||||
{
|
{
|
||||||
GtkPizza *pizza = GTK_PIZZA(m_wxwindow);
|
GtkPizza *pizza = GTK_PIZZA(m_wxwindow);
|
||||||
gboolean old_clear = pizza->clear_on_draw;
|
gboolean old_clear = pizza->clear_on_draw;
|
||||||
gtk_pizza_set_clear( pizza, FALSE );
|
gtk_pizza_set_clear( pizza, FALSE );
|
||||||
|
|
||||||
gtk_widget_draw( m_wxwindow, &gdk_rect );
|
gtk_widget_draw( m_wxwindow, &gdk_rect );
|
||||||
|
|
||||||
gtk_pizza_set_clear( pizza, old_clear );
|
gtk_pizza_set_clear( pizza, old_clear );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
gtk_widget_draw( m_widget, &gdk_rect );
|
gtk_widget_draw( m_widget, &gdk_rect );
|
||||||
}
|
}
|
||||||
@@ -2683,7 +2684,7 @@ bool wxWindow::SetBackgroundColour( const wxColour &colour )
|
|||||||
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
||||||
else
|
else
|
||||||
window = GetConnectWidget()->window;
|
window = GetConnectWidget()->window;
|
||||||
|
|
||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
// indicate that a new style has been set
|
// indicate that a new style has been set
|
||||||
@@ -2735,7 +2736,7 @@ bool wxWindow::SetForegroundColour( const wxColour &colour )
|
|||||||
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
||||||
else
|
else
|
||||||
window = GetConnectWidget()->window;
|
window = GetConnectWidget()->window;
|
||||||
|
|
||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
// indicate that a new style has been set
|
// indicate that a new style has been set
|
||||||
@@ -2868,7 +2869,7 @@ bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y )
|
|||||||
0, // button used to activate it
|
0, // button used to activate it
|
||||||
gs_timeLastClick // the time of activation
|
gs_timeLastClick // the time of activation
|
||||||
);
|
);
|
||||||
|
|
||||||
while (is_waiting)
|
while (is_waiting)
|
||||||
{
|
{
|
||||||
while (gtk_events_pending())
|
while (gtk_events_pending())
|
||||||
@@ -2928,7 +2929,7 @@ bool wxWindow::SetFont( const wxFont &font )
|
|||||||
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
||||||
else
|
else
|
||||||
window = GetConnectWidget()->window;
|
window = GetConnectWidget()->window;
|
||||||
|
|
||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
// indicate that a new style has been set
|
// indicate that a new style has been set
|
||||||
@@ -2966,7 +2967,7 @@ void wxWindow::CaptureMouse()
|
|||||||
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
||||||
else
|
else
|
||||||
window = GetConnectWidget()->window;
|
window = GetConnectWidget()->window;
|
||||||
|
|
||||||
if (!window) return;
|
if (!window) return;
|
||||||
|
|
||||||
gdk_pointer_grab( window, FALSE,
|
gdk_pointer_grab( window, FALSE,
|
||||||
@@ -2977,7 +2978,7 @@ void wxWindow::CaptureMouse()
|
|||||||
GDK_POINTER_MOTION_MASK),
|
GDK_POINTER_MOTION_MASK),
|
||||||
(GdkWindow *) NULL,
|
(GdkWindow *) NULL,
|
||||||
m_cursor.GetCursor(),
|
m_cursor.GetCursor(),
|
||||||
GDK_CURRENT_TIME );
|
(guint32)GDK_CURRENT_TIME );
|
||||||
g_captureWindow = this;
|
g_captureWindow = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2992,10 +2993,11 @@ void wxWindow::ReleaseMouse()
|
|||||||
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
||||||
else
|
else
|
||||||
window = GetConnectWidget()->window;
|
window = GetConnectWidget()->window;
|
||||||
|
|
||||||
if (!window) return;
|
if (!window)
|
||||||
|
return;
|
||||||
|
|
||||||
gdk_pointer_ungrab ( GDK_CURRENT_TIME );
|
gdk_pointer_ungrab ( (guint32)GDK_CURRENT_TIME );
|
||||||
g_captureWindow = (wxWindow*) NULL;
|
g_captureWindow = (wxWindow*) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -348,7 +348,8 @@ void wxClipboard::Clear()
|
|||||||
{
|
{
|
||||||
m_waiting = TRUE;
|
m_waiting = TRUE;
|
||||||
|
|
||||||
gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom, GDK_CURRENT_TIME );
|
gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom,
|
||||||
|
(guint32) GDK_CURRENT_TIME );
|
||||||
|
|
||||||
while (m_waiting) gtk_main_iteration();
|
while (m_waiting) gtk_main_iteration();
|
||||||
}
|
}
|
||||||
@@ -357,7 +358,8 @@ void wxClipboard::Clear()
|
|||||||
{
|
{
|
||||||
m_waiting = TRUE;
|
m_waiting = TRUE;
|
||||||
|
|
||||||
gtk_selection_owner_set( (GtkWidget*) NULL, GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME );
|
gtk_selection_owner_set( (GtkWidget*) NULL, GDK_SELECTION_PRIMARY,
|
||||||
|
(guint32) GDK_CURRENT_TIME );
|
||||||
|
|
||||||
while (m_waiting) gtk_main_iteration();
|
while (m_waiting) gtk_main_iteration();
|
||||||
}
|
}
|
||||||
@@ -443,7 +445,7 @@ bool wxClipboard::AddData( wxDataObject *data )
|
|||||||
/* Tell the world we offer clipboard data */
|
/* Tell the world we offer clipboard data */
|
||||||
bool res = (gtk_selection_owner_set( m_clipboardWidget,
|
bool res = (gtk_selection_owner_set( m_clipboardWidget,
|
||||||
clipboard,
|
clipboard,
|
||||||
GDK_CURRENT_TIME ));
|
(guint32) GDK_CURRENT_TIME ));
|
||||||
|
|
||||||
if (m_usePrimary)
|
if (m_usePrimary)
|
||||||
m_ownsPrimarySelection = res;
|
m_ownsPrimarySelection = res;
|
||||||
@@ -496,7 +498,7 @@ bool wxClipboard::IsSupported( const wxDataFormat& format )
|
|||||||
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
||||||
: g_clipboardAtom,
|
: g_clipboardAtom,
|
||||||
g_targetsAtom,
|
g_targetsAtom,
|
||||||
GDK_CURRENT_TIME );
|
(guint32) GDK_CURRENT_TIME );
|
||||||
|
|
||||||
while (m_waiting) gtk_main_iteration();
|
while (m_waiting) gtk_main_iteration();
|
||||||
|
|
||||||
@@ -542,7 +544,7 @@ bool wxClipboard::GetData( wxDataObject& data )
|
|||||||
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
||||||
: g_clipboardAtom,
|
: g_clipboardAtom,
|
||||||
g_targetsAtom,
|
g_targetsAtom,
|
||||||
GDK_CURRENT_TIME );
|
(guint32) GDK_CURRENT_TIME );
|
||||||
|
|
||||||
while (m_waiting) gtk_main_iteration();
|
while (m_waiting) gtk_main_iteration();
|
||||||
|
|
||||||
@@ -576,7 +578,7 @@ bool wxClipboard::GetData( wxDataObject& data )
|
|||||||
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
||||||
: g_clipboardAtom,
|
: g_clipboardAtom,
|
||||||
m_targetRequested,
|
m_targetRequested,
|
||||||
GDK_CURRENT_TIME );
|
(guint32) GDK_CURRENT_TIME );
|
||||||
|
|
||||||
while (m_waiting) gtk_main_iteration();
|
while (m_waiting) gtk_main_iteration();
|
||||||
|
|
||||||
|
@@ -619,13 +619,13 @@ void wxComboBox::OnSize( wxSizeEvent &event )
|
|||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
|
||||||
return;
|
#if 0
|
||||||
|
|
||||||
int w = 21;
|
int w = 21;
|
||||||
gtk_widget_set_usize( GTK_COMBO(m_widget)->entry, m_width-w-1, m_height );
|
gtk_widget_set_usize( GTK_COMBO(m_widget)->entry, m_width-w-1, m_height );
|
||||||
|
|
||||||
gtk_widget_set_uposition( GTK_COMBO(m_widget)->button, m_x+m_width-w, m_y );
|
gtk_widget_set_uposition( GTK_COMBO(m_widget)->button, m_x+m_width-w, m_y );
|
||||||
gtk_widget_set_usize( GTK_COMBO(m_widget)->button, w, m_height );
|
gtk_widget_set_usize( GTK_COMBO(m_widget)->button, w, m_height );
|
||||||
|
#endif // 0
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxComboBox::ApplyWidgetStyle()
|
void wxComboBox::ApplyWidgetStyle()
|
||||||
|
@@ -503,7 +503,7 @@ void wxDropTarget::RegisterWidget( GtkWidget *widget )
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
source_drag_data_get (GtkWidget *WXUNUSED(widget),
|
source_drag_data_get (GtkWidget *WXUNUSED(widget),
|
||||||
GdkDragContext *context,
|
GdkDragContext *WXUNUSED(context),
|
||||||
GtkSelectionData *selection_data,
|
GtkSelectionData *selection_data,
|
||||||
guint WXUNUSED(info),
|
guint WXUNUSED(info),
|
||||||
guint WXUNUSED(time),
|
guint WXUNUSED(time),
|
||||||
@@ -748,7 +748,7 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove )
|
|||||||
event.x = x;
|
event.x = x;
|
||||||
event.y = y;
|
event.y = y;
|
||||||
event.state = state;
|
event.state = state;
|
||||||
event.time = GDK_CURRENT_TIME;
|
event.time = (guint32)GDK_CURRENT_TIME;
|
||||||
|
|
||||||
/* GTK wants to know which button was pressed which caused the dragging */
|
/* GTK wants to know which button was pressed which caused the dragging */
|
||||||
int button_number = 0;
|
int button_number = 0;
|
||||||
|
@@ -187,7 +187,7 @@ wxFont::wxFont( GdkFont *WXUNUSED(font), char *xFontName )
|
|||||||
tn.GetNextToken(); // pixel size
|
tn.GetNextToken(); // pixel size
|
||||||
|
|
||||||
tmp = tn.GetNextToken(); // pointsize
|
tmp = tn.GetNextToken(); // pointsize
|
||||||
int num = wxStrtol (tmp.c_str(), (wxChar **) NULL, 10);
|
long num = wxStrtol (tmp.c_str(), (wxChar **) NULL, 10);
|
||||||
M_FONTDATA->m_pointSize = num / 10;
|
M_FONTDATA->m_pointSize = num / 10;
|
||||||
|
|
||||||
tn.GetNextToken(); // x-res
|
tn.GetNextToken(); // x-res
|
||||||
@@ -394,7 +394,7 @@ GdkFont *wxFont::GetInternalFont( float scale ) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
long int_scale = long(scale * 100.0 + 0.5); /* key for fontlist */
|
long int_scale = long(scale * 100.0 + 0.5); /* key for fontlist */
|
||||||
int point_scale = (M_FONTDATA->m_pointSize * 10 * int_scale) / 100;
|
int point_scale = (int)((M_FONTDATA->m_pointSize * 10 * int_scale) / 100);
|
||||||
GdkFont *font = (GdkFont *) NULL;
|
GdkFont *font = (GdkFont *) NULL;
|
||||||
|
|
||||||
wxNode *node = M_FONTDATA->m_scaled_xfonts.Find(int_scale);
|
wxNode *node = M_FONTDATA->m_scaled_xfonts.Find(int_scale);
|
||||||
|
@@ -116,7 +116,8 @@ bool wxSpinButton::Create(wxWindow *parent,
|
|||||||
|
|
||||||
m_widget = gtk_spin_button_new( m_adjust, 0, 0 );
|
m_widget = gtk_spin_button_new( m_adjust, 0, 0 );
|
||||||
|
|
||||||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget), (m_windowStyle & wxSP_WRAP) );
|
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget),
|
||||||
|
(int)(m_windowStyle & wxSP_WRAP) );
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT (m_adjust),
|
gtk_signal_connect( GTK_OBJECT (m_adjust),
|
||||||
"value_changed",
|
"value_changed",
|
||||||
|
@@ -116,7 +116,8 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
m_widget = gtk_spin_button_new( m_adjust, 1, 0 );
|
m_widget = gtk_spin_button_new( m_adjust, 1, 0 );
|
||||||
|
|
||||||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget), (m_windowStyle & wxSP_WRAP) );
|
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget),
|
||||||
|
(int)(m_windowStyle & wxSP_WRAP) );
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT (m_adjust),
|
gtk_signal_connect( GTK_OBJECT (m_adjust),
|
||||||
"value_changed",
|
"value_changed",
|
||||||
|
@@ -567,7 +567,7 @@ void wxTextCtrl::SetInsertionPoint( long pos )
|
|||||||
|
|
||||||
/* bring editable's cursor uptodate. bug in GTK. */
|
/* bring editable's cursor uptodate. bug in GTK. */
|
||||||
|
|
||||||
GTK_EDITABLE(m_text)->current_pos = pos;
|
GTK_EDITABLE(m_text)->current_pos = (guint32)pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -99,9 +99,10 @@ void wxToolTip::Enable( bool flag )
|
|||||||
|
|
||||||
void wxToolTip::SetDelay( long msecs )
|
void wxToolTip::SetDelay( long msecs )
|
||||||
{
|
{
|
||||||
if (!ss_tooltips) return;
|
if (!ss_tooltips)
|
||||||
|
return;
|
||||||
|
|
||||||
gtk_tooltips_set_delay( ss_tooltips, msecs );
|
gtk_tooltips_set_delay( ss_tooltips, (int)msecs );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -333,7 +333,7 @@ static void draw_frame( GtkWidget *widget, wxWindow *win )
|
|||||||
if (win->HasFlag(wxSIMPLE_BORDER))
|
if (win->HasFlag(wxSIMPLE_BORDER))
|
||||||
{
|
{
|
||||||
GdkGC *gc;
|
GdkGC *gc;
|
||||||
gc = gdk_gc_new( widget->window );
|
gc = gdk_gc_new( widget->window );
|
||||||
gdk_gc_set_foreground( gc, &widget->style->black );
|
gdk_gc_set_foreground( gc, &widget->style->black );
|
||||||
gdk_draw_rectangle( widget->window, gc, FALSE,
|
gdk_draw_rectangle( widget->window, gc, FALSE,
|
||||||
dx, dy,
|
dx, dy,
|
||||||
@@ -465,9 +465,9 @@ static long map_to_unmodified_wx_keysym( KeySym keysym )
|
|||||||
{
|
{
|
||||||
if (keysym <= 0xFF)
|
if (keysym <= 0xFF)
|
||||||
{
|
{
|
||||||
guint upper = gdk_keyval_to_upper( keysym );
|
guint upper = gdk_keyval_to_upper( (guint)keysym );
|
||||||
keysym = (upper != 0 ? upper : keysym ); /* to be MSW compatible */
|
keysym = (upper != 0 ? upper : keysym ); /* to be MSW compatible */
|
||||||
key_code = keysym;
|
key_code = (guint)keysym;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -564,7 +564,7 @@ static long map_to_wx_keysym( KeySym keysym )
|
|||||||
{
|
{
|
||||||
if (keysym <= 0xFF)
|
if (keysym <= 0xFF)
|
||||||
{
|
{
|
||||||
key_code = keysym;
|
key_code = (guint)keysym;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -614,7 +614,8 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
|
|||||||
// "draw" of m_wxwindow
|
// "draw" of m_wxwindow
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxWindow *win )
|
static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget),
|
||||||
|
GdkRectangle *rect, wxWindow *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle)
|
if (g_isIdle)
|
||||||
wxapp_install_idle_handler();
|
wxapp_install_idle_handler();
|
||||||
@@ -634,7 +635,7 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW
|
|||||||
(int)rect->width,
|
(int)rect->width,
|
||||||
(int)rect->height );
|
(int)rect->height );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
wxEraseEvent eevent( win->GetId() );
|
wxEraseEvent eevent( win->GetId() );
|
||||||
eevent.SetEventObject( win );
|
eevent.SetEventObject( win );
|
||||||
win->GetEventHandler()->ProcessEvent(eevent);
|
win->GetEventHandler()->ProcessEvent(eevent);
|
||||||
@@ -707,8 +708,8 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
|
|||||||
ret = ancestor->GetEventHandler()->ProcessEvent( command_event );
|
ret = ancestor->GetEventHandler()->ProcessEvent( command_event );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (ancestor->m_isFrame)
|
if (ancestor->m_isFrame)
|
||||||
break;
|
break;
|
||||||
ancestor = ancestor->GetParent();
|
ancestor = ancestor->GetParent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -740,11 +741,11 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
|
|||||||
if ( (!ret) &&
|
if ( (!ret) &&
|
||||||
((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab)) &&
|
((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab)) &&
|
||||||
(!win->HasFlag(wxTE_PROCESS_TAB)) &&
|
(!win->HasFlag(wxTE_PROCESS_TAB)) &&
|
||||||
(win->GetParent()) &&
|
(win->GetParent()) &&
|
||||||
(win->GetParent()->HasFlag( wxTAB_TRAVERSAL)) )
|
(win->GetParent()->HasFlag( wxTAB_TRAVERSAL)) )
|
||||||
{
|
{
|
||||||
wxNavigationKeyEvent new_event;
|
wxNavigationKeyEvent new_event;
|
||||||
new_event.SetEventObject( win );
|
new_event.SetEventObject( win );
|
||||||
/* GDK reports GDK_ISO_Left_Tab for SHIFT-TAB */
|
/* GDK reports GDK_ISO_Left_Tab for SHIFT-TAB */
|
||||||
new_event.SetDirection( (gdk_event->keyval == GDK_Tab) );
|
new_event.SetDirection( (gdk_event->keyval == GDK_Tab) );
|
||||||
/* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
|
/* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
|
||||||
@@ -967,23 +968,23 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
|
|||||||
|
|
||||||
if (!g_captureWindow)
|
if (!g_captureWindow)
|
||||||
{
|
{
|
||||||
int x = event.m_x;
|
wxCoord x = event.m_x;
|
||||||
int y = event.m_y;
|
wxCoord y = event.m_y;
|
||||||
if (win->m_wxwindow)
|
if (win->m_wxwindow)
|
||||||
{
|
{
|
||||||
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
||||||
x += pizza->xoffset;
|
x += pizza->xoffset;
|
||||||
y += pizza->yoffset;
|
y += pizza->yoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxNode *node = win->GetChildren().First();
|
wxNode *node = win->GetChildren().First();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
wxWindow *child = (wxWindow*)node->Data();
|
wxWindow *child = (wxWindow*)node->Data();
|
||||||
|
|
||||||
node = node->Next();
|
node = node->Next();
|
||||||
if (!child->IsShown())
|
if (!child->IsShown())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (child->m_isStaticBox)
|
if (child->m_isStaticBox)
|
||||||
{
|
{
|
||||||
@@ -1094,13 +1095,13 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
|
|||||||
|
|
||||||
if (!g_captureWindow)
|
if (!g_captureWindow)
|
||||||
{
|
{
|
||||||
int x = event.m_x;
|
wxCoord x = event.m_x;
|
||||||
int y = event.m_y;
|
wxCoord y = event.m_y;
|
||||||
if (win->m_wxwindow)
|
if (win->m_wxwindow)
|
||||||
{
|
{
|
||||||
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
||||||
x += pizza->xoffset;
|
x += pizza->xoffset;
|
||||||
y += pizza->yoffset;
|
y += pizza->yoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxNode *node = win->GetChildren().First();
|
wxNode *node = win->GetChildren().First();
|
||||||
@@ -1109,8 +1110,8 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
|
|||||||
wxWindow *child = (wxWindow*)node->Data();
|
wxWindow *child = (wxWindow*)node->Data();
|
||||||
|
|
||||||
node = node->Next();
|
node = node->Next();
|
||||||
if (!child->IsShown())
|
if (!child->IsShown())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (child->m_isStaticBox)
|
if (child->m_isStaticBox)
|
||||||
{
|
{
|
||||||
@@ -1214,13 +1215,13 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion
|
|||||||
|
|
||||||
if (!g_captureWindow)
|
if (!g_captureWindow)
|
||||||
{
|
{
|
||||||
int x = event.m_x;
|
wxCoord x = event.m_x;
|
||||||
int y = event.m_y;
|
wxCoord y = event.m_y;
|
||||||
if (win->m_wxwindow)
|
if (win->m_wxwindow)
|
||||||
{
|
{
|
||||||
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
||||||
x += pizza->xoffset;
|
x += pizza->xoffset;
|
||||||
y += pizza->yoffset;
|
y += pizza->yoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxNode *node = win->GetChildren().First();
|
wxNode *node = win->GetChildren().First();
|
||||||
@@ -1229,8 +1230,8 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion
|
|||||||
wxWindow *child = (wxWindow*)node->Data();
|
wxWindow *child = (wxWindow*)node->Data();
|
||||||
|
|
||||||
node = node->Next();
|
node = node->Next();
|
||||||
if (!child->IsShown())
|
if (!child->IsShown())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (child->m_isStaticBox)
|
if (child->m_isStaticBox)
|
||||||
{
|
{
|
||||||
@@ -1742,7 +1743,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
|
|||||||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( wxT("wxWindow creation failed") );
|
wxFAIL_MSG( wxT("wxWindow creation failed") );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_insertCallback = wxInsertChildInWindow;
|
m_insertCallback = wxInsertChildInWindow;
|
||||||
@@ -1951,15 +1952,15 @@ void wxWindow::PostCreation()
|
|||||||
if (m_wxwindow)
|
if (m_wxwindow)
|
||||||
{
|
{
|
||||||
if (!m_noExpose)
|
if (!m_noExpose)
|
||||||
{
|
{
|
||||||
/* these get reported to wxWindows -> wxPaintEvent */
|
/* these get reported to wxWindows -> wxPaintEvent */
|
||||||
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "expose_event",
|
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "expose_event",
|
||||||
GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this );
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw",
|
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw",
|
||||||
GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (GTK_MINOR_VERSION > 0)
|
#if (GTK_MINOR_VERSION > 0)
|
||||||
/* these are called when the "sunken" or "raised" borders are drawn */
|
/* these are called when the "sunken" or "raised" borders are drawn */
|
||||||
gtk_signal_connect( GTK_OBJECT(m_widget), "expose_event",
|
gtk_signal_connect( GTK_OBJECT(m_widget), "expose_event",
|
||||||
@@ -2040,7 +2041,7 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
GtkPizza *pizza = GTK_PIZZA(m_parent->m_wxwindow);
|
GtkPizza *pizza = GTK_PIZZA(m_parent->m_wxwindow);
|
||||||
|
|
||||||
if ((sizeFlags & wxSIZE_ALLOW_MINUS_ONE) == 0)
|
if ((sizeFlags & wxSIZE_ALLOW_MINUS_ONE) == 0)
|
||||||
{
|
{
|
||||||
if (x != -1) m_x = x + pizza->xoffset;
|
if (x != -1) m_x = x + pizza->xoffset;
|
||||||
@@ -2114,10 +2115,10 @@ void wxWindow::OnInternalIdle()
|
|||||||
if (cursor.Ok())
|
if (cursor.Ok())
|
||||||
{
|
{
|
||||||
/* I now set the cursor anew in every OnInternalIdle call
|
/* I now set the cursor anew in every OnInternalIdle call
|
||||||
as setting the cursor in a parent window also effects the
|
as setting the cursor in a parent window also effects the
|
||||||
windows above so that checking for the current cursor is
|
windows above so that checking for the current cursor is
|
||||||
not possible. */
|
not possible. */
|
||||||
|
|
||||||
if (m_wxwindow)
|
if (m_wxwindow)
|
||||||
{
|
{
|
||||||
GdkWindow *window = GTK_PIZZA(m_wxwindow)->bin_window;
|
GdkWindow *window = GTK_PIZZA(m_wxwindow)->bin_window;
|
||||||
@@ -2311,8 +2312,8 @@ void wxWindow::DoGetPosition( int *x, int *y ) const
|
|||||||
if (m_parent && m_parent->m_wxwindow)
|
if (m_parent && m_parent->m_wxwindow)
|
||||||
{
|
{
|
||||||
GtkPizza *pizza = GTK_PIZZA(m_parent->m_wxwindow);
|
GtkPizza *pizza = GTK_PIZZA(m_parent->m_wxwindow);
|
||||||
dx = pizza->xoffset;
|
dx = pizza->xoffset;
|
||||||
dy = pizza->yoffset;
|
dy = pizza->yoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x) (*x) = m_x - dx;
|
if (x) (*x) = m_x - dx;
|
||||||
@@ -2476,7 +2477,7 @@ void wxWindow::SetFocus()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// ?
|
// ?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2574,7 +2575,7 @@ void wxWindow::WarpPointer( int x, int y )
|
|||||||
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
||||||
else
|
else
|
||||||
window = GetConnectWidget()->window;
|
window = GetConnectWidget()->window;
|
||||||
|
|
||||||
if (window)
|
if (window)
|
||||||
gdk_window_warp_pointer( window, x, y );
|
gdk_window_warp_pointer( window, x, y );
|
||||||
}
|
}
|
||||||
@@ -2605,15 +2606,15 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
|
|||||||
if (!rect)
|
if (!rect)
|
||||||
{
|
{
|
||||||
if (m_wxwindow)
|
if (m_wxwindow)
|
||||||
{
|
{
|
||||||
GtkPizza *pizza = GTK_PIZZA(m_wxwindow);
|
GtkPizza *pizza = GTK_PIZZA(m_wxwindow);
|
||||||
gboolean old_clear = pizza->clear_on_draw;
|
gboolean old_clear = pizza->clear_on_draw;
|
||||||
gtk_pizza_set_clear( pizza, FALSE );
|
gtk_pizza_set_clear( pizza, FALSE );
|
||||||
|
|
||||||
gtk_widget_draw( m_wxwindow, (GdkRectangle*) NULL );
|
gtk_widget_draw( m_wxwindow, (GdkRectangle*) NULL );
|
||||||
|
|
||||||
gtk_pizza_set_clear( pizza, old_clear );
|
gtk_pizza_set_clear( pizza, old_clear );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
gtk_widget_draw( m_widget, (GdkRectangle*) NULL );
|
gtk_widget_draw( m_widget, (GdkRectangle*) NULL );
|
||||||
}
|
}
|
||||||
@@ -2626,15 +2627,15 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
|
|||||||
gdk_rect.height = rect->height;
|
gdk_rect.height = rect->height;
|
||||||
|
|
||||||
if (m_wxwindow)
|
if (m_wxwindow)
|
||||||
{
|
{
|
||||||
GtkPizza *pizza = GTK_PIZZA(m_wxwindow);
|
GtkPizza *pizza = GTK_PIZZA(m_wxwindow);
|
||||||
gboolean old_clear = pizza->clear_on_draw;
|
gboolean old_clear = pizza->clear_on_draw;
|
||||||
gtk_pizza_set_clear( pizza, FALSE );
|
gtk_pizza_set_clear( pizza, FALSE );
|
||||||
|
|
||||||
gtk_widget_draw( m_wxwindow, &gdk_rect );
|
gtk_widget_draw( m_wxwindow, &gdk_rect );
|
||||||
|
|
||||||
gtk_pizza_set_clear( pizza, old_clear );
|
gtk_pizza_set_clear( pizza, old_clear );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
gtk_widget_draw( m_widget, &gdk_rect );
|
gtk_widget_draw( m_widget, &gdk_rect );
|
||||||
}
|
}
|
||||||
@@ -2683,7 +2684,7 @@ bool wxWindow::SetBackgroundColour( const wxColour &colour )
|
|||||||
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
||||||
else
|
else
|
||||||
window = GetConnectWidget()->window;
|
window = GetConnectWidget()->window;
|
||||||
|
|
||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
// indicate that a new style has been set
|
// indicate that a new style has been set
|
||||||
@@ -2735,7 +2736,7 @@ bool wxWindow::SetForegroundColour( const wxColour &colour )
|
|||||||
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
||||||
else
|
else
|
||||||
window = GetConnectWidget()->window;
|
window = GetConnectWidget()->window;
|
||||||
|
|
||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
// indicate that a new style has been set
|
// indicate that a new style has been set
|
||||||
@@ -2868,7 +2869,7 @@ bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y )
|
|||||||
0, // button used to activate it
|
0, // button used to activate it
|
||||||
gs_timeLastClick // the time of activation
|
gs_timeLastClick // the time of activation
|
||||||
);
|
);
|
||||||
|
|
||||||
while (is_waiting)
|
while (is_waiting)
|
||||||
{
|
{
|
||||||
while (gtk_events_pending())
|
while (gtk_events_pending())
|
||||||
@@ -2928,7 +2929,7 @@ bool wxWindow::SetFont( const wxFont &font )
|
|||||||
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
||||||
else
|
else
|
||||||
window = GetConnectWidget()->window;
|
window = GetConnectWidget()->window;
|
||||||
|
|
||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
// indicate that a new style has been set
|
// indicate that a new style has been set
|
||||||
@@ -2966,7 +2967,7 @@ void wxWindow::CaptureMouse()
|
|||||||
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
||||||
else
|
else
|
||||||
window = GetConnectWidget()->window;
|
window = GetConnectWidget()->window;
|
||||||
|
|
||||||
if (!window) return;
|
if (!window) return;
|
||||||
|
|
||||||
gdk_pointer_grab( window, FALSE,
|
gdk_pointer_grab( window, FALSE,
|
||||||
@@ -2977,7 +2978,7 @@ void wxWindow::CaptureMouse()
|
|||||||
GDK_POINTER_MOTION_MASK),
|
GDK_POINTER_MOTION_MASK),
|
||||||
(GdkWindow *) NULL,
|
(GdkWindow *) NULL,
|
||||||
m_cursor.GetCursor(),
|
m_cursor.GetCursor(),
|
||||||
GDK_CURRENT_TIME );
|
(guint32)GDK_CURRENT_TIME );
|
||||||
g_captureWindow = this;
|
g_captureWindow = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2992,10 +2993,11 @@ void wxWindow::ReleaseMouse()
|
|||||||
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
window = GTK_PIZZA(m_wxwindow)->bin_window;
|
||||||
else
|
else
|
||||||
window = GetConnectWidget()->window;
|
window = GetConnectWidget()->window;
|
||||||
|
|
||||||
if (!window) return;
|
if (!window)
|
||||||
|
return;
|
||||||
|
|
||||||
gdk_pointer_ungrab ( GDK_CURRENT_TIME );
|
gdk_pointer_ungrab ( (guint32)GDK_CURRENT_TIME );
|
||||||
g_captureWindow = (wxWindow*) NULL;
|
g_captureWindow = (wxWindow*) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -62,7 +62,7 @@ static char **CreateFontList(wxChar spacing,
|
|||||||
int *nFonts)
|
int *nFonts)
|
||||||
{
|
{
|
||||||
wxString xencoding, xregistry;
|
wxString xencoding, xregistry;
|
||||||
wxGetXFontEncoding(encoding, &xencoding, &xregistry);
|
wxGetXFontEncoding(encoding, &xregistry, &xencoding);
|
||||||
|
|
||||||
wxString pattern;
|
wxString pattern;
|
||||||
pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-%s-%s"),
|
pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-%s-%s"),
|
||||||
|
Reference in New Issue
Block a user