// returns the link associated with this cell. The position is position within
// the cell so it varies from 0 to m_Width, from 0 to m_Height
virtual wxHtmlLinkInfo* GetLink(int WXUNUSED(x) = 0, int WXUNUSED(y) = 0) const
// returns the link associated with this cell. The position is position within
// the cell so it varies from 0 to m_Width, from 0 to m_Height
virtual wxHtmlLinkInfo* GetLink(int WXUNUSED(x) = 0, int WXUNUSED(y) = 0) const
virtual void SetPos(int x, int y) {m_PosX = x, m_PosY = y;}
void SetLink(const wxHtmlLinkInfo& link);
void SetNext(wxHtmlCell *cell) {m_Next = cell;}
virtual void SetPos(int x, int y) {m_PosX = x, m_PosY = y;}
void SetLink(const wxHtmlLinkInfo& link);
void SetNext(wxHtmlCell *cell) {m_Next = cell;}
virtual const wxHtmlCell* Find(int condition, const void* param) const;
// This function is called when mouse button is clicked over the cell.
virtual const wxHtmlCell* Find(int condition, const void* param) const;
// This function is called when mouse button is clicked over the cell.
// Parent is pointer to wxHtmlWindow that generated the event
// HINT: if this handling is not enough for you you should use
// Parent is pointer to wxHtmlWindow that generated the event
// HINT: if this handling is not enough for you you should use
virtual void OnMouseClick(wxWindow *parent, int x, int y, const wxMouseEvent& event);
// This method used to adjust pagebreak position. The parameter is
virtual void OnMouseClick(wxWindow *parent, int x, int y, const wxMouseEvent& event);
// This method used to adjust pagebreak position. The parameter is
// Sets cell's behaviour on pagebreaks (see AdjustPagebreak). Default
// is true - the cell can be split on two pages
// Sets cell's behaviour on pagebreaks (see AdjustPagebreak). Default
// is true - the cell can be split on two pages
- void SetCanLiveOnPagebreak(bool can) {m_CanLiveOnPagebreak = can;}
+ void SetCanLiveOnPagebreak(bool can) { m_CanLiveOnPagebreak = can; }
+
+ // Returns y-coordinates that contraint the cell, i.e. left is highest
+ // and right lowest coordinate such that the cell lays between then.
+ // Note: this method does not return meaningful values if you haven't
+ // called Layout() before!
+ virtual void GetHorizontalConstraints(int *left, int *right) const;
+ // Returns true for simple == terminal cells, i.e. not composite ones.
+ // This if for internal usage only and may disappear in future versions!
+ virtual bool IsTerminalCell() const { return TRUE; }
+
+ // Find the terminal cell inside this cell at the given position (relative
+ // to this cell)
+ //
+ // Returns NULL if not found
+ virtual wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y) const;
long m_Width, m_Height, m_Descent;
// dimensions of fragment
// m_Descent is used to position text&images..
long m_PosX, m_PosY;
// position where the fragment is drawn
wxHtmlLinkInfo *m_Link;
long m_Width, m_Height, m_Descent;
// dimensions of fragment
// m_Descent is used to position text&images..
long m_PosX, m_PosY;
// position where the fragment is drawn
wxHtmlLinkInfo *m_Link;
bool m_CanLiveOnPagebreak;
// true if this cell can be placed on pagebreak, false otherwise
bool m_CanLiveOnPagebreak;
// true if this cell can be placed on pagebreak, false otherwise
void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP) {m_MinHeight = h; m_MinHeightAlign = align; m_LastLayout = -1;}
void SetBackgroundColour(const wxColour& clr) {m_UseBkColour = TRUE; m_BkColour = clr;}
void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP) {m_MinHeight = h; m_MinHeightAlign = align; m_LastLayout = -1;}
void SetBackgroundColour(const wxColour& clr) {m_UseBkColour = TRUE; m_BkColour = clr;}
void SetBorder(const wxColour& clr1, const wxColour& clr2) {m_UseBorder = TRUE; m_BorderColour1 = clr1, m_BorderColour2 = clr2;}
virtual wxHtmlLinkInfo* GetLink(int x = 0, int y = 0) const;
virtual const wxHtmlCell* Find(int condition, const void* param) const;
virtual void OnMouseClick(wxWindow *parent, int x, int y, const wxMouseEvent& event);
void SetBorder(const wxColour& clr1, const wxColour& clr2) {m_UseBorder = TRUE; m_BorderColour1 = clr1, m_BorderColour2 = clr2;}
virtual wxHtmlLinkInfo* GetLink(int x = 0, int y = 0) const;
virtual const wxHtmlCell* Find(int condition, const void* param) const;
virtual void OnMouseClick(wxWindow *parent, int x, int y, const wxMouseEvent& event);
// returns pointer to the first cell in container or NULL
wxHtmlCell* GetFirstCell() const {return m_Cells;}
// returns pointer to the first cell in container or NULL
wxHtmlCell* GetFirstCell() const {return m_Cells;}
protected:
int m_IndentLeft, m_IndentRight, m_IndentTop, m_IndentBottom;
// indentation of subcells. There is always m_Indent pixels
protected:
int m_IndentLeft, m_IndentRight, m_IndentTop, m_IndentBottom;
// indentation of subcells. There is always m_Indent pixels