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:
|
||||
wxString m_text;
|
||||
|
||||
#if defined(__VISAGECPP__)
|
||||
// Virtual function hiding supression
|
||||
size_t GetDataSize(const wxDataFormat& rFormat) const
|
||||
{ return(wxDataObjectSimple::GetDataSize(rFormat)); }
|
||||
bool GetDataHere(const wxDataFormat& WXUNUSED(rFormat), void *pBuf) const
|
||||
{ return(GetDataHere(pBuf)); }
|
||||
bool SetData(const wxDataFormat& rFormat, size_t nLen, const void* pBuf)
|
||||
{ return(wxDataObjectSimple::SetData(rFormat, nLen, pBuf)); }
|
||||
#endif
|
||||
// virtual function hiding supression
|
||||
size_t GetDataSize(const wxDataFormat& format) const
|
||||
{ return(wxDataObjectSimple::GetDataSize(format)); }
|
||||
bool GetDataHere(const wxDataFormat& WXUNUSED(format), void *pBuf) const
|
||||
{ return(wxDataObjectSimple::GetDataHere(pBuf)); }
|
||||
bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
|
||||
{ return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -374,14 +372,12 @@ public:
|
||||
protected:
|
||||
wxArrayString m_filenames;
|
||||
|
||||
#if defined(__VISAGECPP__)
|
||||
private:
|
||||
// Virtual function hiding supression
|
||||
size_t GetDataSize(const wxDataFormat& rFormat) const
|
||||
{ return(wxDataObjectSimple::GetDataSize(rFormat)); }
|
||||
bool GetDataHere(const wxDataFormat& WXUNUSED(rformat), void* pBuf) const
|
||||
{ return(GetDataHere(pBuf)); }
|
||||
#endif
|
||||
size_t GetDataSize(const wxDataFormat& format) const
|
||||
{ return(wxDataObjectSimple::GetDataSize(format)); }
|
||||
bool GetDataHere(const wxDataFormat& WXUNUSED(format), void* pBuf) const
|
||||
{ return(wxDataObjectSimple::GetDataHere(pBuf)); }
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -429,15 +425,13 @@ private:
|
||||
size_t m_size;
|
||||
void *m_data;
|
||||
|
||||
#if defined(__VISAGECPP__)
|
||||
// Virtual function hiding supression
|
||||
size_t GetDataSize(const wxDataFormat& rFormat) const
|
||||
{ return(wxDataObjectSimple::GetDataSize(rFormat)); }
|
||||
bool GetDataHere(const wxDataFormat& rFormat, void* pBuf) const
|
||||
{ return(wxDataObjectSimple::GetDataHere(rFormat, pBuf)); }
|
||||
bool SetData(const wxDataFormat& rFormat, size_t nLen, const void* pBuf)
|
||||
{ return(wxDataObjectSimple::SetData(rFormat, nLen, pBuf)); }
|
||||
#endif
|
||||
// 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)); }
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -605,15 +605,21 @@ public:
|
||||
bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); }
|
||||
|
||||
// Find the position of the event
|
||||
void GetPosition(long *xpos, long *ypos) const
|
||||
{ if (xpos) *xpos = m_x;
|
||||
if (ypos) *ypos = m_y; }
|
||||
void GetPosition(wxCoord *xpos, wxCoord *ypos) const
|
||||
{
|
||||
if (xpos)
|
||||
*xpos = m_x;
|
||||
if (ypos)
|
||||
*ypos = m_y;
|
||||
}
|
||||
|
||||
void GetPosition(int *xpos, int *ypos) const
|
||||
{ if (xpos) *xpos = m_x;
|
||||
if (ypos) *ypos = m_y; }
|
||||
void Position(long *xpos, long *ypos) const
|
||||
{ if (xpos) *xpos = m_x;
|
||||
if (ypos) *ypos = m_y; }
|
||||
{
|
||||
if (xpos)
|
||||
*xpos = (int)m_x;
|
||||
if (ypos)
|
||||
*ypos = (int)m_y;
|
||||
}
|
||||
|
||||
// Find the position of the event
|
||||
wxPoint GetPosition() const { return wxPoint(m_x, m_y); }
|
||||
@@ -623,6 +629,14 @@ public:
|
||||
|
||||
// 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
|
||||
{
|
||||
*xpos = (float) m_x; *ypos = (float) m_y;
|
||||
@@ -638,8 +652,8 @@ public:
|
||||
void CopyObject(wxObject& obj) const;
|
||||
|
||||
public:
|
||||
long m_x;
|
||||
long m_y;
|
||||
wxCoord m_x, m_y;
|
||||
|
||||
bool m_leftDown;
|
||||
bool m_middleDown;
|
||||
bool m_rightDown;
|
||||
@@ -674,28 +688,34 @@ public:
|
||||
long KeyCode() const { return m_keyCode; }
|
||||
|
||||
// Find the position of the event
|
||||
void GetPosition(long *xpos, long *ypos) const
|
||||
{ if (xpos) *xpos = m_x;
|
||||
if (ypos) *ypos = m_y; }
|
||||
void GetPosition(wxCoord *xpos, wxCoord *ypos) const
|
||||
{
|
||||
if (xpos) *xpos = m_x;
|
||||
if (ypos) *ypos = m_y;
|
||||
}
|
||||
|
||||
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
|
||||
{ return wxPoint(m_x, m_y); }
|
||||
|
||||
// Get X position
|
||||
long GetX() const { return m_x; }
|
||||
wxCoord GetX() const { return m_x; }
|
||||
|
||||
// Get Y position
|
||||
long GetY() const { return m_y; }
|
||||
wxCoord GetY() const { return m_y; }
|
||||
|
||||
void CopyObject(wxObject& obj) const;
|
||||
|
||||
public:
|
||||
long m_x;
|
||||
long m_y;
|
||||
wxCoord m_x, m_y;
|
||||
|
||||
long m_keyCode;
|
||||
|
||||
bool m_controlDown;
|
||||
bool m_shiftDown;
|
||||
bool m_altDown;
|
||||
|
@@ -48,6 +48,15 @@ protected:
|
||||
void *m_pngData;
|
||||
|
||||
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 bool GetDataHere(void *buf) const;
|
||||
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_
|
||||
|
@@ -116,12 +116,12 @@ public:
|
||||
void operator ++ ();
|
||||
void operator ++ (int);
|
||||
|
||||
long GetX() const;
|
||||
long GetY() const;
|
||||
long GetW() const;
|
||||
long GetWidth() const { return GetW(); }
|
||||
long GetH() const;
|
||||
long GetHeight() const { return GetH(); }
|
||||
wxCoord GetX() const;
|
||||
wxCoord GetY() const;
|
||||
wxCoord GetW() const;
|
||||
wxCoord GetWidth() const { return GetW(); }
|
||||
wxCoord GetH() const;
|
||||
wxCoord GetHeight() const { return GetH(); }
|
||||
wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); }
|
||||
|
||||
private:
|
||||
|
@@ -48,6 +48,15 @@ protected:
|
||||
void *m_pngData;
|
||||
|
||||
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 bool GetDataHere(void *buf) const;
|
||||
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_
|
||||
|
@@ -116,12 +116,12 @@ public:
|
||||
void operator ++ ();
|
||||
void operator ++ (int);
|
||||
|
||||
long GetX() const;
|
||||
long GetY() const;
|
||||
long GetW() const;
|
||||
long GetWidth() const { return GetW(); }
|
||||
long GetH() const;
|
||||
long GetHeight() const { return GetH(); }
|
||||
wxCoord GetX() const;
|
||||
wxCoord GetY() const;
|
||||
wxCoord GetW() const;
|
||||
wxCoord GetWidth() const { return GetW(); }
|
||||
wxCoord GetH() const;
|
||||
wxCoord GetHeight() const { return GetH(); }
|
||||
wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); }
|
||||
|
||||
private:
|
||||
|
@@ -84,8 +84,8 @@ class WXDLLEXPORT wxToolBarBase : public wxControl
|
||||
DECLARE_ABSTRACT_CLASS(wxToolBarBase)
|
||||
public:
|
||||
|
||||
wxToolBarBase(void);
|
||||
~wxToolBarBase(void);
|
||||
wxToolBarBase();
|
||||
~wxToolBarBase();
|
||||
|
||||
// Handle wxToolBar events
|
||||
|
||||
@@ -105,14 +105,14 @@ class WXDLLEXPORT wxToolBarBase : public wxControl
|
||||
virtual wxToolBarTool *AddTool(int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap,
|
||||
bool toggle = FALSE, long xPos = -1, long yPos = -1, wxObject *clientData = NULL,
|
||||
const wxString& helpString1 = wxEmptyString, const wxString& helpString2 = wxEmptyString);
|
||||
virtual void AddSeparator(void);
|
||||
virtual void ClearTools(void);
|
||||
virtual void AddSeparator();
|
||||
virtual void ClearTools();
|
||||
|
||||
virtual void EnableTool(int toolIndex, bool enable);
|
||||
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 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
|
||||
#if WXWXIN_COMPATIBILITY
|
||||
@@ -135,34 +135,34 @@ class WXDLLEXPORT wxToolBarBase : public wxControl
|
||||
virtual void SetToolPacking(int packing);
|
||||
virtual void SetToolSeparation(int separation);
|
||||
|
||||
inline virtual wxSize GetToolMargins(void) { return wxSize(m_xMargin, m_yMargin); }
|
||||
inline virtual int GetToolPacking(void) { return m_toolPacking; }
|
||||
inline virtual int GetToolSeparation(void) { return m_toolSeparation; }
|
||||
inline virtual wxSize GetToolMargins() { return wxSize(m_xMargin, m_yMargin); }
|
||||
inline virtual int GetToolPacking() { return m_toolPacking; }
|
||||
inline virtual int GetToolSeparation() { return m_toolSeparation; }
|
||||
|
||||
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 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
|
||||
#if WXWIN_COMPATIBILITY
|
||||
inline void SetDefaultSize(int w, int h) { SetDefaultSize(wxSize(w, h)); }
|
||||
inline long GetDefaultWidth(void) const { return m_defaultWidth; }
|
||||
inline long GetDefaultHeight(void) const { return m_defaultHeight; }
|
||||
inline int GetDefaultButtonWidth(void) const { return (int) GetDefaultButtonSize().x; };
|
||||
inline int GetDefaultButtonHeight(void) const { return (int) GetDefaultButtonSize().y; };
|
||||
void SetDefaultSize(int w, int h) { SetDefaultSize(wxSize(w, h)); }
|
||||
long GetDefaultWidth() const { return m_defaultWidth; }
|
||||
long GetDefaultHeight() const { return m_defaultHeight; }
|
||||
int GetDefaultButtonWidth() const { return (int) GetDefaultButtonSize().x; };
|
||||
int GetDefaultButtonHeight() const { return (int) GetDefaultButtonSize().y; };
|
||||
virtual void SetDefaultSize(const wxSize& size) { SetToolBitmapSize(size); }
|
||||
virtual wxSize GetDefaultSize(void) const { return GetToolBitmapSize(); }
|
||||
virtual wxSize GetDefaultButtonSize(void) const { return GetToolSize(); }
|
||||
virtual wxSize GetDefaultSize() const { return GetToolBitmapSize(); }
|
||||
virtual wxSize GetDefaultButtonSize() const { return GetToolSize(); }
|
||||
#endif
|
||||
|
||||
// Lay the tools out
|
||||
virtual void LayoutTools();
|
||||
|
||||
// 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.
|
||||
// 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 GetScrollPixelsPerUnit(int *x_unit, int *y_unit) const;
|
||||
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
|
||||
virtual void PrepareDC(wxDC& dc);
|
||||
@@ -199,7 +199,7 @@ class WXDLLEXPORT wxToolBarBase : public wxControl
|
||||
virtual void GetVirtualSize(int *x, int *y) const;
|
||||
|
||||
// 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 int GetMaxRows() const { return m_maxRows; }
|
||||
@@ -222,8 +222,9 @@ class WXDLLEXPORT wxToolBarBase : public wxControl
|
||||
int m_yMargin;
|
||||
int m_toolPacking;
|
||||
int m_toolSeparation;
|
||||
long m_defaultWidth;
|
||||
long m_defaultHeight;
|
||||
|
||||
wxCoord m_defaultWidth;
|
||||
wxCoord m_defaultHeight;
|
||||
|
||||
public:
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -348,7 +348,8 @@ void wxClipboard::Clear()
|
||||
{
|
||||
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();
|
||||
}
|
||||
@@ -357,7 +358,8 @@ void wxClipboard::Clear()
|
||||
{
|
||||
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();
|
||||
}
|
||||
@@ -443,7 +445,7 @@ bool wxClipboard::AddData( wxDataObject *data )
|
||||
/* Tell the world we offer clipboard data */
|
||||
bool res = (gtk_selection_owner_set( m_clipboardWidget,
|
||||
clipboard,
|
||||
GDK_CURRENT_TIME ));
|
||||
(guint32) GDK_CURRENT_TIME ));
|
||||
|
||||
if (m_usePrimary)
|
||||
m_ownsPrimarySelection = res;
|
||||
@@ -496,7 +498,7 @@ bool wxClipboard::IsSupported( const wxDataFormat& format )
|
||||
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
||||
: g_clipboardAtom,
|
||||
g_targetsAtom,
|
||||
GDK_CURRENT_TIME );
|
||||
(guint32) GDK_CURRENT_TIME );
|
||||
|
||||
while (m_waiting) gtk_main_iteration();
|
||||
|
||||
@@ -542,7 +544,7 @@ bool wxClipboard::GetData( wxDataObject& data )
|
||||
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
||||
: g_clipboardAtom,
|
||||
g_targetsAtom,
|
||||
GDK_CURRENT_TIME );
|
||||
(guint32) GDK_CURRENT_TIME );
|
||||
|
||||
while (m_waiting) gtk_main_iteration();
|
||||
|
||||
@@ -576,7 +578,7 @@ bool wxClipboard::GetData( wxDataObject& data )
|
||||
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
||||
: g_clipboardAtom,
|
||||
m_targetRequested,
|
||||
GDK_CURRENT_TIME );
|
||||
(guint32) GDK_CURRENT_TIME );
|
||||
|
||||
while (m_waiting) gtk_main_iteration();
|
||||
|
||||
|
@@ -619,13 +619,13 @@ void wxComboBox::OnSize( wxSizeEvent &event )
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
return;
|
||||
|
||||
#if 0
|
||||
int w = 21;
|
||||
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_usize( GTK_COMBO(m_widget)->button, w, m_height );
|
||||
#endif // 0
|
||||
}
|
||||
|
||||
void wxComboBox::ApplyWidgetStyle()
|
||||
|
@@ -503,7 +503,7 @@ void wxDropTarget::RegisterWidget( GtkWidget *widget )
|
||||
|
||||
static void
|
||||
source_drag_data_get (GtkWidget *WXUNUSED(widget),
|
||||
GdkDragContext *context,
|
||||
GdkDragContext *WXUNUSED(context),
|
||||
GtkSelectionData *selection_data,
|
||||
guint WXUNUSED(info),
|
||||
guint WXUNUSED(time),
|
||||
@@ -748,7 +748,7 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove )
|
||||
event.x = x;
|
||||
event.y = y;
|
||||
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 */
|
||||
int button_number = 0;
|
||||
|
@@ -187,7 +187,7 @@ wxFont::wxFont( GdkFont *WXUNUSED(font), char *xFontName )
|
||||
tn.GetNextToken(); // pixel size
|
||||
|
||||
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;
|
||||
|
||||
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 */
|
||||
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;
|
||||
|
||||
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 );
|
||||
|
||||
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),
|
||||
"value_changed",
|
||||
|
@@ -116,7 +116,8 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||
|
||||
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),
|
||||
"value_changed",
|
||||
|
@@ -567,7 +567,7 @@ void wxTextCtrl::SetInsertionPoint( long pos )
|
||||
|
||||
/* 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 )
|
||||
{
|
||||
if (!ss_tooltips) return;
|
||||
if (!ss_tooltips)
|
||||
return;
|
||||
|
||||
gtk_tooltips_set_delay( ss_tooltips, msecs );
|
||||
gtk_tooltips_set_delay( ss_tooltips, (int)msecs );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -465,9 +465,9 @@ static long map_to_unmodified_wx_keysym( KeySym keysym )
|
||||
{
|
||||
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 */
|
||||
key_code = keysym;
|
||||
key_code = (guint)keysym;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -564,7 +564,7 @@ static long map_to_wx_keysym( KeySym keysym )
|
||||
{
|
||||
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
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
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)
|
||||
wxapp_install_idle_handler();
|
||||
@@ -967,8 +968,8 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
|
||||
|
||||
if (!g_captureWindow)
|
||||
{
|
||||
int x = event.m_x;
|
||||
int y = event.m_y;
|
||||
wxCoord x = event.m_x;
|
||||
wxCoord y = event.m_y;
|
||||
if (win->m_wxwindow)
|
||||
{
|
||||
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
||||
@@ -1094,8 +1095,8 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
|
||||
|
||||
if (!g_captureWindow)
|
||||
{
|
||||
int x = event.m_x;
|
||||
int y = event.m_y;
|
||||
wxCoord x = event.m_x;
|
||||
wxCoord y = event.m_y;
|
||||
if (win->m_wxwindow)
|
||||
{
|
||||
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
||||
@@ -1214,8 +1215,8 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion
|
||||
|
||||
if (!g_captureWindow)
|
||||
{
|
||||
int x = event.m_x;
|
||||
int y = event.m_y;
|
||||
wxCoord x = event.m_x;
|
||||
wxCoord y = event.m_y;
|
||||
if (win->m_wxwindow)
|
||||
{
|
||||
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
||||
@@ -2977,7 +2978,7 @@ void wxWindow::CaptureMouse()
|
||||
GDK_POINTER_MOTION_MASK),
|
||||
(GdkWindow *) NULL,
|
||||
m_cursor.GetCursor(),
|
||||
GDK_CURRENT_TIME );
|
||||
(guint32)GDK_CURRENT_TIME );
|
||||
g_captureWindow = this;
|
||||
}
|
||||
|
||||
@@ -2993,9 +2994,10 @@ void wxWindow::ReleaseMouse()
|
||||
else
|
||||
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;
|
||||
}
|
||||
|
||||
|
@@ -348,7 +348,8 @@ void wxClipboard::Clear()
|
||||
{
|
||||
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();
|
||||
}
|
||||
@@ -357,7 +358,8 @@ void wxClipboard::Clear()
|
||||
{
|
||||
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();
|
||||
}
|
||||
@@ -443,7 +445,7 @@ bool wxClipboard::AddData( wxDataObject *data )
|
||||
/* Tell the world we offer clipboard data */
|
||||
bool res = (gtk_selection_owner_set( m_clipboardWidget,
|
||||
clipboard,
|
||||
GDK_CURRENT_TIME ));
|
||||
(guint32) GDK_CURRENT_TIME ));
|
||||
|
||||
if (m_usePrimary)
|
||||
m_ownsPrimarySelection = res;
|
||||
@@ -496,7 +498,7 @@ bool wxClipboard::IsSupported( const wxDataFormat& format )
|
||||
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
||||
: g_clipboardAtom,
|
||||
g_targetsAtom,
|
||||
GDK_CURRENT_TIME );
|
||||
(guint32) GDK_CURRENT_TIME );
|
||||
|
||||
while (m_waiting) gtk_main_iteration();
|
||||
|
||||
@@ -542,7 +544,7 @@ bool wxClipboard::GetData( wxDataObject& data )
|
||||
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
||||
: g_clipboardAtom,
|
||||
g_targetsAtom,
|
||||
GDK_CURRENT_TIME );
|
||||
(guint32) GDK_CURRENT_TIME );
|
||||
|
||||
while (m_waiting) gtk_main_iteration();
|
||||
|
||||
@@ -576,7 +578,7 @@ bool wxClipboard::GetData( wxDataObject& data )
|
||||
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
|
||||
: g_clipboardAtom,
|
||||
m_targetRequested,
|
||||
GDK_CURRENT_TIME );
|
||||
(guint32) GDK_CURRENT_TIME );
|
||||
|
||||
while (m_waiting) gtk_main_iteration();
|
||||
|
||||
|
@@ -619,13 +619,13 @@ void wxComboBox::OnSize( wxSizeEvent &event )
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
return;
|
||||
|
||||
#if 0
|
||||
int w = 21;
|
||||
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_usize( GTK_COMBO(m_widget)->button, w, m_height );
|
||||
#endif // 0
|
||||
}
|
||||
|
||||
void wxComboBox::ApplyWidgetStyle()
|
||||
|
@@ -503,7 +503,7 @@ void wxDropTarget::RegisterWidget( GtkWidget *widget )
|
||||
|
||||
static void
|
||||
source_drag_data_get (GtkWidget *WXUNUSED(widget),
|
||||
GdkDragContext *context,
|
||||
GdkDragContext *WXUNUSED(context),
|
||||
GtkSelectionData *selection_data,
|
||||
guint WXUNUSED(info),
|
||||
guint WXUNUSED(time),
|
||||
@@ -748,7 +748,7 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove )
|
||||
event.x = x;
|
||||
event.y = y;
|
||||
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 */
|
||||
int button_number = 0;
|
||||
|
@@ -187,7 +187,7 @@ wxFont::wxFont( GdkFont *WXUNUSED(font), char *xFontName )
|
||||
tn.GetNextToken(); // pixel size
|
||||
|
||||
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;
|
||||
|
||||
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 */
|
||||
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;
|
||||
|
||||
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 );
|
||||
|
||||
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),
|
||||
"value_changed",
|
||||
|
@@ -116,7 +116,8 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||
|
||||
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),
|
||||
"value_changed",
|
||||
|
@@ -567,7 +567,7 @@ void wxTextCtrl::SetInsertionPoint( long pos )
|
||||
|
||||
/* 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 )
|
||||
{
|
||||
if (!ss_tooltips) return;
|
||||
if (!ss_tooltips)
|
||||
return;
|
||||
|
||||
gtk_tooltips_set_delay( ss_tooltips, msecs );
|
||||
gtk_tooltips_set_delay( ss_tooltips, (int)msecs );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -465,9 +465,9 @@ static long map_to_unmodified_wx_keysym( KeySym keysym )
|
||||
{
|
||||
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 */
|
||||
key_code = keysym;
|
||||
key_code = (guint)keysym;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -564,7 +564,7 @@ static long map_to_wx_keysym( KeySym keysym )
|
||||
{
|
||||
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
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
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)
|
||||
wxapp_install_idle_handler();
|
||||
@@ -967,8 +968,8 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
|
||||
|
||||
if (!g_captureWindow)
|
||||
{
|
||||
int x = event.m_x;
|
||||
int y = event.m_y;
|
||||
wxCoord x = event.m_x;
|
||||
wxCoord y = event.m_y;
|
||||
if (win->m_wxwindow)
|
||||
{
|
||||
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
||||
@@ -1094,8 +1095,8 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
|
||||
|
||||
if (!g_captureWindow)
|
||||
{
|
||||
int x = event.m_x;
|
||||
int y = event.m_y;
|
||||
wxCoord x = event.m_x;
|
||||
wxCoord y = event.m_y;
|
||||
if (win->m_wxwindow)
|
||||
{
|
||||
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
||||
@@ -1214,8 +1215,8 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion
|
||||
|
||||
if (!g_captureWindow)
|
||||
{
|
||||
int x = event.m_x;
|
||||
int y = event.m_y;
|
||||
wxCoord x = event.m_x;
|
||||
wxCoord y = event.m_y;
|
||||
if (win->m_wxwindow)
|
||||
{
|
||||
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
|
||||
@@ -2977,7 +2978,7 @@ void wxWindow::CaptureMouse()
|
||||
GDK_POINTER_MOTION_MASK),
|
||||
(GdkWindow *) NULL,
|
||||
m_cursor.GetCursor(),
|
||||
GDK_CURRENT_TIME );
|
||||
(guint32)GDK_CURRENT_TIME );
|
||||
g_captureWindow = this;
|
||||
}
|
||||
|
||||
@@ -2993,9 +2994,10 @@ void wxWindow::ReleaseMouse()
|
||||
else
|
||||
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;
|
||||
}
|
||||
|
||||
|
@@ -62,7 +62,7 @@ static char **CreateFontList(wxChar spacing,
|
||||
int *nFonts)
|
||||
{
|
||||
wxString xencoding, xregistry;
|
||||
wxGetXFontEncoding(encoding, &xencoding, &xregistry);
|
||||
wxGetXFontEncoding(encoding, &xregistry, &xencoding);
|
||||
|
||||
wxString pattern;
|
||||
pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-%s-%s"),
|
||||
|
Reference in New Issue
Block a user