news download themes documentation links










CurrentWindowCmd.hh

00001 // CurrentWindowCmd.hh for Fluxbox - an X11 Window manager
00002 // Copyright (c) 2003 Henrik Kinnunen (fluxgen{<a*t>}users.sourceforge.net)
00003 //                and Simon Bowden (rathnor at users.sourceforge.net)
00004 //
00005 // Permission is hereby granted, free of charge, to any person obtaining a
00006 // copy of this software and associated documentation files (the "Software"),
00007 // to deal in the Software without restriction, including without limitation
00008 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
00009 // and/or sell copies of the Software, and to permit persons to whom the
00010 // Software is furnished to do so, subject to the following conditions:
00011 //
00012 // The above copyright notice and this permission notice shall be included in
00013 // all copies or substantial portions of the Software.
00014 //
00015 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00016 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00017 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00018 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00019 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00020 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00021 // DEALINGS IN THE SOFTWARE.
00022 
00023 // $Id: CurrentWindowCmd.hh,v 1.6 2003/10/25 22:11:22 fluxgen Exp $
00024 
00025 #ifndef CURRENTWINDOWCMD_HH
00026 #define CURRENTWINDOWCMD_HH
00027 
00028 #include "Command.hh"
00029 
00030 class FluxboxWindow;
00031 class WinClient;
00032 
00035 class CurrentWindowCmd: public FbTk::Command {
00036 public:
00037     typedef void (FluxboxWindow::* Action)();
00038     explicit CurrentWindowCmd(Action action);
00039     void execute();
00040 private:
00041     Action m_action;
00042 };
00043 
00046 class WindowHelperCmd: public FbTk::Command {
00047 public:
00048     void execute();
00049 
00050 protected:
00051 
00052     WinClient &winclient();
00053     FluxboxWindow &fbwindow();
00054     virtual void real_execute() = 0;
00055 
00056 };
00057 
00058 class KillWindowCmd: public WindowHelperCmd {
00059 protected:
00060     void real_execute();
00061 };
00062 
00063 class SendToWorkspaceCmd: public WindowHelperCmd {
00064 public:
00065     explicit SendToWorkspaceCmd(int workspace_num):m_workspace_num(workspace_num) { }
00066 protected:
00067     void real_execute();
00068 private:
00069     const int m_workspace_num;
00070 };
00071 
00072 // move cmd, relative position
00073 class MoveCmd: public WindowHelperCmd {
00074 public:
00075     explicit MoveCmd(const int step_size_x, const int step_size_y);
00076 protected:
00077     void real_execute();
00078 
00079 private:
00080     const int m_step_size_x;
00081     const int m_step_size_y;
00082 };
00083 
00084 // resize cmd, relative size
00085 class ResizeCmd: public WindowHelperCmd{
00086 public:
00087   explicit ResizeCmd(int step_size_x, int step_size_y);
00088 protected:
00089   void real_execute();
00090 
00091 private:
00092 
00093   const int m_step_size_x;
00094   const int m_step_size_y;
00095 };
00096 
00097 class MoveToCmd: public WindowHelperCmd {
00098 public:
00099     explicit MoveToCmd(const int step_size_x, const int step_size_y);
00100 protected:
00101     void real_execute();
00102 
00103 private:
00104     const int m_step_size_x;
00105     const int m_step_size_y;
00106 };
00107 
00108 // resize cmd
00109 class ResizeToCmd: public WindowHelperCmd{
00110 public:
00111   explicit ResizeToCmd(int step_size_x, int step_size_y);
00112 protected:
00113   void real_execute();
00114 
00115 private:
00116 
00117   const int m_step_size_x;
00118   const int m_step_size_y;
00119 };
00120 #endif // CURRENTWINDOWCMD_HH

Fluxbox CVS-Jan-2003




      



Got comments about the page? Send them to webmaster.
If you have general Fluxbox related questions ask them on our irc channel or mailing lists.

Show Source








Designed by aLEczapKA