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

FXDockHandler.h
Go to the documentation of this file.
1 /********************************************************************************
2 * *
3 * D o c k H a n d l e r W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2005,2006 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU Lesser General Public *
10 * License as published by the Free Software Foundation; either *
11 * version 2.1 of the License, or (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with this library; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
21 *********************************************************************************
22 * $Id: FXDockHandler.h,v 1.3 2006/01/22 17:58:00 fox Exp $ *
23 ********************************************************************************/
24 #ifndef FXDOCKHANDLER_H
25 #define FXDOCKHANDLER_H
26 
27 #ifndef FXFRAME_H
28 #include "FXFrame.h"
29 #endif
30 
31 namespace FX {
32 
33 
34 /**
35 * The dock handler exists as a common base class for tool bar grip
36 * and dock title.
37 */
38 class FXAPI FXDockHandler : public FXFrame {
40 protected:
41  FXString tip; // Tool tip
42  FXString help; // Help string
43 private:
44  FXID xxx;
45 protected:
46  FXDockHandler();
47 private:
49  FXDockHandler& operator=(const FXDockHandler&);
50 public:
51  long onLeftBtnPress(FXObject*,FXSelector,void*);
52  long onLeftBtnRelease(FXObject*,FXSelector,void*);
53  long onMotion(FXObject*,FXSelector,void*);
54  long onKeyPress(FXObject*,FXSelector,void*);
55  long onKeyRelease(FXObject*,FXSelector,void*);
56  long onQueryTip(FXObject*,FXSelector,void*);
57  long onQueryHelp(FXObject*,FXSelector,void*);
58  long onCmdSetTip(FXObject*,FXSelector,void*);
59  long onCmdGetTip(FXObject*,FXSelector,void*);
60  long onCmdSetHelp(FXObject*,FXSelector,void*);
61  long onCmdGetHelp(FXObject*,FXSelector,void*);
62 protected:
64 public:
65 
66  /// The grip can receive the focus
67  virtual bool canFocus() const;
68 
69  /// Set the status line help text for grip
70  void setHelpText(const FXString& text){ help=text; }
71 
72  /// Get the status line help text for grip
73  const FXString& getHelpText() const { return help; }
74 
75  /// Set the tool tip message for the grip
76  void setTipText(const FXString& text){ tip=text; }
77 
78  /// Get the tool tip message for the grip
79  const FXString& getTipText() const { return tip; }
80 
81  /// Save to stream
82  virtual void save(FXStream& store) const;
83 
84  /// Load from stream
85  virtual void load(FXStream& store);
86  };
87 
88 }
89 
90 #endif
unsigned long FXID
Definition: fxdefs.h:442
The Frame widget provides borders around some contents.
Definition: FXFrame.h:73
unsigned int FXuint
Definition: fxdefs.h:396
FXuint FXSelector
Association key.
Definition: FXObject.h:53
#define FXAPI
Definition: fxdefs.h:122
#define FXDECLARE_ABSTRACT(classname)
Macro to set up abstract class declaration.
Definition: FXObject.h:114
Base composite.
Definition: FXComposite.h:35
Definition: FX4Splitter.h:31
int FXint
Definition: fxdefs.h:397
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:166
The dock handler exists as a common base class for tool bar grip and dock title.
Definition: FXDockHandler.h:38
FXString provides essential string manipulation capabilities.
Definition: FXString.h:33

Copyright © 1997-2005 Jeroen van der Zijp