Path: blob/main/src/utils/foxtools/MFXCheckButtonTooltip.h
169678 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file MFXCheckButtonTooltip.h14/// @author Pablo Alvarez Lopez15/// @date May 2316///17// CheckButton similar to FXCheckButton but with the possibility of showing tooltips18/****************************************************************************/19#pragma once20#include <config.h>2122#include "fxheader.h"2324// ===========================================================================25// class declaration26// ===========================================================================2728class MFXStaticToolTip;2930// ===========================================================================31// class definitions32// ===========================================================================3334class MFXCheckButtonTooltip : public FXCheckButton {35/// @brief fox declaration36FXDECLARE(MFXCheckButtonTooltip)3738public:39/// @brief constructor (Exactly like the FXCheckButton constructor)40MFXCheckButtonTooltip(FXComposite* p, MFXStaticToolTip* staticToolTip, const FXString& text, FXObject* tgt, FXSelector sel,41FXuint opts = TEXTFIELD_NORMAL, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0,42FXint pl = DEFAULT_PAD, FXint pr = DEFAULT_PAD, FXint pt = DEFAULT_PAD, FXint pb = DEFAULT_PAD);4344/// @brief destructor (Called automatically)45~MFXCheckButtonTooltip();4647/// @brief set toolTip48void setToolTipText(const FXString& toolTip);4950/// @name FOX callbacks51/// @{52/// @brief called when mouse enter in MFXCheckButtonTooltip53long onEnter(FXObject*, FXSelector, void*);5455/// @brief called when mouse leaves in MFXCheckButtonTooltip56long onLeave(FXObject*, FXSelector, void*);5758/// @brief called when mouse motion in MFXCheckButtonTooltip59long onMotion(FXObject*, FXSelector, void*);6061/// @}6263protected:64/// @brief FOX needs this65FOX_CONSTRUCTOR(MFXCheckButtonTooltip)6667/// @brief static tooltip68MFXStaticToolTip* myStaticToolTip = nullptr;6970/// @brief toolTip text (if set, tooltip will be always show)71FXString myToolTipText;7273private:74/// @brief Invalidated copy constructor.75MFXCheckButtonTooltip(const MFXCheckButtonTooltip&) = delete;7677/// @brief Invalidated assignment operator.78MFXCheckButtonTooltip& operator=(const MFXCheckButtonTooltip&) = delete;79};808182