HaikuDepot: notify work status from main window
[haiku.git] / src / apps / terminal / TitlePlaceholderMapper.h
blob0f4327e2d910e828fdc8a173799b661bef09b590
1 /*
2 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef TITLE_PLACEHOLDER_MAPPER_H
6 #define TITLE_PLACEHOLDER_MAPPER_H
9 #include "ActiveProcessInfo.h"
10 #include "PatternEvaluator.h"
11 #include "ShellInfo.h"
14 /*! Class mapping the placeholders common for window and tab titles.
16 class TitlePlaceholderMapper : public PatternEvaluator::PlaceholderMapper {
17 public:
18 TitlePlaceholderMapper(
19 const ShellInfo& shellInfo,
20 const ActiveProcessInfo& processInfo);
22 virtual bool MapPlaceholder(char placeholder,
23 int64 number, bool numberGiven,
24 BString& _string);
26 private:
27 ShellInfo fShellInfo;
28 ActiveProcessInfo fProcessInfo;
32 class WindowTitlePlaceholderMapper : public TitlePlaceholderMapper {
33 public:
34 WindowTitlePlaceholderMapper(
35 const ShellInfo& shellInfo,
36 const ActiveProcessInfo& processInfo,
37 int32 windowIndex, const BString& tabTitle);
39 virtual bool MapPlaceholder(char placeholder,
40 int64 number, bool numberGiven,
41 BString& _string);
43 private:
44 int32 fWindowIndex;
45 BString fTabTitle;
49 class TabTitlePlaceholderMapper : public TitlePlaceholderMapper {
50 public:
51 TabTitlePlaceholderMapper(
52 const ShellInfo& shellInfo,
53 const ActiveProcessInfo& processInfo,
54 int32 tabIndex);
56 virtual bool MapPlaceholder(char placeholder,
57 int64 number, bool numberGiven,
58 BString& _string);
60 private:
61 int32 fTabIndex;
65 #endif // TITLE_PLACEHOLDER_MAPPER_H