Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXDockHandler.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                       D o c k H a n d l e r   W i d g e t                     *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2005,2009 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (at your option) any later version.                                           *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 *********************************************************************************
00021 * $Id: FXDockHandler.h,v 1.8 2009/01/06 13:07:23 fox Exp $                      *
00022 ********************************************************************************/
00023 #ifndef FXDOCKHANDLER_H
00024 #define FXDOCKHANDLER_H
00025 
00026 #ifndef FXFRAME_H
00027 #include "FXFrame.h"
00028 #endif
00029 
00030 namespace FX {
00031 
00032 
00033 /**
00034 * The dock handler exists as a common base class for tool bar grip
00035 * and dock title.
00036 */
00037 class FXAPI FXDockHandler : public FXFrame {
00038   FXDECLARE_ABSTRACT(FXDockHandler)
00039 protected:
00040   FXString  tip;        // Tool tip
00041   FXString  help;       // Help string
00042 private:
00043   FXID      xxx;
00044 protected:
00045   FXDockHandler();
00046 private:
00047   FXDockHandler(const FXDockHandler&);
00048   FXDockHandler& operator=(const FXDockHandler&);
00049 public:
00050   long onLeftBtnPress(FXObject*,FXSelector,void*);
00051   long onLeftBtnRelease(FXObject*,FXSelector,void*);
00052   long onMotion(FXObject*,FXSelector,void*);
00053   long onKeyPress(FXObject*,FXSelector,void*);
00054   long onKeyRelease(FXObject*,FXSelector,void*);
00055   long onQueryTip(FXObject*,FXSelector,void*);
00056   long onQueryHelp(FXObject*,FXSelector,void*);
00057   long onCmdSetTip(FXObject*,FXSelector,void*);
00058   long onCmdGetTip(FXObject*,FXSelector,void*);
00059   long onCmdSetHelp(FXObject*,FXSelector,void*);
00060   long onCmdGetHelp(FXObject*,FXSelector,void*);
00061 protected:
00062   FXDockHandler(FXComposite* p,FXObject* tgt,FXSelector sel,FXuint opts,FXint x,FXint y,FXint w,FXint h,FXint pl,FXint pr,FXint pt,FXint pb);
00063 public:
00064 
00065   /// The grip can receive the focus
00066   virtual FXbool canFocus() const;
00067 
00068   /// Set the status line help text for grip
00069   void setHelpText(const FXString& text){ help=text; }
00070 
00071   /// Get the status line help text for grip
00072   const FXString& getHelpText() const { return help; }
00073 
00074   /// Set the tool tip message for the grip
00075   void setTipText(const FXString& text){ tip=text; }
00076 
00077   /// Get the tool tip message for the grip
00078   const FXString& getTipText() const { return tip; }
00079 
00080   /// Save to stream
00081   virtual void save(FXStream& store) const;
00082 
00083   /// Load from stream
00084   virtual void load(FXStream& store);
00085   };
00086 
00087 }
00088 
00089 #endif

Copyright © 1997-2009 Jeroen van der Zijp