// 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; }
+
+ // Can the line be broken before this cell?
+ virtual bool IsLinebreakAllowed() const
+ { return !IsFormattingCell(); }
// Returns y-coordinates that contraint the cell, i.e. left is highest
// and right lowest coordinate such that the cell lays between then.
wxHtmlRenderingInfo& info);
wxCursor GetCursor() const;
wxString ConvertToText(wxHtmlSelection *sel) const;
+ bool IsLinebreakAllowed() const { return m_allowLinebreak; }
+
+ void SetPreviousWord(wxHtmlWordCell *cell);
protected:
void SetSelectionPrivPos(wxDC& dc, wxHtmlSelection *s) const;
unsigned& pos1, unsigned& pos2) const;
wxString m_Word;
+ bool m_allowLinebreak;
};
wxString m_FontFaceFixed, m_FontFaceNormal;
// html font sizes and faces of fixed and proportional fonts
- DECLARE_NO_COPY_CLASS(wxHtmlWinParser)
-
#if !wxUSE_UNICODE
wxFontEncoding m_InputEnc, m_OutputEnc;
// I/O font encodings
wxEncodingConverter *m_EncConv;
#endif
+
+ wxHtmlWordCell *m_lastWordCell;
+
+ DECLARE_NO_COPY_CLASS(wxHtmlWinParser)
};
-//--------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
// wxHtmlWinTagHandler
// This is basicly wxHtmlTagHandler except
// it is extended with protected member m_Parser pointing to
// the wxHtmlWinParser object
-//--------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
class WXDLLIMPEXP_HTML wxHtmlWinTagHandler : public wxHtmlTagHandler
{
-//--------------------------------------------------------------------------------
+//----------------------------------------------------------------------------
// wxHtmlTagsModule
// This is basic of dynamic tag handlers binding.
// The class provides methods for filling parser's handlers
// hash table.
// (See documentation for details)
-//--------------------------------------------------------------------------------
+//----------------------------------------------------------------------------
class WXDLLIMPEXP_HTML wxHtmlTagsModule : public wxModule
{
virtual void OnExit();
// This is called by wxHtmlWinParser.
- // The method must simply call parser->AddTagHandler(new <handler_class_name>);
- // for each handler
+ // The method must simply call parser->AddTagHandler(new
+ // <handler_class_name>); for each handler
virtual void FillHandlersTable(wxHtmlWinParser * WXUNUSED(parser)) { }
};
#endif
#endif // _WX_WINPARS_H_
-
-
-
-
-