diff options
author | fluxgen <fluxgen> | 2007-03-31 19:09:48 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2007-03-31 19:09:48 (GMT) |
commit | 953c6804c6a62eb17531b5bcfe4841850334e04f (patch) | |
tree | 916e2eea4596f6baa61ecf2f5b305ff543421041 | |
parent | dd7a7ad8864c53193822cd0cf302af364b1eed9d (diff) | |
download | fluxbox-953c6804c6a62eb17531b5bcfe4841850334e04f.zip fluxbox-953c6804c6a62eb17531b5bcfe4841850334e04f.tar.bz2 |
added document
-rw-r--r-- | src/CommandDialog.hh | 20 |
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 | ||
35 | class BScreen; | 35 | class BScreen; |
36 | 36 | ||
37 | /** | ||
38 | * Displays a fluxbox command dialog which executes fluxbox | ||
39 | * action commands. | ||
40 | */ | ||
37 | class CommandDialog: public FbTk::FbWindow, public FbTk::EventHandler { | 41 | class CommandDialog: public FbTk::FbWindow, public FbTk::EventHandler { |
38 | public: | 42 | public: |
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 | ||
54 | protected: | 65 | protected: |
66 | /// expand the current word, using the history as a references | ||
55 | virtual void tabComplete(); | 67 | virtual void tabComplete(); |
56 | 68 | ||
57 | private: | 69 | private: |
@@ -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; |