2023-07-19 18:44:44 +03:00
|
|
|
//
|
2023-07-19 18:56:18 +03:00
|
|
|
// Button type header file for the Fast Light Tool Kit (FLTK).
|
2023-07-19 18:44:44 +03:00
|
|
|
//
|
2023-07-19 18:56:18 +03:00
|
|
|
// Copyright 1998-2023 by Bill Spitzak and others.
|
2023-07-19 18:44:44 +03:00
|
|
|
//
|
|
|
|
// This library is free software. Distribution and use rights are outlined in
|
|
|
|
// the file "COPYING" which should have been included with this file. If this
|
|
|
|
// file is missing or damaged, see the license at:
|
|
|
|
//
|
|
|
|
// https://www.fltk.org/COPYING.php
|
|
|
|
//
|
|
|
|
// Please see the following page on how to report bugs and issues:
|
|
|
|
//
|
|
|
|
// https://www.fltk.org/bugs.php
|
|
|
|
//
|
|
|
|
|
2023-07-20 14:48:43 +03:00
|
|
|
#ifndef _FL_BUTTON_TYPE_H
|
|
|
|
#define _FL_BUTTON_TYPE_H
|
2023-07-19 18:44:44 +03:00
|
|
|
|
|
|
|
#include "Fl_Widget_Type.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
\brief A handler for the simple push button and a base class for all other buttons.
|
|
|
|
*/
|
|
|
|
class Fl_Button_Type : public Fl_Widget_Type
|
|
|
|
{
|
|
|
|
typedef Fl_Widget_Type super;
|
|
|
|
Fl_Menu_Item *subtypes() FL_OVERRIDE;
|
|
|
|
public:
|
|
|
|
void ideal_size(int &w, int &h) FL_OVERRIDE;
|
|
|
|
const char *type_name() FL_OVERRIDE { return "Fl_Button"; }
|
|
|
|
const char *alt_type_name() FL_OVERRIDE { return "fltk::Button"; }
|
2023-07-19 18:56:18 +03:00
|
|
|
Fl_Widget *widget(int x, int y, int w, int h) FL_OVERRIDE;
|
2023-07-19 18:44:44 +03:00
|
|
|
Fl_Widget_Type *_make() FL_OVERRIDE { return new Fl_Button_Type(); }
|
|
|
|
int is_button() const FL_OVERRIDE { return 1; }
|
|
|
|
ID id() const FL_OVERRIDE { return ID_Button; }
|
2023-07-19 21:41:58 +03:00
|
|
|
bool is_a(ID inID) const FL_OVERRIDE { return (inID==ID_Button) ? true : super::is_a(inID); }
|
2023-09-03 01:09:32 +03:00
|
|
|
void write_properties(Fd_Project_Writer &f) FL_OVERRIDE;
|
|
|
|
void read_property(Fd_Project_Reader &f, const char *) FL_OVERRIDE;
|
|
|
|
void copy_properties() FL_OVERRIDE;
|
2023-07-19 18:44:44 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
extern Fl_Button_Type Fl_Button_type;
|
|
|
|
|
|
|
|
|
2023-07-20 14:48:43 +03:00
|
|
|
#endif // _FL_BUTTON_TYPE_H
|