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:
@@ -254,6 +254,10 @@ public:
|
|||||||
// Sets cell's behaviour on pagebreaks (see AdjustPagebreak). Default
|
// Sets cell's behaviour on pagebreaks (see AdjustPagebreak). Default
|
||||||
// is true - the cell can be split on two pages
|
// is true - the cell can be split on two pages
|
||||||
void SetCanLiveOnPagebreak(bool can) { m_CanLiveOnPagebreak = can; }
|
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
|
// Returns y-coordinates that contraint the cell, i.e. left is highest
|
||||||
// and right lowest coordinate such that the cell lays between then.
|
// and right lowest coordinate such that the cell lays between then.
|
||||||
@@ -338,6 +342,9 @@ public:
|
|||||||
wxHtmlRenderingInfo& info);
|
wxHtmlRenderingInfo& info);
|
||||||
wxCursor GetCursor() const;
|
wxCursor GetCursor() const;
|
||||||
wxString ConvertToText(wxHtmlSelection *sel) const;
|
wxString ConvertToText(wxHtmlSelection *sel) const;
|
||||||
|
bool IsLinebreakAllowed() const { return m_allowLinebreak; }
|
||||||
|
|
||||||
|
void SetPreviousWord(wxHtmlWordCell *cell);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void SetSelectionPrivPos(wxDC& dc, wxHtmlSelection *s) const;
|
void SetSelectionPrivPos(wxDC& dc, wxHtmlSelection *s) const;
|
||||||
@@ -346,6 +353,7 @@ protected:
|
|||||||
unsigned& pos1, unsigned& pos2) const;
|
unsigned& pos1, unsigned& pos2) const;
|
||||||
|
|
||||||
wxString m_Word;
|
wxString m_Word;
|
||||||
|
bool m_allowLinebreak;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -176,13 +176,15 @@ private:
|
|||||||
wxString m_FontFaceFixed, m_FontFaceNormal;
|
wxString m_FontFaceFixed, m_FontFaceNormal;
|
||||||
// html font sizes and faces of fixed and proportional fonts
|
// html font sizes and faces of fixed and proportional fonts
|
||||||
|
|
||||||
DECLARE_NO_COPY_CLASS(wxHtmlWinParser)
|
|
||||||
|
|
||||||
#if !wxUSE_UNICODE
|
#if !wxUSE_UNICODE
|
||||||
wxFontEncoding m_InputEnc, m_OutputEnc;
|
wxFontEncoding m_InputEnc, m_OutputEnc;
|
||||||
// I/O font encodings
|
// I/O font encodings
|
||||||
wxEncodingConverter *m_EncConv;
|
wxEncodingConverter *m_EncConv;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
wxHtmlWordCell *m_lastWordCell;
|
||||||
|
|
||||||
|
DECLARE_NO_COPY_CLASS(wxHtmlWinParser)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -190,12 +192,12 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxHtmlWinTagHandler
|
// wxHtmlWinTagHandler
|
||||||
// This is basicly wxHtmlTagHandler except
|
// This is basicly wxHtmlTagHandler except
|
||||||
// it is extended with protected member m_Parser pointing to
|
// it is extended with protected member m_Parser pointing to
|
||||||
// the wxHtmlWinParser object
|
// the wxHtmlWinParser object
|
||||||
//--------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
class WXDLLIMPEXP_HTML wxHtmlWinTagHandler : public wxHtmlTagHandler
|
class WXDLLIMPEXP_HTML wxHtmlWinTagHandler : public wxHtmlTagHandler
|
||||||
{
|
{
|
||||||
@@ -217,13 +219,13 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// wxHtmlTagsModule
|
// wxHtmlTagsModule
|
||||||
// This is basic of dynamic tag handlers binding.
|
// This is basic of dynamic tag handlers binding.
|
||||||
// The class provides methods for filling parser's handlers
|
// The class provides methods for filling parser's handlers
|
||||||
// hash table.
|
// hash table.
|
||||||
// (See documentation for details)
|
// (See documentation for details)
|
||||||
//--------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
class WXDLLIMPEXP_HTML wxHtmlTagsModule : public wxModule
|
class WXDLLIMPEXP_HTML wxHtmlTagsModule : public wxModule
|
||||||
{
|
{
|
||||||
@@ -236,8 +238,8 @@ public:
|
|||||||
virtual void OnExit();
|
virtual void OnExit();
|
||||||
|
|
||||||
// This is called by wxHtmlWinParser.
|
// This is called by wxHtmlWinParser.
|
||||||
// The method must simply call parser->AddTagHandler(new <handler_class_name>);
|
// The method must simply call parser->AddTagHandler(new
|
||||||
// for each handler
|
// <handler_class_name>); for each handler
|
||||||
virtual void FillHandlersTable(wxHtmlWinParser * WXUNUSED(parser)) { }
|
virtual void FillHandlersTable(wxHtmlWinParser * WXUNUSED(parser)) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -245,8 +247,3 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // _WX_WINPARS_H_
|
#endif // _WX_WINPARS_H_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user