Eclipse SUMO - Simulation of Urban MObility
MFXStaticToolTip.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3 // Copyright (C) 2006-2024 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
18 //
19 /****************************************************************************/
20 
21 #pragma once
22 #include <config.h>
23 
24 #include "fxheader.h"
25 
27 class MFXStaticToolTip : protected FXToolTip {
29  FXDECLARE(MFXStaticToolTip)
30 
31 public:
33  MFXStaticToolTip(FXApp* app);
34 
37 
39  void enableStaticToolTip(const bool value);
40 
42  bool isStaticToolTipEnabled() const;
43 
45  void showStaticToolTip(const FXString& toolTipText);
46 
48  void hideStaticToolTip();
49 
53  long onPaint(FXObject* obj, FXSelector sel, void* ptr);
54 
56  long onUpdate(FXObject* sender, FXSelector sel, void* ptr);
57 
59 
60 protected:
63 
64 private:
66  bool myEnableStaticTooltip = true;
67 };
MFXStaticToolTip (based on FXToolTip)
long onUpdate(FXObject *sender, FXSelector sel, void *ptr)
called when tooltip is updated
void showStaticToolTip(const FXString &toolTipText)
show static toolTip
bool myEnableStaticTooltip
flag for enable/disable static tooltip
long onPaint(FXObject *obj, FXSelector sel, void *ptr)
void enableStaticToolTip(const bool value)
enable/disable static tooltip
~MFXStaticToolTip()
destructor
void hideStaticToolTip()
hide static toolTip
MFXStaticToolTip()
FOX need this.
bool isStaticToolTipEnabled() const
check staticToolTip is enabled