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

FXDockHandler.h

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 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or * 00009 * modify it under the terms of the GNU Lesser General Public * 00010 * License as published by the Free Software Foundation; either * 00011 * version 2.1 of the License, or (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 GNU * 00016 * Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public * 00019 * License along with this library; if not, write to the Free Software * 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * 00021 ********************************************************************************* 00022 * $Id: FXDockHandler.h,v 1.1 2005/02/04 03:41:00 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXDOCKHANDLER_H 00025 #define FXDOCKHANDLER_H 00026 00027 #ifndef FXFRAME_H 00028 #include "FXFrame.h" 00029 #endif 00030 00031 namespace FX { 00032 00033 00034 /** 00035 * The dock handler exists as a common base class for tool bar grip 00036 * and dock title. 00037 */ 00038 class FXAPI FXDockHandler : public FXFrame { 00039 FXDECLARE_ABSTRACT(FXDockHandler) 00040 protected: 00041 FXString tip; // Tool tip 00042 FXString help; // Help string 00043 private: 00044 FXID xxx; 00045 protected: 00046 FXDockHandler(); 00047 private: 00048 FXDockHandler(const FXDockHandler&); 00049 FXDockHandler& operator=(const FXDockHandler&); 00050 public: 00051 long onLeftBtnPress(FXObject*,FXSelector,void*); 00052 long onLeftBtnRelease(FXObject*,FXSelector,void*); 00053 long onMotion(FXObject*,FXSelector,void*); 00054 long onKeyPress(FXObject*,FXSelector,void*); 00055 long onKeyRelease(FXObject*,FXSelector,void*); 00056 long onQueryTip(FXObject*,FXSelector,void*); 00057 long onQueryHelp(FXObject*,FXSelector,void*); 00058 long onCmdSetTip(FXObject*,FXSelector,void*); 00059 long onCmdGetTip(FXObject*,FXSelector,void*); 00060 long onCmdSetHelp(FXObject*,FXSelector,void*); 00061 long onCmdGetHelp(FXObject*,FXSelector,void*); 00062 protected: 00063 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); 00064 public: 00065 00066 /// The grip can receive the focus 00067 virtual FXbool canFocus() const; 00068 00069 /// Set the status line help text for grip 00070 void setHelpText(const FXString& text){ help=text; } 00071 00072 /// Get the status line help text for grip 00073 const FXString& getHelpText() const { return help; } 00074 00075 /// Set the tool tip message for the grip 00076 void setTipText(const FXString& text){ tip=text; } 00077 00078 /// Get the tool tip message for the grip 00079 const FXString& getTipText() const { return tip; } 00080 00081 /// Save to stream 00082 virtual void save(FXStream& store) const; 00083 00084 /// Load from stream 00085 virtual void load(FXStream& store); 00086 }; 00087 00088 } 00089 00090 #endif

Copyright © 1997-2005 Jeroen van der Zijp