merged with 1697 revision of trunk (which is post-rc1 but pre-rc2
[ardour.git] / libs / gtkmm2ext / gtkmm2ext / window_title.h
1 #ifndef WINDOW_TITLE_INCLUDED
2 #define WINDOW_TITLE_INCLUDED
3
4 #include <string>
5
6 namespace Gtkmm2ext {
7
8 using std::string;
9
10 /**
11  * \class The WindowTitle class can be used to maintain the 
12  * consistancy of window titles between windows and dialogs.
13  *
14  * Each string element that is added to the window title will
15  * be separated by a hyphen.
16  */
17 class WindowTitle
18 {
19 public:
20
21         /**
22          * \param title The first string/element of the window title 
23          * which will may be the application name or the document 
24          * name in a document based application.
25          */
26         WindowTitle(const string& title);
27
28         /**
29          * Add an string element to the window title.
30          */
31         void operator+= (const string&);
32
33         /// @return The window title string.
34         const string& get_string () { return m_title;}
35
36 private:
37
38         string                         m_title;
39
40 };
41
42 } // Gtkmm2ext
43
44 #endif // WINDOW_TITLE_INCLUDED