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:
Vadim Zeitlin
1999-11-02 18:41:23 +00:00
parent 173348db5f
commit b02da6b187
26 changed files with 317 additions and 252 deletions

View File

@@ -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)); }
};
// ----------------------------------------------------------------------------

View File

@@ -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;

View File

@@ -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_

View File

@@ -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:

View File

@@ -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_

View File

@@ -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:

View File

@@ -40,9 +40,9 @@ class WXDLLEXPORT wxToolBarTool: public wxObject
public:
wxToolBarTool() {}
#ifdef __WXGTK__
wxToolBarTool(wxToolBar *owner,
wxToolBarTool(wxToolBar *owner,
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 = "",
GtkWidget *pixmap = (GtkWidget *) NULL );
#else
@@ -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,13 +222,14 @@ 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:
////////////////////////////////////////////////////////////////////////
//// IMPLEMENTATION
// Calculate scroll increment
virtual int CalcScrollInc(wxScrollEvent& event);