diff options
-rw-r--r-- | util/fbrun/FbRun.hh | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/util/fbrun/FbRun.hh b/util/fbrun/FbRun.hh index 7ece48c..dfc74cc 100644 --- a/util/fbrun/FbRun.hh +++ b/util/fbrun/FbRun.hh | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: FbRun.hh,v 1.11 2003/07/25 11:17:41 rathnor Exp $ | 22 | // $Id: FbRun.hh,v 1.12 2003/08/25 01:16:41 fluxgen Exp $ |
23 | 23 | ||
24 | #ifndef FBRUN_HH | 24 | #ifndef FBRUN_HH |
25 | #define FBRUN_HH | 25 | #define FBRUN_HH |
@@ -34,25 +34,19 @@ | |||
34 | /** | 34 | /** |
35 | Creates and managed a run window | 35 | Creates and managed a run window |
36 | */ | 36 | */ |
37 | class FbRun: public FbTk::EventHandler { | 37 | class FbRun: public FbTk::EventHandler, public FbTk::FbWindow { |
38 | public: | 38 | public: |
39 | FbRun(int x = 0, int y = 0, size_t width = 200); | 39 | FbRun(int x = 0, int y = 0, size_t width = 200); |
40 | ~FbRun(); | 40 | ~FbRun(); |
41 | void handleEvent(XEvent * const ev); | 41 | void handleEvent(XEvent * const ev); |
42 | void setText(const std::string &text); | 42 | void setText(const std::string &text); |
43 | void setTitle(const std::string &title); | 43 | void setTitle(const std::string &title); |
44 | void move(int x, int y); | ||
45 | void resize(size_t width, size_t height); | 44 | void resize(size_t width, size_t height); |
46 | size_t height() const { return m_win.height(); } | 45 | |
47 | size_t width() const { return m_win.width(); } | ||
48 | /// hide window | ||
49 | void hide(); | ||
50 | /// show window | ||
51 | void show(); | ||
52 | /// load and reconfigure for new font | 46 | /// load and reconfigure for new font |
53 | bool loadFont(const std::string &fontname); | 47 | bool loadFont(const std::string &fontname); |
54 | void setForeground(const FbTk::Color &color); | 48 | void setForegroundColor(const FbTk::Color &color); |
55 | void setBackground(const FbTk::Color &color); | 49 | void setBackgroundColor(const FbTk::Color &color); |
56 | void setAntialias(bool val) { m_font.setAntialias(val); } | 50 | void setAntialias(bool val) { m_font.setAntialias(val); } |
57 | const FbTk::Font &font() const { return m_font; } | 51 | const FbTk::Font &font() const { return m_font; } |
58 | /// execute command and exit | 52 | /// execute command and exit |
@@ -98,7 +92,6 @@ private: | |||
98 | 92 | ||
99 | FbTk::Font m_font; ///< font used to draw command text | 93 | FbTk::Font m_font; ///< font used to draw command text |
100 | Display *m_display; ///< display connection | 94 | Display *m_display; ///< display connection |
101 | FbTk::FbWindow m_win; ///< toplevel window | ||
102 | std::string m_runtext; ///< command to execute | 95 | std::string m_runtext; ///< command to execute |
103 | int m_bevel; ///< distance to window edge from font in pixels | 96 | int m_bevel; ///< distance to window edge from font in pixels |
104 | GC m_gc; ///< graphic context | 97 | GC m_gc; ///< graphic context |
@@ -111,7 +104,7 @@ private: | |||
111 | int m_start_pos; ///< start position of portion of text to display | 104 | int m_start_pos; ///< start position of portion of text to display |
112 | int m_cursor_pos; ///< relative to m_start_pos | 105 | int m_cursor_pos; ///< relative to m_start_pos |
113 | int m_end_pos; ///< end postition of portion of text to display | 106 | int m_end_pos; ///< end postition of portion of text to display |
114 | 107 | Pixmap m_pixmap; | |
115 | }; | 108 | }; |
116 | 109 | ||
117 | #endif // FBRUN_HH | 110 | #endif // FBRUN_HH |