don't break lines in the middle of word
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -255,6 +255,10 @@ public:
|
||||
// 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.
|
||||
// Note: this method does not return meaningful values if you haven't
|
||||
@@ -338,6 +342,9 @@ public:
|
||||
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;
|
||||
@@ -346,6 +353,7 @@ protected:
|
||||
unsigned& pos1, unsigned& pos2) const;
|
||||
|
||||
wxString m_Word;
|
||||
bool m_allowLinebreak;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -176,13 +176,15 @@ private:
|
||||
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)
|
||||
};
|
||||
|
||||
|
||||
@@ -190,12 +192,12 @@ private:
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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
|
||||
{
|
||||
@@ -217,13 +219,13 @@ protected:
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------
|
||||
// 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
|
||||
{
|
||||
@@ -236,8 +238,8 @@ public:
|
||||
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)) { }
|
||||
};
|
||||
|
||||
@@ -245,8 +247,3 @@ public:
|
||||
#endif
|
||||
|
||||
#endif // _WX_WINPARS_H_
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user