aboutsummaryrefslogtreecommitdiff
path: root/src/CommandDialog.hh
diff options
context:
space:
mode:
authormarkt <markt>2007-10-13 21:51:37 (GMT)
committermarkt <markt>2007-10-13 21:51:37 (GMT)
commita59428d67a95a9df16554962f0a6257d6378328a (patch)
treef856ed9300c34f7a17d499f22d895610cfbc08e5 /src/CommandDialog.hh
parent41b5c6dadb1f474675660cef18b812d4c2338ed2 (diff)
downloadfluxbox-a59428d67a95a9df16554962f0a6257d6378328a.zip
fluxbox-a59428d67a95a9df16554962f0a6257d6378328a.tar.bz2
merged changes from pre-devel
Diffstat (limited to 'src/CommandDialog.hh')
-rw-r--r--src/CommandDialog.hh20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/CommandDialog.hh b/src/CommandDialog.hh
index a9e82ac..47d6687 100644
--- a/src/CommandDialog.hh
+++ b/src/CommandDialog.hh
@@ -34,14 +34,25 @@
34 34
35class BScreen; 35class BScreen;
36 36
37/**
38 * Displays a fluxbox command dialog which executes fluxbox
39 * action commands.
40 */
37class CommandDialog: public FbTk::FbWindow, public FbTk::EventHandler { 41class CommandDialog: public FbTk::FbWindow, public FbTk::EventHandler {
38public: 42public:
39 CommandDialog(BScreen &screen, const std::string &title, 43 CommandDialog(BScreen &screen, const std::string &title,
40 const std::string pre_command = ""); 44 const std::string pre_command = "");
41 virtual ~CommandDialog(); 45 virtual ~CommandDialog();
42 46
47 /// Sets the entry text.
43 void setText(const std::string &text); 48 void setText(const std::string &text);
44 void setPostCommand(FbTk::RefCount<FbTk::Command> &postcommand) { m_postcommand = postcommand; } 49 /**
50 * Sets the command to be execute after the command is done.
51 * @param postcommand the command.
52 */
53 void setPostCommand(FbTk::RefCount<FbTk::Command> &postcommand) {
54 m_postcommand = postcommand;
55 }
45 void show(); 56 void show();
46 void hide(); 57 void hide();
47 58
@@ -52,6 +63,7 @@ public:
52 void keyPressEvent(XKeyEvent &event); 63 void keyPressEvent(XKeyEvent &event);
53 64
54protected: 65protected:
66 /// expand the current word, using the history as a references
55 virtual void tabComplete(); 67 virtual void tabComplete();
56 68
57private: 69private:
@@ -59,8 +71,8 @@ private:
59 void render(); 71 void render();
60 void updateSizes(); 72 void updateSizes();
61 73
62 FbTk::TextBox m_textbox; 74 FbTk::TextBox m_textbox; //< entry field
63 FbTk::TextButton m_label; 75 FbTk::TextButton m_label; //< text in the titlebar
64 FbTk::GContext m_gc; 76 FbTk::GContext m_gc;
65 FbTk::RefCount<FbTk::Command> m_postcommand; ///< command to do after the first command was issued (like reconfigure) 77 FbTk::RefCount<FbTk::Command> m_postcommand; ///< command to do after the first command was issued (like reconfigure)
66 BScreen &m_screen; 78 BScreen &m_screen;