implemented text styles for GTK+
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -79,6 +79,10 @@ public:
|
||||
virtual void WriteText(const wxString& text);
|
||||
virtual void AppendText(const wxString& text);
|
||||
|
||||
// apply text attribute to the range of text (only works with richedit
|
||||
// controls)
|
||||
virtual bool SetStyle(long start, long end, const wxTextAttr& style);
|
||||
|
||||
// translate between the position (which is just an index in the text ctrl
|
||||
// considering all its contents as a single strings) and (x, y) coordinates
|
||||
// which represent column and line.
|
||||
@@ -130,8 +134,9 @@ public:
|
||||
void OnUpdateUndo(wxUpdateUIEvent& event);
|
||||
void OnUpdateRedo(wxUpdateUIEvent& event);
|
||||
|
||||
bool SetFont( const wxFont &font );
|
||||
bool SetBackgroundColour(const wxColour &colour);
|
||||
bool SetFont(const wxFont& font);
|
||||
bool SetForegroundColour(const wxColour& colour);
|
||||
bool SetBackgroundColour(const wxColour& colour);
|
||||
|
||||
GtkWidget* GetConnectWidget();
|
||||
bool IsOwnGtkWindow( GdkWindow *window );
|
||||
|
@@ -79,6 +79,10 @@ public:
|
||||
virtual void WriteText(const wxString& text);
|
||||
virtual void AppendText(const wxString& text);
|
||||
|
||||
// apply text attribute to the range of text (only works with richedit
|
||||
// controls)
|
||||
virtual bool SetStyle(long start, long end, const wxTextAttr& style);
|
||||
|
||||
// translate between the position (which is just an index in the text ctrl
|
||||
// considering all its contents as a single strings) and (x, y) coordinates
|
||||
// which represent column and line.
|
||||
@@ -130,8 +134,9 @@ public:
|
||||
void OnUpdateUndo(wxUpdateUIEvent& event);
|
||||
void OnUpdateRedo(wxUpdateUIEvent& event);
|
||||
|
||||
bool SetFont( const wxFont &font );
|
||||
bool SetBackgroundColour(const wxColour &colour);
|
||||
bool SetFont(const wxFont& font);
|
||||
bool SetForegroundColour(const wxColour& colour);
|
||||
bool SetBackgroundColour(const wxColour& colour);
|
||||
|
||||
GtkWidget* GetConnectWidget();
|
||||
bool IsOwnGtkWindow( GdkWindow *window );
|
||||
|
@@ -80,10 +80,17 @@ public:
|
||||
bool HasBackgroundColour() const { return m_colBack.Ok(); }
|
||||
bool HasFont() const { return m_font.Ok(); }
|
||||
|
||||
// setters
|
||||
const wxColour& GetTextColour() const { return m_colText; }
|
||||
const wxColour& GetBackgroundColour() const { return m_colBack; }
|
||||
const wxFont& GetFont() const { return m_font; }
|
||||
|
||||
// returns false if we have any attributes set, true otherwise
|
||||
bool IsDefault() const
|
||||
{
|
||||
return !HasTextColour() && !HasBackgroundColour() && !HasFont();
|
||||
}
|
||||
|
||||
private:
|
||||
wxColour m_colText,
|
||||
m_colBack;
|
||||
|
Reference in New Issue
Block a user