diff options
Diffstat (limited to 'libs/gtkmm2ext/gtkmm2ext/window_title.h')
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/window_title.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/window_title.h b/libs/gtkmm2ext/gtkmm2ext/window_title.h new file mode 100644 index 0000000000..1ce7d64b92 --- /dev/null +++ b/libs/gtkmm2ext/gtkmm2ext/window_title.h @@ -0,0 +1,44 @@ +#ifndef WINDOW_TITLE_INCLUDED +#define WINDOW_TITLE_INCLUDED + +#include <string> + +namespace Gtkmm2ext { + +using std::string; + +/** + * \class The WindowTitle class can be used to maintain the + * consistancy of window titles between windows and dialogs. + * + * Each string element that is added to the window title will + * be separated by a hyphen. + */ +class WindowTitle +{ +public: + + /** + * \param title The first string/element of the window title + * which will may be the application name or the document + * name in a document based application. + */ + WindowTitle(const string& title); + + /** + * Add an string element to the window title. + */ + void operator+= (const string&); + + /// @return The window title string. + const string& get_string () { return m_title;} + +private: + + string m_title; + +}; + +} // Gtkmm2ext + +#endif // WINDOW_TITLE_INCLUDED |