Source cleaning: whitespaces, tabs, FALSE/false, TRUE/true, -1/wxDefaultCoord, !!/!IsEmpty().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -77,7 +77,7 @@ public:
 | 
				
			|||||||
    virtual int GetBezelFace() const;
 | 
					    virtual int GetBezelFace() const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // overriden base class virtuals
 | 
					    // overriden base class virtuals
 | 
				
			||||||
    virtual bool AcceptsFocus() const { return FALSE; }
 | 
					    virtual bool AcceptsFocus() const { return false; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
protected:
 | 
					protected:
 | 
				
			||||||
    // the max position
 | 
					    // the max position
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,7 +27,7 @@
 | 
				
			|||||||
// instead of wxPoint and wxSize because they are (x,y) and usually pixel
 | 
					// instead of wxPoint and wxSize because they are (x,y) and usually pixel
 | 
				
			||||||
// oriented while grids and tables are usually thought of as (row,col) so some
 | 
					// oriented while grids and tables are usually thought of as (row,col) so some
 | 
				
			||||||
// confusion would definitely result in using wxPoint...
 | 
					// confusion would definitely result in using wxPoint...
 | 
				
			||||||
// 
 | 
					//
 | 
				
			||||||
// NOTE: This should probably be refactored to a common RowCol data type which
 | 
					// NOTE: This should probably be refactored to a common RowCol data type which
 | 
				
			||||||
// is used for this and also for wxGridCellCoords.
 | 
					// is used for this and also for wxGridCellCoords.
 | 
				
			||||||
//---------------------------------------------------------------------------
 | 
					//---------------------------------------------------------------------------
 | 
				
			||||||
@@ -44,7 +44,7 @@ public:
 | 
				
			|||||||
    int GetCol() const { return m_col; }
 | 
					    int GetCol() const { return m_col; }
 | 
				
			||||||
    void SetRow(int row) { m_row = row; }
 | 
					    void SetRow(int row) { m_row = row; }
 | 
				
			||||||
    void SetCol(int col) { m_col = col; }
 | 
					    void SetCol(int col) { m_col = col; }
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    bool operator==(const wxGBPosition& p) const { return m_row == p.m_row && m_col == p.m_col; }
 | 
					    bool operator==(const wxGBPosition& p) const { return m_row == p.m_row && m_col == p.m_col; }
 | 
				
			||||||
    bool operator!=(const wxGBPosition& p) const { return !(*this == p); }
 | 
					    bool operator!=(const wxGBPosition& p) const { return !(*this == p); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -66,7 +66,7 @@ public:
 | 
				
			|||||||
    int GetColspan() const { return m_colspan; }
 | 
					    int GetColspan() const { return m_colspan; }
 | 
				
			||||||
    void SetRowspan(int rowspan) { m_rowspan = rowspan; }
 | 
					    void SetRowspan(int rowspan) { m_rowspan = rowspan; }
 | 
				
			||||||
    void SetColspan(int colspan) { m_colspan = colspan; }
 | 
					    void SetColspan(int colspan) { m_colspan = colspan; }
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    bool operator==(const wxGBSpan& o) const { return m_rowspan == o.m_rowspan && m_colspan == o.m_colspan; }
 | 
					    bool operator==(const wxGBSpan& o) const { return m_rowspan == o.m_rowspan && m_colspan == o.m_colspan; }
 | 
				
			||||||
    bool operator!=(const wxGBSpan& o) const { return !(*this == o); }
 | 
					    bool operator!=(const wxGBSpan& o) const { return !(*this == o); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -75,7 +75,7 @@ private:
 | 
				
			|||||||
    int m_colspan;
 | 
					    int m_colspan;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   
 | 
					
 | 
				
			||||||
WXDLLEXPORT_DATA(extern const wxGBSpan) wxDefaultSpan;
 | 
					WXDLLEXPORT_DATA(extern const wxGBSpan) wxDefaultSpan;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -117,7 +117,7 @@ public:
 | 
				
			|||||||
    // default ctor
 | 
					    // default ctor
 | 
				
			||||||
    wxGBSizerItem();
 | 
					    wxGBSizerItem();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    // Get the grid position of the item
 | 
					    // Get the grid position of the item
 | 
				
			||||||
    wxGBPosition GetPos() const { return m_pos; }
 | 
					    wxGBPosition GetPos() const { return m_pos; }
 | 
				
			||||||
    void GetPos(int& row, int& col) const;
 | 
					    void GetPos(int& row, int& col) const;
 | 
				
			||||||
@@ -147,20 +147,20 @@ public:
 | 
				
			|||||||
    // Get the row and column of the endpoint of this item
 | 
					    // Get the row and column of the endpoint of this item
 | 
				
			||||||
    void GetEndPos(int& row, int& col);
 | 
					    void GetEndPos(int& row, int& col);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    wxGridBagSizer* GetGBSizer() const { return m_gbsizer; }
 | 
					    wxGridBagSizer* GetGBSizer() const { return m_gbsizer; }
 | 
				
			||||||
    void SetGBSizer(wxGridBagSizer* sizer) { m_gbsizer = sizer; }
 | 
					    void SetGBSizer(wxGridBagSizer* sizer) { m_gbsizer = sizer; }
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
protected:
 | 
					protected:
 | 
				
			||||||
    wxGBPosition    m_pos;
 | 
					    wxGBPosition    m_pos;
 | 
				
			||||||
    wxGBSpan        m_span;
 | 
					    wxGBSpan        m_span;
 | 
				
			||||||
    wxGridBagSizer* m_gbsizer;  // so SetPos/SetSpan can check for intersects
 | 
					    wxGridBagSizer* m_gbsizer;  // so SetPos/SetSpan can check for intersects
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
private:    
 | 
					private:
 | 
				
			||||||
    DECLARE_DYNAMIC_CLASS(wxGBSizerItem)
 | 
					    DECLARE_DYNAMIC_CLASS(wxGBSizerItem)
 | 
				
			||||||
    DECLARE_NO_COPY_CLASS(wxGBSizerItem)        
 | 
					    DECLARE_NO_COPY_CLASS(wxGBSizerItem)
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -205,7 +205,7 @@ public:
 | 
				
			|||||||
    // Get the size of the specified cell, including hgap and vgap.  Only
 | 
					    // Get the size of the specified cell, including hgap and vgap.  Only
 | 
				
			||||||
    // valid after a Layout.
 | 
					    // valid after a Layout.
 | 
				
			||||||
    wxSize GetCellSize(int row, int col) const;
 | 
					    wxSize GetCellSize(int row, int col) const;
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    // Get the grid position of the specified item (non-recursive)
 | 
					    // Get the grid position of the specified item (non-recursive)
 | 
				
			||||||
    wxGBPosition GetItemPosition(wxWindow *window);
 | 
					    wxGBPosition GetItemPosition(wxWindow *window);
 | 
				
			||||||
    wxGBPosition GetItemPosition(wxSizer *sizer);
 | 
					    wxGBPosition GetItemPosition(wxSizer *sizer);
 | 
				
			||||||
@@ -229,31 +229,31 @@ public:
 | 
				
			|||||||
    bool SetItemSpan(wxWindow *window, const wxGBSpan& span);
 | 
					    bool SetItemSpan(wxWindow *window, const wxGBSpan& span);
 | 
				
			||||||
    bool SetItemSpan(wxSizer *sizer, const wxGBSpan& span);
 | 
					    bool SetItemSpan(wxSizer *sizer, const wxGBSpan& span);
 | 
				
			||||||
    bool SetItemSpan(size_t index, const wxGBSpan& span);
 | 
					    bool SetItemSpan(size_t index, const wxGBSpan& span);
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Find the sizer item for the given window or subsizer, returns NULL if
 | 
					    // Find the sizer item for the given window or subsizer, returns NULL if
 | 
				
			||||||
    // not found. (non-recursive)
 | 
					    // not found. (non-recursive)
 | 
				
			||||||
    wxGBSizerItem* FindItem(wxWindow* window);
 | 
					    wxGBSizerItem* FindItem(wxWindow* window);
 | 
				
			||||||
    wxGBSizerItem* FindItem(wxSizer* sizer);
 | 
					    wxGBSizerItem* FindItem(wxSizer* sizer);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    // Return the sizer item for the given grid cell, or NULL if there is no
 | 
					    // Return the sizer item for the given grid cell, or NULL if there is no
 | 
				
			||||||
    // item at that position. (non-recursive)
 | 
					    // item at that position. (non-recursive)
 | 
				
			||||||
    wxGBSizerItem* FindItemAtPosition(const wxGBPosition& pos);
 | 
					    wxGBSizerItem* FindItemAtPosition(const wxGBPosition& pos);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    // Return the sizer item located at the point given in pt, or NULL if
 | 
					    // Return the sizer item located at the point given in pt, or NULL if
 | 
				
			||||||
    // there is no item at that point. The (x,y) coordinates in pt correspond
 | 
					    // there is no item at that point. The (x,y) coordinates in pt correspond
 | 
				
			||||||
    // to the client coordinates of the window using the sizer for
 | 
					    // to the client coordinates of the window using the sizer for
 | 
				
			||||||
    // layout. (non-recursive)
 | 
					    // layout. (non-recursive)
 | 
				
			||||||
    wxGBSizerItem* FindItemAtPoint(const wxPoint& pt);
 | 
					    wxGBSizerItem* FindItemAtPoint(const wxPoint& pt);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    // Return the sizer item that has a matching user data (it only compares
 | 
					    // Return the sizer item that has a matching user data (it only compares
 | 
				
			||||||
    // pointer values) or NULL if not found. (non-recursive)
 | 
					    // pointer values) or NULL if not found. (non-recursive)
 | 
				
			||||||
    wxGBSizerItem* FindItemWithData(const wxObject* userData);
 | 
					    wxGBSizerItem* FindItemWithData(const wxObject* userData);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    // These are what make the sizer do size calculations and layout
 | 
					    // These are what make the sizer do size calculations and layout
 | 
				
			||||||
    virtual void RecalcSizes();
 | 
					    virtual void RecalcSizes();
 | 
				
			||||||
    virtual wxSize CalcMin();
 | 
					    virtual wxSize CalcMin();
 | 
				
			||||||
@@ -266,7 +266,7 @@ public:
 | 
				
			|||||||
    bool CheckForIntersection(wxGBSizerItem* item, wxGBSizerItem* excludeItem = NULL);
 | 
					    bool CheckForIntersection(wxGBSizerItem* item, wxGBSizerItem* excludeItem = NULL);
 | 
				
			||||||
    bool CheckForIntersection(const wxGBPosition& pos, const wxGBSpan& span, wxGBSizerItem* excludeItem = NULL);
 | 
					    bool CheckForIntersection(const wxGBPosition& pos, const wxGBSpan& span, wxGBSizerItem* excludeItem = NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    // The Add base class virtuals should not be used with this class, but
 | 
					    // The Add base class virtuals should not be used with this class, but
 | 
				
			||||||
    // we'll try to make them automatically select a location for the item
 | 
					    // we'll try to make them automatically select a location for the item
 | 
				
			||||||
    // anyway.
 | 
					    // anyway.
 | 
				
			||||||
@@ -287,17 +287,17 @@ public:
 | 
				
			|||||||
    virtual void Prepend( int width,  int height,  int proportion = 0,  int flag = 0,  int border = 0,  wxObject* userData = NULL );
 | 
					    virtual void Prepend( int width,  int height,  int proportion = 0,  int flag = 0,  int border = 0,  wxObject* userData = NULL );
 | 
				
			||||||
    virtual void Prepend( wxSizerItem *item );
 | 
					    virtual void Prepend( wxSizerItem *item );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
protected:
 | 
					protected:
 | 
				
			||||||
    wxGBPosition FindEmptyCell();
 | 
					    wxGBPosition FindEmptyCell();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wxSize m_emptyCellSize;
 | 
					    wxSize m_emptyCellSize;
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    DECLARE_CLASS(wxGridBagSizer)
 | 
					    DECLARE_CLASS(wxGridBagSizer)
 | 
				
			||||||
    DECLARE_NO_COPY_CLASS(wxGridBagSizer)        
 | 
					    DECLARE_NO_COPY_CLASS(wxGridBagSizer)
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//---------------------------------------------------------------------------
 | 
					//---------------------------------------------------------------------------
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -117,7 +117,7 @@ enum wxStockCursor
 | 
				
			|||||||
    wxCURSOR_DEFAULT, // standard X11 cursor
 | 
					    wxCURSOR_DEFAULT, // standard X11 cursor
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#ifdef __WXMAC__
 | 
					#ifdef __WXMAC__
 | 
				
			||||||
	wxCURSOR_COPY_ARROW , // MacOS Theme Plus arrow
 | 
					    wxCURSOR_COPY_ARROW , // MacOS Theme Plus arrow
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#ifdef __X__
 | 
					#ifdef __X__
 | 
				
			||||||
    // Not yet implemented for Windows
 | 
					    // Not yet implemented for Windows
 | 
				
			||||||
@@ -234,15 +234,15 @@ public:
 | 
				
			|||||||
    int GetWidth() const { return x; }
 | 
					    int GetWidth() const { return x; }
 | 
				
			||||||
    int GetHeight() const { return y; }
 | 
					    int GetHeight() const { return y; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    bool IsFullySpecified() const { return x != -1 && y != -1; }
 | 
					    bool IsFullySpecified() const { return x != wxDefaultCoord && y != wxDefaultCoord; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // combine this size with the other one replacing the default (i.e. equal
 | 
					    // combine this size with the other one replacing the default (i.e. equal
 | 
				
			||||||
    // to -1) components of this object with those of the other
 | 
					    // to wxDefaultCoord) components of this object with those of the other
 | 
				
			||||||
    void SetDefaults(const wxSize& size)
 | 
					    void SetDefaults(const wxSize& size)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if ( x == -1 )
 | 
					        if ( x == wxDefaultCoord )
 | 
				
			||||||
            x = size.x;
 | 
					            x = size.x;
 | 
				
			||||||
        if ( y == -1 )
 | 
					        if ( y == wxDefaultCoord )
 | 
				
			||||||
            y = size.y;
 | 
					            y = size.y;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -392,11 +392,11 @@ public:
 | 
				
			|||||||
    bool operator==(const wxRect& rect) const;
 | 
					    bool operator==(const wxRect& rect) const;
 | 
				
			||||||
    bool operator!=(const wxRect& rect) const { return !(*this == rect); }
 | 
					    bool operator!=(const wxRect& rect) const { return !(*this == rect); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // return TRUE if the point is (not strcitly) inside the rect
 | 
					    // return true if the point is (not strcitly) inside the rect
 | 
				
			||||||
    bool Inside(int x, int y) const;
 | 
					    bool Inside(int x, int y) const;
 | 
				
			||||||
    bool Inside(const wxPoint& pt) const { return Inside(pt.x, pt.y); }
 | 
					    bool Inside(const wxPoint& pt) const { return Inside(pt.x, pt.y); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // return TRUE if the rectangles have a non empty intersection
 | 
					    // return true if the rectangles have a non empty intersection
 | 
				
			||||||
    bool Intersects(const wxRect& rect) const;
 | 
					    bool Intersects(const wxRect& rect) const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
@@ -440,7 +440,7 @@ public:
 | 
				
			|||||||
    void AddFont(wxFont *font);
 | 
					    void AddFont(wxFont *font);
 | 
				
			||||||
    void RemoveFont(wxFont *font);
 | 
					    void RemoveFont(wxFont *font);
 | 
				
			||||||
    wxFont *FindOrCreateFont(int pointSize, int family, int style, int weight,
 | 
					    wxFont *FindOrCreateFont(int pointSize, int family, int style, int weight,
 | 
				
			||||||
                             bool underline = FALSE,
 | 
					                             bool underline = false,
 | 
				
			||||||
                             const wxString& face = wxEmptyString,
 | 
					                             const wxString& face = wxEmptyString,
 | 
				
			||||||
                             wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
 | 
					                             wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -300,10 +300,10 @@ public :
 | 
				
			|||||||
    inline wxPoint2DDouble();
 | 
					    inline wxPoint2DDouble();
 | 
				
			||||||
    inline wxPoint2DDouble( wxDouble x , wxDouble y );
 | 
					    inline wxPoint2DDouble( wxDouble x , wxDouble y );
 | 
				
			||||||
    inline wxPoint2DDouble( const wxPoint2DDouble &pt );
 | 
					    inline wxPoint2DDouble( const wxPoint2DDouble &pt );
 | 
				
			||||||
    wxPoint2DDouble( const wxPoint2DInt &pt ) 
 | 
					    wxPoint2DDouble( const wxPoint2DInt &pt )
 | 
				
			||||||
		{ 	m_x = (wxDouble) pt.m_x ; m_y = (wxDouble) pt.m_y ; }
 | 
					        { m_x = (wxDouble) pt.m_x ; m_y = (wxDouble) pt.m_y ; }
 | 
				
			||||||
	wxPoint2DDouble( const wxPoint &pt ) 
 | 
					    wxPoint2DDouble( const wxPoint &pt )
 | 
				
			||||||
		{ 	m_x = (wxDouble) pt.x ; m_y = (wxDouble) pt.y ; }
 | 
					        { m_x = (wxDouble) pt.x ; m_y = (wxDouble) pt.y ; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // two different conversions to integers, floor and rounding
 | 
					    // two different conversions to integers, floor and rounding
 | 
				
			||||||
    inline void GetFloor( wxInt32 *x , wxInt32 *y ) const;
 | 
					    inline void GetFloor( wxInt32 *x , wxInt32 *y ) const;
 | 
				
			||||||
@@ -388,7 +388,7 @@ inline wxDouble wxPoint2DDouble::GetVectorLength() const
 | 
				
			|||||||
    return sqrt( (m_x)*(m_x) + (m_y)*(m_y) ) ;
 | 
					    return sqrt( (m_x)*(m_x) + (m_y)*(m_y) ) ;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
inline void wxPoint2DDouble::SetVectorLength( wxDouble length ) 
 | 
					inline void wxPoint2DDouble::SetVectorLength( wxDouble length )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    wxDouble before = GetVectorLength() ;
 | 
					    wxDouble before = GetVectorLength() ;
 | 
				
			||||||
    m_x = (m_x * length / before) ;
 | 
					    m_x = (m_x * length / before) ;
 | 
				
			||||||
@@ -590,8 +590,8 @@ public:
 | 
				
			|||||||
                     ( ( pt.m_x > m_x + m_width ) ? wxOutRight : 0 ) +
 | 
					                     ( ( pt.m_x > m_x + m_width ) ? wxOutRight : 0 ) +
 | 
				
			||||||
                     ( ( pt.m_y < m_y ) ? wxOutTop : 0 )  +
 | 
					                     ( ( pt.m_y < m_y ) ? wxOutTop : 0 )  +
 | 
				
			||||||
                     ( ( pt.m_y > m_y + m_height ) ? wxOutBottom : 0 )); }
 | 
					                     ( ( pt.m_y > m_y + m_height ) ? wxOutBottom : 0 )); }
 | 
				
			||||||
	inline wxOutCode GetOutcode(const wxPoint2DDouble &pt) const
 | 
					    inline wxOutCode GetOutcode(const wxPoint2DDouble &pt) const
 | 
				
			||||||
		{ return GetOutCode(pt) ; }
 | 
					        { return GetOutCode(pt) ; }
 | 
				
			||||||
    inline bool Contains( const wxPoint2DDouble &pt ) const
 | 
					    inline bool Contains( const wxPoint2DDouble &pt ) const
 | 
				
			||||||
        { return  GetOutCode( pt ) == wxInside; }
 | 
					        { return  GetOutCode( pt ) == wxInside; }
 | 
				
			||||||
    inline bool Contains( const wxRect2DDouble &rect ) const
 | 
					    inline bool Contains( const wxRect2DDouble &rect ) const
 | 
				
			||||||
@@ -702,8 +702,8 @@ public:
 | 
				
			|||||||
                     ( ( pt.m_x >= m_x + m_width ) ? wxOutRight : 0 ) +
 | 
					                     ( ( pt.m_x >= m_x + m_width ) ? wxOutRight : 0 ) +
 | 
				
			||||||
                     ( ( pt.m_y < m_y ) ? wxOutTop : 0 )  +
 | 
					                     ( ( pt.m_y < m_y ) ? wxOutTop : 0 )  +
 | 
				
			||||||
                     ( ( pt.m_y >= m_y + m_height ) ? wxOutBottom : 0 )); }
 | 
					                     ( ( pt.m_y >= m_y + m_height ) ? wxOutBottom : 0 )); }
 | 
				
			||||||
		inline wxOutCode GetOutcode( const wxPoint2DInt &pt ) const
 | 
					        inline wxOutCode GetOutcode( const wxPoint2DInt &pt ) const
 | 
				
			||||||
			{ return GetOutCode( pt ) ; }
 | 
					            { return GetOutCode( pt ) ; }
 | 
				
			||||||
        inline bool Contains( const wxPoint2DInt &pt ) const
 | 
					        inline bool Contains( const wxPoint2DInt &pt ) const
 | 
				
			||||||
            { return  GetOutCode( pt ) == wxInside; }
 | 
					            { return  GetOutCode( pt ) == wxInside; }
 | 
				
			||||||
        inline bool Contains( const wxRect2DInt &rect ) const
 | 
					        inline bool Contains( const wxRect2DInt &rect ) const
 | 
				
			||||||
@@ -776,8 +776,8 @@ inline wxRect2DInt::wxRect2DInt( const wxPoint2DInt& pos, const wxSize& size)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
inline bool wxRect2DInt::operator == (const wxRect2DInt& rect) const
 | 
					inline bool wxRect2DInt::operator == (const wxRect2DInt& rect) const
 | 
				
			||||||
{ 
 | 
					{
 | 
				
			||||||
    return (m_x==rect.m_x && m_y==rect.m_y && 
 | 
					    return (m_x==rect.m_x && m_y==rect.m_y &&
 | 
				
			||||||
            m_width==rect.m_width && m_height==rect.m_height);
 | 
					            m_width==rect.m_width && m_height==rect.m_height);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -136,13 +136,13 @@ public:
 | 
				
			|||||||
    // move through the animation
 | 
					    // move through the animation
 | 
				
			||||||
    bool GoFirstFrame();
 | 
					    bool GoFirstFrame();
 | 
				
			||||||
    bool GoLastFrame();
 | 
					    bool GoLastFrame();
 | 
				
			||||||
    bool GoNextFrame(bool cyclic = FALSE);
 | 
					    bool GoNextFrame(bool cyclic = false);
 | 
				
			||||||
    bool GoPrevFrame(bool cyclic = FALSE);
 | 
					    bool GoPrevFrame(bool cyclic = false);
 | 
				
			||||||
    bool GoFrame(int which);
 | 
					    bool GoFrame(int which);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
    // constructor, destructor, etc.
 | 
					    // constructor, destructor, etc.
 | 
				
			||||||
    wxGIFDecoder(wxInputStream *s, bool anim = FALSE);
 | 
					    wxGIFDecoder(wxInputStream *s, bool anim = false);
 | 
				
			||||||
    ~wxGIFDecoder();
 | 
					    ~wxGIFDecoder();
 | 
				
			||||||
    bool CanRead();
 | 
					    bool CanRead();
 | 
				
			||||||
    int ReadGIF();
 | 
					    int ReadGIF();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,7 +30,7 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // use this in the constructor of the user-derived wxGLApp class to
 | 
					    // use this in the constructor of the user-derived wxGLApp class to
 | 
				
			||||||
    // determine if an OpenGL rendering context with these attributes
 | 
					    // determine if an OpenGL rendering context with these attributes
 | 
				
			||||||
    // is available - returns TRUE if so, FALSE if not.
 | 
					    // is available - returns true if so, false if not.
 | 
				
			||||||
    bool InitGLVisual(int *attribList);
 | 
					    bool InitGLVisual(int *attribList);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -281,10 +281,10 @@ public:
 | 
				
			|||||||
    void Put(long key, const wxString& value);
 | 
					    void Put(long key, const wxString& value);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // get the string from the key: if not found, an empty string is returned
 | 
					    // get the string from the key: if not found, an empty string is returned
 | 
				
			||||||
    // and the wasFound is set to FALSE if not NULL
 | 
					    // and the wasFound is set to false if not NULL
 | 
				
			||||||
    wxString Get(long key, bool *wasFound = NULL) const;
 | 
					    wxString Get(long key, bool *wasFound = NULL) const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // remove the item, returning TRUE if the item was found and deleted
 | 
					    // remove the item, returning true if the item was found and deleted
 | 
				
			||||||
    bool Delete(long key) const;
 | 
					    bool Delete(long key) const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // clean up
 | 
					    // clean up
 | 
				
			||||||
@@ -584,7 +584,7 @@ private:
 | 
				
			|||||||
            {                                                                  \
 | 
					            {                                                                  \
 | 
				
			||||||
                m_hashTable[slot] = new listclass(m_keyType);                  \
 | 
					                m_hashTable[slot] = new listclass(m_keyType);                  \
 | 
				
			||||||
                if ( m_deleteContents )                                        \
 | 
					                if ( m_deleteContents )                                        \
 | 
				
			||||||
                    m_hashTable[slot]->DeleteContents(TRUE);                   \
 | 
					                    m_hashTable[slot]->DeleteContents(true);                   \
 | 
				
			||||||
            }                                                                  \
 | 
					            }                                                                  \
 | 
				
			||||||
                                                                               \
 | 
					                                                                               \
 | 
				
			||||||
            ((listclass *)m_hashTable[slot])->Append(value, data);             \
 | 
					            ((listclass *)m_hashTable[slot])->Append(value, data);             \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -433,8 +433,8 @@ public: \
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// grow/shrink predicates
 | 
					// grow/shrink predicates
 | 
				
			||||||
inline bool never_grow( size_t, size_t ) { return FALSE; }
 | 
					inline bool never_grow( size_t, size_t ) { return false; }
 | 
				
			||||||
inline bool never_shrink( size_t, size_t ) { return FALSE; }
 | 
					inline bool never_shrink( size_t, size_t ) { return false; }
 | 
				
			||||||
inline bool grow_lf70( size_t buckets, size_t items )
 | 
					inline bool grow_lf70( size_t buckets, size_t items )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return float(items)/float(buckets) >= 0.85;
 | 
					    return float(items)/float(buckets) >= 0.85;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,7 +6,7 @@
 | 
				
			|||||||
// Created:     04/01/98
 | 
					// Created:     04/01/98
 | 
				
			||||||
// RCS-ID:      $Id$
 | 
					// RCS-ID:      $Id$
 | 
				
			||||||
// Copyright:   (c) Julian Smart
 | 
					// Copyright:   (c) Julian Smart
 | 
				
			||||||
// Licence:   	wxWindows licence
 | 
					// Licence:     wxWindows licence
 | 
				
			||||||
/////////////////////////////////////////////////////////////////////////////
 | 
					/////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef _WX_HELPBASEH__
 | 
					#ifndef _WX_HELPBASEH__
 | 
				
			||||||
@@ -45,8 +45,8 @@ public:
 | 
				
			|||||||
    // Must call this to set the filename and server name.
 | 
					    // Must call this to set the filename and server name.
 | 
				
			||||||
    // server is only required when implementing TCP/IP-based
 | 
					    // server is only required when implementing TCP/IP-based
 | 
				
			||||||
    // help controllers.
 | 
					    // help controllers.
 | 
				
			||||||
    virtual bool Initialize(const wxString& WXUNUSED(file), int WXUNUSED(server) ) { return FALSE; }
 | 
					    virtual bool Initialize(const wxString& WXUNUSED(file), int WXUNUSED(server) ) { return false; }
 | 
				
			||||||
    virtual bool Initialize(const wxString& WXUNUSED(file)) { return FALSE; }
 | 
					    virtual bool Initialize(const wxString& WXUNUSED(file)) { return false; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Set viewer: only relevant to some kinds of controller
 | 
					    // Set viewer: only relevant to some kinds of controller
 | 
				
			||||||
    virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {}
 | 
					    virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {}
 | 
				
			||||||
@@ -61,10 +61,10 @@ public:
 | 
				
			|||||||
    virtual bool DisplaySection(int sectionNo) = 0;
 | 
					    virtual bool DisplaySection(int sectionNo) = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Display the section using a context id
 | 
					    // Display the section using a context id
 | 
				
			||||||
    virtual bool DisplayContextPopup(int WXUNUSED(contextId)) { return FALSE; };
 | 
					    virtual bool DisplayContextPopup(int WXUNUSED(contextId)) { return false; };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Display the text in a popup, if possible
 | 
					    // Display the text in a popup, if possible
 | 
				
			||||||
    virtual bool DisplayTextPopup(const wxString& WXUNUSED(text), const wxPoint& WXUNUSED(pos)) { return FALSE; }
 | 
					    virtual bool DisplayTextPopup(const wxString& WXUNUSED(text), const wxPoint& WXUNUSED(pos)) { return false; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // By default, uses KeywordSection to display a topic. Implementations
 | 
					    // By default, uses KeywordSection to display a topic. Implementations
 | 
				
			||||||
    // may override this for more specific behaviour.
 | 
					    // may override this for more specific behaviour.
 | 
				
			||||||
@@ -76,7 +76,7 @@ public:
 | 
				
			|||||||
    virtual void SetFrameParameters(const wxString& WXUNUSED(title),
 | 
					    virtual void SetFrameParameters(const wxString& WXUNUSED(title),
 | 
				
			||||||
        const wxSize& WXUNUSED(size),
 | 
					        const wxSize& WXUNUSED(size),
 | 
				
			||||||
        const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
 | 
					        const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
 | 
				
			||||||
        bool WXUNUSED(newFrameEachTime) = FALSE)
 | 
					        bool WXUNUSED(newFrameEachTime) = false)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        // does nothing by default
 | 
					        // does nothing by default
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -91,7 +91,7 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    virtual bool Quit() = 0;
 | 
					    virtual bool Quit() = 0;
 | 
				
			||||||
    virtual void OnQuit() {}
 | 
					    virtual void OnQuit() {}
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
    DECLARE_CLASS(wxHelpControllerBase)
 | 
					    DECLARE_CLASS(wxHelpControllerBase)
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -58,7 +58,7 @@ bool wxGaugeBase::Create(wxWindow *parent,
 | 
				
			|||||||
                         const wxString& name)
 | 
					                         const wxString& name)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
 | 
					    if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
 | 
				
			||||||
        return FALSE;
 | 
					        return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    SetName(name);
 | 
					    SetName(name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -69,7 +69,7 @@ bool wxGaugeBase::Create(wxWindow *parent,
 | 
				
			|||||||
    SetRange(range);
 | 
					    SetRange(range);
 | 
				
			||||||
    SetValue(0);
 | 
					    SetValue(0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return TRUE;
 | 
					    return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -177,7 +177,7 @@ void wxGBSizerItem::GetEndPos(int& row, int& col)
 | 
				
			|||||||
wxGridBagSizer::wxGridBagSizer(int vgap, int hgap )
 | 
					wxGridBagSizer::wxGridBagSizer(int vgap, int hgap )
 | 
				
			||||||
    : wxFlexGridSizer(1, vgap, hgap),
 | 
					    : wxFlexGridSizer(1, vgap, hgap),
 | 
				
			||||||
      m_emptyCellSize(10,20)
 | 
					      m_emptyCellSize(10,20)
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -272,7 +272,7 @@ wxGBPosition wxGridBagSizer::GetItemPosition(size_t index)
 | 
				
			|||||||
    wxGBPosition badpos(-1,-1);
 | 
					    wxGBPosition badpos(-1,-1);
 | 
				
			||||||
    wxSizerItemList::compatibility_iterator node = m_children.Item( index );
 | 
					    wxSizerItemList::compatibility_iterator node = m_children.Item( index );
 | 
				
			||||||
    wxCHECK_MSG( node, badpos, _T("Failed to find item.") );
 | 
					    wxCHECK_MSG( node, badpos, _T("Failed to find item.") );
 | 
				
			||||||
    wxGBSizerItem* item = (wxGBSizerItem*)node->GetData();    
 | 
					    wxGBSizerItem* item = (wxGBSizerItem*)node->GetData();
 | 
				
			||||||
    return item->GetPos();
 | 
					    return item->GetPos();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -298,7 +298,7 @@ bool wxGridBagSizer::SetItemPosition(size_t index, const wxGBPosition& pos)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    wxSizerItemList::compatibility_iterator node = m_children.Item( index );
 | 
					    wxSizerItemList::compatibility_iterator node = m_children.Item( index );
 | 
				
			||||||
    wxCHECK_MSG( node, false, _T("Failed to find item.") );
 | 
					    wxCHECK_MSG( node, false, _T("Failed to find item.") );
 | 
				
			||||||
    wxGBSizerItem* item = (wxGBSizerItem*)node->GetData();    
 | 
					    wxGBSizerItem* item = (wxGBSizerItem*)node->GetData();
 | 
				
			||||||
    return item->SetPos(pos);
 | 
					    return item->SetPos(pos);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -327,7 +327,7 @@ wxGBSpan wxGridBagSizer::GetItemSpan(size_t index)
 | 
				
			|||||||
    wxGBSpan badspan(-1,-1);
 | 
					    wxGBSpan badspan(-1,-1);
 | 
				
			||||||
    wxSizerItemList::compatibility_iterator node = m_children.Item( index );
 | 
					    wxSizerItemList::compatibility_iterator node = m_children.Item( index );
 | 
				
			||||||
    wxCHECK_MSG( node, badspan, _T("Failed to find item.") );
 | 
					    wxCHECK_MSG( node, badspan, _T("Failed to find item.") );
 | 
				
			||||||
    wxGBSizerItem* item = (wxGBSizerItem*)node->GetData();    
 | 
					    wxGBSizerItem* item = (wxGBSizerItem*)node->GetData();
 | 
				
			||||||
    return item->GetSpan();
 | 
					    return item->GetSpan();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -353,7 +353,7 @@ bool wxGridBagSizer::SetItemSpan(size_t index, const wxGBSpan& span)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    wxSizerItemList::compatibility_iterator node = m_children.Item( index );
 | 
					    wxSizerItemList::compatibility_iterator node = m_children.Item( index );
 | 
				
			||||||
    wxCHECK_MSG( node, false, _T("Failed to find item.") );
 | 
					    wxCHECK_MSG( node, false, _T("Failed to find item.") );
 | 
				
			||||||
    wxGBSizerItem* item = (wxGBSizerItem*)node->GetData();    
 | 
					    wxGBSizerItem* item = (wxGBSizerItem*)node->GetData();
 | 
				
			||||||
    return item->SetSpan(span);
 | 
					    return item->SetSpan(span);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -447,7 +447,7 @@ wxGBSizerItem* wxGridBagSizer::FindItemWithData(const wxObject* userData)
 | 
				
			|||||||
wxSize wxGridBagSizer::CalcMin()
 | 
					wxSize wxGridBagSizer::CalcMin()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    int idx;
 | 
					    int idx;
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    if (m_children.GetCount() == 0)
 | 
					    if (m_children.GetCount() == 0)
 | 
				
			||||||
        return m_emptyCellSize;
 | 
					        return m_emptyCellSize;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -461,7 +461,7 @@ wxSize wxGridBagSizer::CalcMin()
 | 
				
			|||||||
        if ( item->IsShown() )
 | 
					        if ( item->IsShown() )
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            int row, col, endrow, endcol;
 | 
					            int row, col, endrow, endcol;
 | 
				
			||||||
        
 | 
					
 | 
				
			||||||
            item->GetPos(row, col);
 | 
					            item->GetPos(row, col);
 | 
				
			||||||
            item->GetEndPos(endrow, endcol);
 | 
					            item->GetEndPos(endrow, endcol);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -507,7 +507,7 @@ void wxGridBagSizer::RecalcSizes()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    wxPoint pt( GetPosition() );
 | 
					    wxPoint pt( GetPosition() );
 | 
				
			||||||
    wxSize  sz( GetSize() );
 | 
					    wxSize  sz( GetSize() );
 | 
				
			||||||
   
 | 
					
 | 
				
			||||||
    m_rows = m_rowHeights.GetCount();
 | 
					    m_rows = m_rowHeights.GetCount();
 | 
				
			||||||
    m_cols = m_colWidths.GetCount();
 | 
					    m_cols = m_colWidths.GetCount();
 | 
				
			||||||
    int idx, width, height;
 | 
					    int idx, width, height;
 | 
				
			||||||
@@ -549,16 +549,16 @@ void wxGridBagSizer::RecalcSizes()
 | 
				
			|||||||
        for(idx=row; idx <= endrow; idx++)
 | 
					        for(idx=row; idx <= endrow; idx++)
 | 
				
			||||||
            height += m_rowHeights[idx];
 | 
					            height += m_rowHeights[idx];
 | 
				
			||||||
        height += (endrow - row) * m_vgap; // add a vgap for every row spanned
 | 
					        height += (endrow - row) * m_vgap; // add a vgap for every row spanned
 | 
				
			||||||
        
 | 
					
 | 
				
			||||||
        width = 0;
 | 
					        width = 0;
 | 
				
			||||||
        for (idx=col; idx <= endcol; idx++)
 | 
					        for (idx=col; idx <= endcol; idx++)
 | 
				
			||||||
            width += m_colWidths[idx];
 | 
					            width += m_colWidths[idx];
 | 
				
			||||||
        width += (endcol - col) * m_hgap; // add a hgap for every col spanned
 | 
					        width += (endcol - col) * m_hgap; // add a hgap for every col spanned
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
        SetItemBounds(item, colpos[col], rowpos[row], width, height);
 | 
					        SetItemBounds(item, colpos[col], rowpos[row], width, height);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        node = node->GetNext();
 | 
					        node = node->GetNext();
 | 
				
			||||||
    }        
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -580,7 +580,7 @@ bool wxGridBagSizer::CheckForIntersection(const wxGBPosition& pos, const wxGBSpa
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if ( excludeItem && item == excludeItem )
 | 
					        if ( excludeItem && item == excludeItem )
 | 
				
			||||||
            continue;
 | 
					            continue;
 | 
				
			||||||
        
 | 
					
 | 
				
			||||||
        if ( item->Intersects(pos, span) )
 | 
					        if ( item->Intersects(pos, span) )
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -71,24 +71,24 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
template<> void wxStringReadValue(const wxString &s , wxPoint &data )
 | 
					template<> void wxStringReadValue(const wxString &s , wxPoint &data )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	wxSscanf(s, wxT("%d,%d"), &data.x , &data.y ) ;
 | 
					    wxSscanf(s, wxT("%d,%d"), &data.x , &data.y ) ;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
template<> void wxStringWriteValue(wxString &s , const wxPoint &data )
 | 
					template<> void wxStringWriteValue(wxString &s , const wxPoint &data )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	s = wxString::Format(wxT("%d,%d"), data.x , data.y ) ;
 | 
					    s = wxString::Format(wxT("%d,%d"), data.x , data.y ) ;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wxCUSTOM_TYPE_INFO(wxPoint, wxToStringConverter<wxPoint> , wxFromStringConverter<wxPoint>)
 | 
					wxCUSTOM_TYPE_INFO(wxPoint, wxToStringConverter<wxPoint> , wxFromStringConverter<wxPoint>)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
template<> void wxStringReadValue(const wxString &s , wxSize &data )
 | 
					template<> void wxStringReadValue(const wxString &s , wxSize &data )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	wxSscanf(s, wxT("%d,%d"), &data.x , &data.y ) ;
 | 
					    wxSscanf(s, wxT("%d,%d"), &data.x , &data.y ) ;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
template<> void wxStringWriteValue(wxString &s , const wxSize &data )
 | 
					template<> void wxStringWriteValue(wxString &s , const wxSize &data )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	s = wxString::Format(wxT("%d,%d"), data.x , data.y ) ;
 | 
					    s = wxString::Format(wxT("%d,%d"), data.x , data.y ) ;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wxCUSTOM_TYPE_INFO(wxSize, wxToStringConverter<wxSize> , wxFromStringConverter<wxSize>)
 | 
					wxCUSTOM_TYPE_INFO(wxSize, wxToStringConverter<wxSize> , wxFromStringConverter<wxSize>)
 | 
				
			||||||
@@ -99,24 +99,24 @@ IMPLEMENT_ABSTRACT_CLASS(wxDCBase, wxObject)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
wxRect::wxRect(const wxPoint& point1, const wxPoint& point2)
 | 
					wxRect::wxRect(const wxPoint& point1, const wxPoint& point2)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  x = point1.x;
 | 
					    x = point1.x;
 | 
				
			||||||
  y = point1.y;
 | 
					    y = point1.y;
 | 
				
			||||||
  width = point2.x - point1.x;
 | 
					    width = point2.x - point1.x;
 | 
				
			||||||
  height = point2.y - point1.y;
 | 
					    height = point2.y - point1.y;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (width < 0)
 | 
					    if (width < 0)
 | 
				
			||||||
  {
 | 
					    {
 | 
				
			||||||
    width = -width;
 | 
					        width = -width;
 | 
				
			||||||
    x = point2.x;
 | 
					        x = point2.x;
 | 
				
			||||||
  }
 | 
					    }
 | 
				
			||||||
  width++;
 | 
					    width++;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (height < 0)
 | 
					    if (height < 0)
 | 
				
			||||||
  {
 | 
					    {
 | 
				
			||||||
    height = -height;
 | 
					        height = -height;
 | 
				
			||||||
    y = point2.y;
 | 
					        y = point2.y;
 | 
				
			||||||
  }
 | 
					    }
 | 
				
			||||||
  height++;
 | 
					    height++;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wxRect::wxRect(const wxPoint& point, const wxSize& size)
 | 
					wxRect::wxRect(const wxPoint& point, const wxSize& size)
 | 
				
			||||||
@@ -127,10 +127,10 @@ wxRect::wxRect(const wxPoint& point, const wxSize& size)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
bool wxRect::operator==(const wxRect& rect) const
 | 
					bool wxRect::operator==(const wxRect& rect) const
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  return ((x == rect.x) &&
 | 
					    return ((x == rect.x) &&
 | 
				
			||||||
          (y == rect.y) &&
 | 
					            (y == rect.y) &&
 | 
				
			||||||
          (width == rect.width) &&
 | 
					            (width == rect.width) &&
 | 
				
			||||||
          (height == rect.height));
 | 
					            (height == rect.height));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wxRect& wxRect::operator += (const wxRect& rect)
 | 
					wxRect& wxRect::operator += (const wxRect& rect)
 | 
				
			||||||
@@ -536,8 +536,8 @@ void wxInitializeStockObjects ()
 | 
				
			|||||||
    SInt16 fontSize ;
 | 
					    SInt16 fontSize ;
 | 
				
			||||||
    Style fontStyle ;
 | 
					    Style fontStyle ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	GetThemeFont(kThemeSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
 | 
					    GetThemeFont(kThemeSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
 | 
				
			||||||
	sizeFont = fontSize ;
 | 
					    sizeFont = fontSize ;
 | 
				
			||||||
#if __WXMAC_CLASSIC__
 | 
					#if __WXMAC_CLASSIC__
 | 
				
			||||||
    wxNORMAL_FONT = new wxFont (fontSize, wxMODERN, wxNORMAL, wxNORMAL , false , wxMacMakeStringFromPascal(fontName) );
 | 
					    wxNORMAL_FONT = new wxFont (fontSize, wxMODERN, wxNORMAL, wxNORMAL , false , wxMacMakeStringFromPascal(fontName) );
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
@@ -545,120 +545,120 @@ void wxInitializeStockObjects ()
 | 
				
			|||||||
    wxNORMAL_FONT->MacCreateThemeFont( kThemeSystemFont );
 | 
					    wxNORMAL_FONT->MacCreateThemeFont( kThemeSystemFont );
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#elif defined(__WXPM__)
 | 
					#elif defined(__WXPM__)
 | 
				
			||||||
  static const int sizeFont = 12;
 | 
					    static const int sizeFont = 12;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
  wxNORMAL_FONT = new wxFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
 | 
					    wxNORMAL_FONT = new wxFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
 | 
				
			||||||
  static const int sizeFont = wxNORMAL_FONT->GetPointSize();
 | 
					    static const int sizeFont = wxNORMAL_FONT->GetPointSize();
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(__WXPM__)
 | 
					#if defined(__WXPM__)
 | 
				
			||||||
  /*
 | 
					    /*
 | 
				
			||||||
  // Basic OS/2 has a fairly limited number of fonts and these are as good
 | 
					    // Basic OS/2 has a fairly limited number of fonts and these are as good
 | 
				
			||||||
  // as I can do to get something that looks halfway "wx" normal
 | 
					    // as I can do to get something that looks halfway "wx" normal
 | 
				
			||||||
  */
 | 
					    */
 | 
				
			||||||
  wxNORMAL_FONT = new wxFont (sizeFont, wxMODERN, wxNORMAL, wxBOLD);
 | 
					    wxNORMAL_FONT = new wxFont (sizeFont, wxMODERN, wxNORMAL, wxBOLD);
 | 
				
			||||||
  wxSMALL_FONT = new wxFont (sizeFont - 4, wxSWISS, wxNORMAL, wxNORMAL); /* Helv */
 | 
					    wxSMALL_FONT = new wxFont (sizeFont - 4, wxSWISS, wxNORMAL, wxNORMAL); /* Helv */
 | 
				
			||||||
  wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL);
 | 
					    wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL);
 | 
				
			||||||
  wxSWISS_FONT = new wxFont (sizeFont, wxSWISS, wxNORMAL, wxNORMAL); /* Helv */
 | 
					    wxSWISS_FONT = new wxFont (sizeFont, wxSWISS, wxNORMAL, wxNORMAL); /* Helv */
 | 
				
			||||||
#elif defined(__WXMAC__)
 | 
					#elif defined(__WXMAC__)
 | 
				
			||||||
    wxSWISS_FONT = new wxFont (sizeFont, wxSWISS, wxNORMAL, wxNORMAL); /* Helv */
 | 
					    wxSWISS_FONT = new wxFont (sizeFont, wxSWISS, wxNORMAL, wxNORMAL); /* Helv */
 | 
				
			||||||
    wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL);
 | 
					    wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL);
 | 
				
			||||||
#if __WXMAC_CLASSIC__
 | 
					#if __WXMAC_CLASSIC__
 | 
				
			||||||
	GetThemeFont(kThemeSmallSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
 | 
					  GetThemeFont(kThemeSmallSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
 | 
				
			||||||
    wxSMALL_FONT = new wxFont (fontSize, wxSWISS, wxNORMAL, wxNORMAL , false , wxMacMakeStringFromPascal( fontName ) );
 | 
					    wxSMALL_FONT = new wxFont (fontSize, wxSWISS, wxNORMAL, wxNORMAL , false , wxMacMakeStringFromPascal( fontName ) );
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
    wxSMALL_FONT = new wxFont () ;
 | 
					    wxSMALL_FONT = new wxFont () ;
 | 
				
			||||||
    wxSMALL_FONT->MacCreateThemeFont( kThemeSmallSystemFont );
 | 
					    wxSMALL_FONT->MacCreateThemeFont( kThemeSmallSystemFont );
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
  wxSMALL_FONT = new wxFont (sizeFont - 2, wxSWISS, wxNORMAL, wxNORMAL);
 | 
					    wxSMALL_FONT = new wxFont (sizeFont - 2, wxSWISS, wxNORMAL, wxNORMAL);
 | 
				
			||||||
  wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL);
 | 
					    wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL);
 | 
				
			||||||
  wxSWISS_FONT = new wxFont (sizeFont, wxSWISS, wxNORMAL, wxNORMAL);
 | 
					    wxSWISS_FONT = new wxFont (sizeFont, wxSWISS, wxNORMAL, wxNORMAL);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wxRED_PEN = new wxPen (wxT("RED"), 1, wxSOLID);
 | 
					    wxRED_PEN = new wxPen (wxT("RED"), 1, wxSOLID);
 | 
				
			||||||
  wxCYAN_PEN = new wxPen (wxT("CYAN"), 1, wxSOLID);
 | 
					    wxCYAN_PEN = new wxPen (wxT("CYAN"), 1, wxSOLID);
 | 
				
			||||||
  wxGREEN_PEN = new wxPen (wxT("GREEN"), 1, wxSOLID);
 | 
					    wxGREEN_PEN = new wxPen (wxT("GREEN"), 1, wxSOLID);
 | 
				
			||||||
  wxBLACK_PEN = new wxPen (wxT("BLACK"), 1, wxSOLID);
 | 
					    wxBLACK_PEN = new wxPen (wxT("BLACK"), 1, wxSOLID);
 | 
				
			||||||
  wxWHITE_PEN = new wxPen (wxT("WHITE"), 1, wxSOLID);
 | 
					    wxWHITE_PEN = new wxPen (wxT("WHITE"), 1, wxSOLID);
 | 
				
			||||||
  wxTRANSPARENT_PEN = new wxPen (wxT("BLACK"), 1, wxTRANSPARENT);
 | 
					    wxTRANSPARENT_PEN = new wxPen (wxT("BLACK"), 1, wxTRANSPARENT);
 | 
				
			||||||
  wxBLACK_DASHED_PEN = new wxPen (wxT("BLACK"), 1, wxSHORT_DASH);
 | 
					    wxBLACK_DASHED_PEN = new wxPen (wxT("BLACK"), 1, wxSHORT_DASH);
 | 
				
			||||||
  wxGREY_PEN = new wxPen (wxT("GREY"), 1, wxSOLID);
 | 
					    wxGREY_PEN = new wxPen (wxT("GREY"), 1, wxSOLID);
 | 
				
			||||||
  wxMEDIUM_GREY_PEN = new wxPen (wxT("MEDIUM GREY"), 1, wxSOLID);
 | 
					    wxMEDIUM_GREY_PEN = new wxPen (wxT("MEDIUM GREY"), 1, wxSOLID);
 | 
				
			||||||
  wxLIGHT_GREY_PEN = new wxPen (wxT("LIGHT GREY"), 1, wxSOLID);
 | 
					    wxLIGHT_GREY_PEN = new wxPen (wxT("LIGHT GREY"), 1, wxSOLID);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wxBLUE_BRUSH = new wxBrush (wxT("BLUE"), wxSOLID);
 | 
					    wxBLUE_BRUSH = new wxBrush (wxT("BLUE"), wxSOLID);
 | 
				
			||||||
  wxGREEN_BRUSH = new wxBrush (wxT("GREEN"), wxSOLID);
 | 
					    wxGREEN_BRUSH = new wxBrush (wxT("GREEN"), wxSOLID);
 | 
				
			||||||
  wxWHITE_BRUSH = new wxBrush (wxT("WHITE"), wxSOLID);
 | 
					    wxWHITE_BRUSH = new wxBrush (wxT("WHITE"), wxSOLID);
 | 
				
			||||||
  wxBLACK_BRUSH = new wxBrush (wxT("BLACK"), wxSOLID);
 | 
					    wxBLACK_BRUSH = new wxBrush (wxT("BLACK"), wxSOLID);
 | 
				
			||||||
  wxTRANSPARENT_BRUSH = new wxBrush (wxT("BLACK"), wxTRANSPARENT);
 | 
					    wxTRANSPARENT_BRUSH = new wxBrush (wxT("BLACK"), wxTRANSPARENT);
 | 
				
			||||||
  wxCYAN_BRUSH = new wxBrush (wxT("CYAN"), wxSOLID);
 | 
					    wxCYAN_BRUSH = new wxBrush (wxT("CYAN"), wxSOLID);
 | 
				
			||||||
  wxRED_BRUSH = new wxBrush (wxT("RED"), wxSOLID);
 | 
					    wxRED_BRUSH = new wxBrush (wxT("RED"), wxSOLID);
 | 
				
			||||||
  wxGREY_BRUSH = new wxBrush (wxT("GREY"), wxSOLID);
 | 
					    wxGREY_BRUSH = new wxBrush (wxT("GREY"), wxSOLID);
 | 
				
			||||||
  wxMEDIUM_GREY_BRUSH = new wxBrush (wxT("MEDIUM GREY"), wxSOLID);
 | 
					    wxMEDIUM_GREY_BRUSH = new wxBrush (wxT("MEDIUM GREY"), wxSOLID);
 | 
				
			||||||
  wxLIGHT_GREY_BRUSH = new wxBrush (wxT("LIGHT GREY"), wxSOLID);
 | 
					    wxLIGHT_GREY_BRUSH = new wxBrush (wxT("LIGHT GREY"), wxSOLID);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wxBLACK = new wxColour (wxT("BLACK"));
 | 
					    wxBLACK = new wxColour (wxT("BLACK"));
 | 
				
			||||||
  wxWHITE = new wxColour (wxT("WHITE"));
 | 
					    wxWHITE = new wxColour (wxT("WHITE"));
 | 
				
			||||||
  wxRED = new wxColour (wxT("RED"));
 | 
					    wxRED = new wxColour (wxT("RED"));
 | 
				
			||||||
  wxBLUE = new wxColour (wxT("BLUE"));
 | 
					    wxBLUE = new wxColour (wxT("BLUE"));
 | 
				
			||||||
  wxGREEN = new wxColour (wxT("GREEN"));
 | 
					    wxGREEN = new wxColour (wxT("GREEN"));
 | 
				
			||||||
  wxCYAN = new wxColour (wxT("CYAN"));
 | 
					    wxCYAN = new wxColour (wxT("CYAN"));
 | 
				
			||||||
  wxLIGHT_GREY = new wxColour (wxT("LIGHT GREY"));
 | 
					    wxLIGHT_GREY = new wxColour (wxT("LIGHT GREY"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wxSTANDARD_CURSOR = new wxCursor (wxCURSOR_ARROW);
 | 
					    wxSTANDARD_CURSOR = new wxCursor (wxCURSOR_ARROW);
 | 
				
			||||||
  wxHOURGLASS_CURSOR = new wxCursor (wxCURSOR_WAIT);
 | 
					    wxHOURGLASS_CURSOR = new wxCursor (wxCURSOR_WAIT);
 | 
				
			||||||
  wxCROSS_CURSOR = new wxCursor (wxCURSOR_CROSS);
 | 
					    wxCROSS_CURSOR = new wxCursor (wxCURSOR_CROSS);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wxDeleteStockObjects ()
 | 
					void wxDeleteStockObjects ()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  wxDELETE(wxNORMAL_FONT);
 | 
					    wxDELETE(wxNORMAL_FONT);
 | 
				
			||||||
  wxDELETE(wxSMALL_FONT);
 | 
					    wxDELETE(wxSMALL_FONT);
 | 
				
			||||||
  wxDELETE(wxITALIC_FONT);
 | 
					    wxDELETE(wxITALIC_FONT);
 | 
				
			||||||
  wxDELETE(wxSWISS_FONT);
 | 
					    wxDELETE(wxSWISS_FONT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wxDELETE(wxRED_PEN);
 | 
					    wxDELETE(wxRED_PEN);
 | 
				
			||||||
  wxDELETE(wxCYAN_PEN);
 | 
					    wxDELETE(wxCYAN_PEN);
 | 
				
			||||||
  wxDELETE(wxGREEN_PEN);
 | 
					    wxDELETE(wxGREEN_PEN);
 | 
				
			||||||
  wxDELETE(wxBLACK_PEN);
 | 
					    wxDELETE(wxBLACK_PEN);
 | 
				
			||||||
  wxDELETE(wxWHITE_PEN);
 | 
					    wxDELETE(wxWHITE_PEN);
 | 
				
			||||||
  wxDELETE(wxTRANSPARENT_PEN);
 | 
					    wxDELETE(wxTRANSPARENT_PEN);
 | 
				
			||||||
  wxDELETE(wxBLACK_DASHED_PEN);
 | 
					    wxDELETE(wxBLACK_DASHED_PEN);
 | 
				
			||||||
  wxDELETE(wxGREY_PEN);
 | 
					    wxDELETE(wxGREY_PEN);
 | 
				
			||||||
  wxDELETE(wxMEDIUM_GREY_PEN);
 | 
					    wxDELETE(wxMEDIUM_GREY_PEN);
 | 
				
			||||||
  wxDELETE(wxLIGHT_GREY_PEN);
 | 
					    wxDELETE(wxLIGHT_GREY_PEN);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wxDELETE(wxBLUE_BRUSH);
 | 
					    wxDELETE(wxBLUE_BRUSH);
 | 
				
			||||||
  wxDELETE(wxGREEN_BRUSH);
 | 
					    wxDELETE(wxGREEN_BRUSH);
 | 
				
			||||||
  wxDELETE(wxWHITE_BRUSH);
 | 
					    wxDELETE(wxWHITE_BRUSH);
 | 
				
			||||||
  wxDELETE(wxBLACK_BRUSH);
 | 
					    wxDELETE(wxBLACK_BRUSH);
 | 
				
			||||||
  wxDELETE(wxTRANSPARENT_BRUSH);
 | 
					    wxDELETE(wxTRANSPARENT_BRUSH);
 | 
				
			||||||
  wxDELETE(wxCYAN_BRUSH);
 | 
					    wxDELETE(wxCYAN_BRUSH);
 | 
				
			||||||
  wxDELETE(wxRED_BRUSH);
 | 
					    wxDELETE(wxRED_BRUSH);
 | 
				
			||||||
  wxDELETE(wxGREY_BRUSH);
 | 
					    wxDELETE(wxGREY_BRUSH);
 | 
				
			||||||
  wxDELETE(wxMEDIUM_GREY_BRUSH);
 | 
					    wxDELETE(wxMEDIUM_GREY_BRUSH);
 | 
				
			||||||
  wxDELETE(wxLIGHT_GREY_BRUSH);
 | 
					    wxDELETE(wxLIGHT_GREY_BRUSH);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wxDELETE(wxBLACK);
 | 
					    wxDELETE(wxBLACK);
 | 
				
			||||||
  wxDELETE(wxWHITE);
 | 
					    wxDELETE(wxWHITE);
 | 
				
			||||||
  wxDELETE(wxRED);
 | 
					    wxDELETE(wxRED);
 | 
				
			||||||
  wxDELETE(wxBLUE);
 | 
					    wxDELETE(wxBLUE);
 | 
				
			||||||
  wxDELETE(wxGREEN);
 | 
					    wxDELETE(wxGREEN);
 | 
				
			||||||
  wxDELETE(wxCYAN);
 | 
					    wxDELETE(wxCYAN);
 | 
				
			||||||
  wxDELETE(wxLIGHT_GREY);
 | 
					    wxDELETE(wxLIGHT_GREY);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wxDELETE(wxSTANDARD_CURSOR);
 | 
					    wxDELETE(wxSTANDARD_CURSOR);
 | 
				
			||||||
  wxDELETE(wxHOURGLASS_CURSOR);
 | 
					    wxDELETE(wxHOURGLASS_CURSOR);
 | 
				
			||||||
  wxDELETE(wxCROSS_CURSOR);
 | 
					    wxDELETE(wxCROSS_CURSOR);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wxDeleteStockLists()
 | 
					void wxDeleteStockLists()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  wxDELETE(wxTheBrushList);
 | 
					    wxDELETE(wxTheBrushList);
 | 
				
			||||||
  wxDELETE(wxThePenList);
 | 
					    wxDELETE(wxThePenList);
 | 
				
			||||||
  wxDELETE(wxTheFontList);
 | 
					    wxDELETE(wxTheFontList);
 | 
				
			||||||
  wxDELETE(wxTheBitmapList);
 | 
					    wxDELETE(wxTheBitmapList);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ============================================================================
 | 
					// ============================================================================
 | 
				
			||||||
@@ -671,39 +671,39 @@ wxBitmapList::wxBitmapList()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
wxBitmapList::~wxBitmapList ()
 | 
					wxBitmapList::~wxBitmapList ()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  wxList::compatibility_iterator node = GetFirst ();
 | 
					    wxList::compatibility_iterator node = GetFirst ();
 | 
				
			||||||
  while (node)
 | 
					    while (node)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      wxBitmap *bitmap = (wxBitmap *) node->GetData ();
 | 
					        wxBitmap *bitmap = (wxBitmap *) node->GetData ();
 | 
				
			||||||
      wxList::compatibility_iterator next = node->GetNext ();
 | 
					        wxList::compatibility_iterator next = node->GetNext ();
 | 
				
			||||||
      if (bitmap->GetVisible())
 | 
					        if (bitmap->GetVisible())
 | 
				
			||||||
        delete bitmap;
 | 
					            delete bitmap;
 | 
				
			||||||
      node = next;
 | 
					        node = next;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Pen and Brush lists
 | 
					// Pen and Brush lists
 | 
				
			||||||
wxPenList::~wxPenList ()
 | 
					wxPenList::~wxPenList ()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  wxList::compatibility_iterator node = GetFirst ();
 | 
					    wxList::compatibility_iterator node = GetFirst ();
 | 
				
			||||||
  while (node)
 | 
					    while (node)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      wxPen *pen = (wxPen *) node->GetData ();
 | 
					        wxPen *pen = (wxPen *) node->GetData ();
 | 
				
			||||||
      wxList::compatibility_iterator next = node->GetNext ();
 | 
					        wxList::compatibility_iterator next = node->GetNext ();
 | 
				
			||||||
      if (pen->GetVisible())
 | 
					        if (pen->GetVisible())
 | 
				
			||||||
        delete pen;
 | 
					            delete pen;
 | 
				
			||||||
      node = next;
 | 
					        node = next;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wxPenList::AddPen (wxPen * pen)
 | 
					void wxPenList::AddPen (wxPen * pen)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  Append (pen);
 | 
					    Append (pen);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wxPenList::RemovePen (wxPen * pen)
 | 
					void wxPenList::RemovePen (wxPen * pen)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  DeleteObject (pen);
 | 
					    DeleteObject (pen);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wxPen *wxPenList::FindOrCreatePen (const wxColour& colour, int width, int style)
 | 
					wxPen *wxPenList::FindOrCreatePen (const wxColour& colour, int width, int style)
 | 
				
			||||||
@@ -733,27 +733,27 @@ wxPen *wxPenList::FindOrCreatePen (const wxColour& colour, int width, int style)
 | 
				
			|||||||
    AddPen(pen);
 | 
					    AddPen(pen);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // we'll delete it ourselves later
 | 
					    // we'll delete it ourselves later
 | 
				
			||||||
    pen->SetVisible(TRUE);
 | 
					    pen->SetVisible(true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return pen;
 | 
					    return pen;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wxBrushList::~wxBrushList ()
 | 
					wxBrushList::~wxBrushList ()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  wxList::compatibility_iterator node = GetFirst ();
 | 
					    wxList::compatibility_iterator node = GetFirst ();
 | 
				
			||||||
  while (node)
 | 
					    while (node)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      wxBrush *brush = (wxBrush *) node->GetData ();
 | 
					        wxBrush *brush = (wxBrush *) node->GetData ();
 | 
				
			||||||
      wxList::compatibility_iterator next = node->GetNext ();
 | 
					        wxList::compatibility_iterator next = node->GetNext ();
 | 
				
			||||||
      if (brush && brush->GetVisible())
 | 
					        if (brush && brush->GetVisible())
 | 
				
			||||||
        delete brush;
 | 
					            delete brush;
 | 
				
			||||||
      node = next;
 | 
					        node = next;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wxBrushList::AddBrush (wxBrush * brush)
 | 
					void wxBrushList::AddBrush (wxBrush * brush)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  Append (brush);
 | 
					    Append (brush);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wxBrush *wxBrushList::FindOrCreateBrush (const wxColour& colour, int style)
 | 
					wxBrush *wxBrushList::FindOrCreateBrush (const wxColour& colour, int style)
 | 
				
			||||||
@@ -783,14 +783,14 @@ wxBrush *wxBrushList::FindOrCreateBrush (const wxColour& colour, int style)
 | 
				
			|||||||
    AddBrush(brush);
 | 
					    AddBrush(brush);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // we'll delete it ourselves later
 | 
					    // we'll delete it ourselves later
 | 
				
			||||||
    brush->SetVisible(TRUE);
 | 
					    brush->SetVisible(true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return brush;
 | 
					    return brush;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wxBrushList::RemoveBrush (wxBrush * brush)
 | 
					void wxBrushList::RemoveBrush (wxBrush * brush)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  DeleteObject (brush);
 | 
					    DeleteObject (brush);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wxFontList::~wxFontList ()
 | 
					wxFontList::~wxFontList ()
 | 
				
			||||||
@@ -812,12 +812,12 @@ wxFontList::~wxFontList ()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void wxFontList::AddFont (wxFont * font)
 | 
					void wxFontList::AddFont (wxFont * font)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  Append (font);
 | 
					    Append (font);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wxFontList::RemoveFont (wxFont * font)
 | 
					void wxFontList::RemoveFont (wxFont * font)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  DeleteObject (font);
 | 
					    DeleteObject (font);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wxFont *wxFontList::FindOrCreateFont(int pointSize,
 | 
					wxFont *wxFontList::FindOrCreateFont(int pointSize,
 | 
				
			||||||
@@ -858,7 +858,7 @@ wxFont *wxFontList::FindOrCreateFont(int pointSize,
 | 
				
			|||||||
            // a different font if we create it with empty facename, but it is
 | 
					            // a different font if we create it with empty facename, but it is
 | 
				
			||||||
            // still better than never matching anything in the cache at all
 | 
					            // still better than never matching anything in the cache at all
 | 
				
			||||||
            // in this case
 | 
					            // in this case
 | 
				
			||||||
            if ( same && !!facename )
 | 
					            if ( same && !facename.IsEmpty() )
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                const wxString& fontFace = font->GetFaceName();
 | 
					                const wxString& fontFace = font->GetFaceName();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -888,7 +888,7 @@ wxFont *wxFontList::FindOrCreateFont(int pointSize,
 | 
				
			|||||||
        AddFont(font);
 | 
					        AddFont(font);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // and mark it as being cacheable
 | 
					        // and mark it as being cacheable
 | 
				
			||||||
        font->SetVisible(TRUE);
 | 
					        font->SetVisible(true);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return font;
 | 
					    return font;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,9 +57,9 @@ bool wxRect2DDouble::Intersects( const wxRect2DDouble &rect ) const
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if ( left < right && top < bottom )
 | 
					    if ( left < right && top < bottom )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        return TRUE;
 | 
					        return true;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return FALSE;
 | 
					    return false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wxRect2DDouble::Intersect( const wxRect2DDouble &src1 , const wxRect2DDouble &src2 , wxRect2DDouble *dest )
 | 
					void wxRect2DDouble::Intersect( const wxRect2DDouble &src1 , const wxRect2DDouble &src2 , wxRect2DDouble *dest )
 | 
				
			||||||
@@ -252,9 +252,9 @@ bool wxRect2DInt::Intersects( const wxRect2DInt &rect ) const
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if ( left < right && top < bottom )
 | 
					    if ( left < right && top < bottom )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        return TRUE;
 | 
					        return true;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return FALSE;
 | 
					    return false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wxRect2DInt::Intersect( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest )
 | 
					void wxRect2DInt::Intersect( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest )
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -116,7 +116,7 @@ bool wxGIFDecoder::ConvertToImage(wxImage *image) const
 | 
				
			|||||||
    image->Create(GetWidth(), GetHeight());
 | 
					    image->Create(GetWidth(), GetHeight());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!image->Ok())
 | 
					    if (!image->Ok())
 | 
				
			||||||
        return FALSE;
 | 
					        return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pal = GetPalette();
 | 
					    pal = GetPalette();
 | 
				
			||||||
    src = GetData();
 | 
					    src = GetData();
 | 
				
			||||||
@@ -143,7 +143,7 @@ bool wxGIFDecoder::ConvertToImage(wxImage *image) const
 | 
				
			|||||||
        image->SetMaskColour(255, 0, 255);
 | 
					        image->SetMaskColour(255, 0, 255);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        image->SetMask(FALSE);
 | 
					        image->SetMask(false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if wxUSE_PALETTE
 | 
					#if wxUSE_PALETTE
 | 
				
			||||||
    if (pal)
 | 
					    if (pal)
 | 
				
			||||||
@@ -171,7 +171,7 @@ bool wxGIFDecoder::ConvertToImage(wxImage *image) const
 | 
				
			|||||||
        *(dst++) = pal[3 * (*src) + 2];
 | 
					        *(dst++) = pal[3 * (*src) + 2];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return TRUE;
 | 
					    return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -208,27 +208,27 @@ bool wxGIFDecoder::IsAnimation() const          { return (m_nimages > 1); }
 | 
				
			|||||||
bool wxGIFDecoder::GoFirstFrame()
 | 
					bool wxGIFDecoder::GoFirstFrame()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (!IsAnimation())
 | 
					    if (!IsAnimation())
 | 
				
			||||||
        return FALSE;
 | 
					        return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    m_image = 1;
 | 
					    m_image = 1;
 | 
				
			||||||
    m_pimage = m_pfirst;
 | 
					    m_pimage = m_pfirst;
 | 
				
			||||||
    return TRUE;
 | 
					    return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxGIFDecoder::GoLastFrame()
 | 
					bool wxGIFDecoder::GoLastFrame()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (!IsAnimation())
 | 
					    if (!IsAnimation())
 | 
				
			||||||
        return FALSE;
 | 
					        return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    m_image = m_nimages;
 | 
					    m_image = m_nimages;
 | 
				
			||||||
    m_pimage = m_plast;
 | 
					    m_pimage = m_plast;
 | 
				
			||||||
    return TRUE;
 | 
					    return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxGIFDecoder::GoNextFrame(bool cyclic)
 | 
					bool wxGIFDecoder::GoNextFrame(bool cyclic)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (!IsAnimation())
 | 
					    if (!IsAnimation())
 | 
				
			||||||
        return FALSE;
 | 
					        return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ((m_image < m_nimages) || (cyclic))
 | 
					    if ((m_image < m_nimages) || (cyclic))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@@ -241,16 +241,16 @@ bool wxGIFDecoder::GoNextFrame(bool cyclic)
 | 
				
			|||||||
            m_pimage = m_pfirst;
 | 
					            m_pimage = m_pfirst;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return TRUE;
 | 
					        return true;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        return FALSE;
 | 
					        return false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxGIFDecoder::GoPrevFrame(bool cyclic)
 | 
					bool wxGIFDecoder::GoPrevFrame(bool cyclic)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (!IsAnimation())
 | 
					    if (!IsAnimation())
 | 
				
			||||||
        return FALSE;
 | 
					        return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ((m_image > 1) || (cyclic))
 | 
					    if ((m_image > 1) || (cyclic))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@@ -263,10 +263,10 @@ bool wxGIFDecoder::GoPrevFrame(bool cyclic)
 | 
				
			|||||||
            m_pimage = m_plast;
 | 
					            m_pimage = m_plast;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return TRUE;
 | 
					        return true;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        return FALSE;
 | 
					        return false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxGIFDecoder::GoFrame(int which)
 | 
					bool wxGIFDecoder::GoFrame(int which)
 | 
				
			||||||
@@ -274,7 +274,7 @@ bool wxGIFDecoder::GoFrame(int which)
 | 
				
			|||||||
    int i;
 | 
					    int i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!IsAnimation())
 | 
					    if (!IsAnimation())
 | 
				
			||||||
        return FALSE;
 | 
					        return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ((which >= 1) && (which <= m_nimages))
 | 
					    if ((which >= 1) && (which <= m_nimages))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@@ -283,10 +283,10 @@ bool wxGIFDecoder::GoFrame(int which)
 | 
				
			|||||||
        for (i = 0; i < which; i++)
 | 
					        for (i = 0; i < which; i++)
 | 
				
			||||||
            m_pimage = m_pimage->next;
 | 
					            m_pimage = m_pimage->next;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return TRUE;
 | 
					        return true;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        return FALSE;
 | 
					        return false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -612,14 +612,14 @@ as an End of Information itself)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// CanRead:
 | 
					// CanRead:
 | 
				
			||||||
//  Returns TRUE if the file looks like a valid GIF, FALSE otherwise.
 | 
					//  Returns true if the file looks like a valid GIF, false otherwise.
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
bool wxGIFDecoder::CanRead()
 | 
					bool wxGIFDecoder::CanRead()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    unsigned char buf[3];
 | 
					    unsigned char buf[3];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ( !m_f->Read(buf, WXSIZEOF(buf)) )
 | 
					    if ( !m_f->Read(buf, WXSIZEOF(buf)) )
 | 
				
			||||||
        return FALSE;
 | 
					        return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    m_f->SeekI(-(off_t)WXSIZEOF(buf), wxFromCurrent);
 | 
					    m_f->SeekI(-(off_t)WXSIZEOF(buf), wxFromCurrent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -663,7 +663,7 @@ int wxGIFDecoder::ReadGIF()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (memcmp(buf + 3, "89a", 3) < 0)
 | 
					    if (memcmp(buf + 3, "89a", 3) < 0)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        m_anim = FALSE;
 | 
					        m_anim = false;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* read logical screen descriptor block (LSDB) */
 | 
					    /* read logical screen descriptor block (LSDB) */
 | 
				
			||||||
@@ -701,7 +701,7 @@ int wxGIFDecoder::ReadGIF()
 | 
				
			|||||||
    pprev = NULL;
 | 
					    pprev = NULL;
 | 
				
			||||||
    pimg  = NULL;
 | 
					    pimg  = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    bool done = FALSE;
 | 
					    bool done = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    while(!done)
 | 
					    while(!done)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@@ -727,7 +727,7 @@ int wxGIFDecoder::ReadGIF()
 | 
				
			|||||||
        /* end of data? */
 | 
					        /* end of data? */
 | 
				
			||||||
        if (type == 0x3B)
 | 
					        if (type == 0x3B)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            done = TRUE;
 | 
					            done = true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
        /* extension block? */
 | 
					        /* extension block? */
 | 
				
			||||||
@@ -762,7 +762,7 @@ int wxGIFDecoder::ReadGIF()
 | 
				
			|||||||
                    m_f->SeekI(i, wxFromCurrent);
 | 
					                    m_f->SeekI(i, wxFromCurrent);
 | 
				
			||||||
                    if (m_f->Eof())
 | 
					                    if (m_f->Eof())
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        done = TRUE;
 | 
					                        done = true;
 | 
				
			||||||
                        break;
 | 
					                        break;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
@@ -857,7 +857,7 @@ int wxGIFDecoder::ReadGIF()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            /* if this is not an animated GIF, exit after first image */
 | 
					            /* if this is not an animated GIF, exit after first image */
 | 
				
			||||||
            if (!m_anim)
 | 
					            if (!m_anim)
 | 
				
			||||||
                done = TRUE;
 | 
					                done = true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,7 +6,7 @@
 | 
				
			|||||||
// Created:     04/01/98
 | 
					// Created:     04/01/98
 | 
				
			||||||
// RCS-ID:      $Id$
 | 
					// RCS-ID:      $Id$
 | 
				
			||||||
// Copyright:   (c) Julian Smart
 | 
					// Copyright:   (c) Julian Smart
 | 
				
			||||||
// Licence:   	wxWindows licence
 | 
					// Licence:     wxWindows licence
 | 
				
			||||||
/////////////////////////////////////////////////////////////////////////////
 | 
					/////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 | 
					#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -33,7 +33,7 @@
 | 
				
			|||||||
#include "wx/sckstrm.h"
 | 
					#include "wx/sckstrm.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
IMPLEMENT_DYNAMIC_CLASS(wxHTTP, wxProtocol)
 | 
					IMPLEMENT_DYNAMIC_CLASS(wxHTTP, wxProtocol)
 | 
				
			||||||
IMPLEMENT_PROTOCOL(wxHTTP, wxT("http"), wxT("80"), TRUE)
 | 
					IMPLEMENT_PROTOCOL(wxHTTP, wxT("http"), wxT("80"), true)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define HTTP_BSIZE 2048
 | 
					#define HTTP_BSIZE 2048
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -41,8 +41,8 @@ wxHTTP::wxHTTP()
 | 
				
			|||||||
  : wxProtocol()
 | 
					  : wxProtocol()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  m_addr = NULL;
 | 
					  m_addr = NULL;
 | 
				
			||||||
  m_read = FALSE;
 | 
					  m_read = false;
 | 
				
			||||||
  m_proxy_mode = FALSE;
 | 
					  m_proxy_mode = false;
 | 
				
			||||||
  m_post_buf = wxEmptyString;
 | 
					  m_post_buf = wxEmptyString;
 | 
				
			||||||
  m_http_response = 0;
 | 
					  m_http_response = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -99,7 +99,7 @@ void wxHTTP::SetHeader(const wxString& header, const wxString& h_data)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  if (m_read) {
 | 
					  if (m_read) {
 | 
				
			||||||
    ClearHeaders();
 | 
					    ClearHeaders();
 | 
				
			||||||
    m_read = FALSE;
 | 
					    m_read = false;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wxHeaderIterator it = FindHeader(header);
 | 
					  wxHeaderIterator it = FindHeader(header);
 | 
				
			||||||
@@ -141,11 +141,11 @@ bool wxHTTP::ParseHeaders()
 | 
				
			|||||||
  wxStringTokenizer tokenzr;
 | 
					  wxStringTokenizer tokenzr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ClearHeaders();
 | 
					  ClearHeaders();
 | 
				
			||||||
  m_read = TRUE;
 | 
					  m_read = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(__VISAGECPP__)
 | 
					#if defined(__VISAGECPP__)
 | 
				
			||||||
// VA just can't stand while(1)
 | 
					// VA just can't stand while(1)
 | 
				
			||||||
    bool bOs2var = TRUE;
 | 
					    bool bOs2var = true;
 | 
				
			||||||
    while(bOs2var)
 | 
					    while(bOs2var)
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
  while (1)
 | 
					  while (1)
 | 
				
			||||||
@@ -153,7 +153,7 @@ bool wxHTTP::ParseHeaders()
 | 
				
			|||||||
  {
 | 
					  {
 | 
				
			||||||
    m_perr = GetLine(this, line);
 | 
					    m_perr = GetLine(this, line);
 | 
				
			||||||
    if (m_perr != wxPROTO_NOERR)
 | 
					    if (m_perr != wxPROTO_NOERR)
 | 
				
			||||||
      return FALSE;
 | 
					      return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (line.Length() == 0)
 | 
					    if (line.Length() == 0)
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
@@ -161,7 +161,7 @@ bool wxHTTP::ParseHeaders()
 | 
				
			|||||||
    wxString left_str = line.BeforeFirst(':');
 | 
					    wxString left_str = line.BeforeFirst(':');
 | 
				
			||||||
    m_headers[left_str] = line.AfterFirst(':').Strip(wxString::both);
 | 
					    m_headers[left_str] = line.AfterFirst(':').Strip(wxString::both);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  return TRUE;
 | 
					  return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxHTTP::Connect(const wxString& host, unsigned short port)
 | 
					bool wxHTTP::Connect(const wxString& host, unsigned short port)
 | 
				
			||||||
@@ -180,7 +180,7 @@ bool wxHTTP::Connect(const wxString& host, unsigned short port)
 | 
				
			|||||||
    delete m_addr;
 | 
					    delete m_addr;
 | 
				
			||||||
    m_addr = NULL;
 | 
					    m_addr = NULL;
 | 
				
			||||||
    m_perr = wxPROTO_NETERR;
 | 
					    m_perr = wxPROTO_NETERR;
 | 
				
			||||||
    return FALSE;
 | 
					    return false;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if ( port ) addr->Service(port);
 | 
					  if ( port ) addr->Service(port);
 | 
				
			||||||
@@ -189,7 +189,7 @@ bool wxHTTP::Connect(const wxString& host, unsigned short port)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  SetHeader(wxT("Host"), host);
 | 
					  SetHeader(wxT("Host"), host);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return TRUE;
 | 
					  return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxHTTP::Connect(wxSockAddress& addr, bool WXUNUSED(wait))
 | 
					bool wxHTTP::Connect(wxSockAddress& addr, bool WXUNUSED(wait))
 | 
				
			||||||
@@ -205,7 +205,7 @@ bool wxHTTP::Connect(wxSockAddress& addr, bool WXUNUSED(wait))
 | 
				
			|||||||
  if (ipv4addr)
 | 
					  if (ipv4addr)
 | 
				
			||||||
      SetHeader(wxT("Host"), ipv4addr->OrigHostname());
 | 
					      SetHeader(wxT("Host"), ipv4addr->OrigHostname());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return TRUE;
 | 
					  return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
 | 
					bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
 | 
				
			||||||
@@ -222,7 +222,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
 | 
				
			|||||||
      SetHeader( wxT("Content-Length"), wxString::Format( wxT("%lu"), (unsigned long)m_post_buf.Len() ) );
 | 
					      SetHeader( wxT("Content-Length"), wxString::Format( wxT("%lu"), (unsigned long)m_post_buf.Len() ) );
 | 
				
			||||||
    break;
 | 
					    break;
 | 
				
			||||||
  default:
 | 
					  default:
 | 
				
			||||||
    return FALSE;
 | 
					    return false;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  m_http_response = 0;
 | 
					  m_http_response = 0;
 | 
				
			||||||
@@ -237,7 +237,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
 | 
				
			|||||||
#else
 | 
					#else
 | 
				
			||||||
  SetFlags( wxSOCKET_NONE );
 | 
					  SetFlags( wxSOCKET_NONE );
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
  Notify(FALSE);
 | 
					  Notify(false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wxString buf;
 | 
					  wxString buf;
 | 
				
			||||||
  buf.Printf(wxT("%s %s HTTP/1.0\r\n"), request, path.c_str());
 | 
					  buf.Printf(wxT("%s %s HTTP/1.0\r\n"), request, path.c_str());
 | 
				
			||||||
@@ -255,7 +255,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
 | 
				
			|||||||
  m_perr = GetLine(this, tmp_str);
 | 
					  m_perr = GetLine(this, tmp_str);
 | 
				
			||||||
  if (m_perr != wxPROTO_NOERR) {
 | 
					  if (m_perr != wxPROTO_NOERR) {
 | 
				
			||||||
    RestoreState();
 | 
					    RestoreState();
 | 
				
			||||||
    return FALSE;
 | 
					    return false;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (!tmp_str.Contains(wxT("HTTP/"))) {
 | 
					  if (!tmp_str.Contains(wxT("HTTP/"))) {
 | 
				
			||||||
@@ -264,7 +264,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
 | 
				
			|||||||
    SetHeader(wxT("Content-Length"), wxT("-1"));
 | 
					    SetHeader(wxT("Content-Length"), wxT("-1"));
 | 
				
			||||||
    SetHeader(wxT("Content-Type"), wxT("none/none"));
 | 
					    SetHeader(wxT("Content-Type"), wxT("none/none"));
 | 
				
			||||||
    RestoreState();
 | 
					    RestoreState();
 | 
				
			||||||
    return TRUE;
 | 
					    return true;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wxStringTokenizer token(tmp_str,wxT(' '));
 | 
					  wxStringTokenizer token(tmp_str,wxT(' '));
 | 
				
			||||||
@@ -289,7 +289,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
 | 
				
			|||||||
  default:
 | 
					  default:
 | 
				
			||||||
    m_perr = wxPROTO_NOFILE;
 | 
					    m_perr = wxPROTO_NOFILE;
 | 
				
			||||||
    RestoreState();
 | 
					    RestoreState();
 | 
				
			||||||
    return FALSE;
 | 
					    return false;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ret_value = ParseHeaders();
 | 
					  ret_value = ParseHeaders();
 | 
				
			||||||
@@ -343,9 +343,9 @@ wxInputStream *wxHTTP::GetInputStream(const wxString& path)
 | 
				
			|||||||
  if (!m_addr)
 | 
					  if (!m_addr)
 | 
				
			||||||
    return NULL;
 | 
					    return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // We set m_connected back to FALSE so wxSocketBase will know what to do.
 | 
					  // We set m_connected back to false so wxSocketBase will know what to do.
 | 
				
			||||||
#ifdef __WXMAC__
 | 
					#ifdef __WXMAC__
 | 
				
			||||||
        wxSocketClient::Connect(*m_addr , FALSE );
 | 
					        wxSocketClient::Connect(*m_addr , false );
 | 
				
			||||||
        wxSocketClient::WaitOnConnect(10);
 | 
					        wxSocketClient::WaitOnConnect(10);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!wxSocketClient::IsConnected())
 | 
					    if (!wxSocketClient::IsConnected())
 | 
				
			||||||
@@ -367,7 +367,7 @@ wxInputStream *wxHTTP::GetInputStream(const wxString& path)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  inp_stream->m_read_bytes = 0;
 | 
					  inp_stream->m_read_bytes = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Notify(FALSE);
 | 
					  Notify(false);
 | 
				
			||||||
  SetFlags(wxSOCKET_BLOCK | wxSOCKET_WAITALL);
 | 
					  SetFlags(wxSOCKET_BLOCK | wxSOCKET_WAITALL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return inp_stream;
 | 
					  return inp_stream;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user