summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/gtkmm2ext/window_title.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-04-11 13:07:51 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-04-11 13:07:51 +0000
commit45d3ec1437cf661533bc7750c623865def4424df (patch)
tree80cdeb58bc51a22042b91c50334bdd8ee37deed6 /libs/gtkmm2ext/gtkmm2ext/window_title.h
parent4bf712f501e21cbf1e555bf010553aaca55edd39 (diff)
merged with 1697 revision of trunk (which is post-rc1 but pre-rc2
git-svn-id: svn://localhost/ardour2/branches/2.1-staging@1698 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext/gtkmm2ext/window_title.h')
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/window_title.h44
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