mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-21 14:16:31 +01:00
git-svn-id: svn://localhost/ardour2/branches/3.0@3435 d708f5d6-7413-0410-9779-e7cbd77b26cf
72 lines
2.9 KiB
Text
72 lines
2.9 KiB
Text
/* $Id: fontbutton.hg,v 1.5 2006/08/02 14:42:41 jjongsma Exp $ */
|
|
|
|
/* fontbutton.h
|
|
*
|
|
* Copyright (C) 2003 The gtkmm Development Team
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the Free
|
|
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
*/
|
|
|
|
#include <gtkmm/button.h>
|
|
_DEFS(gtkmm,gtk)
|
|
_PINCLUDE(gtkmm/private/button_p.h)
|
|
|
|
|
|
namespace Gtk
|
|
{
|
|
|
|
/** A button to launch a font selection dialog.
|
|
*
|
|
* The Gtk::FontButton is a button which displays the currently selected font and
|
|
* allows to open a font selection dialog to change the font. It is suitable widget
|
|
* for selecting a font in a preference dialog.
|
|
* @ingroup Widgets
|
|
*/
|
|
class FontButton : public Button
|
|
{
|
|
_CLASS_GTKOBJECT(FontButton, GtkFontButton, GTK_FONT_BUTTON, Gtk::Button, GtkButton)
|
|
public:
|
|
_CTOR_DEFAULT()
|
|
_WRAP_CTOR(FontButton(const Glib::ustring& font_name), gtk_font_button_new_with_font)
|
|
|
|
_WRAP_METHOD(Glib::ustring get_title() const, gtk_font_button_get_title)
|
|
_WRAP_METHOD(void set_title(const Glib::ustring& title), gtk_font_button_set_title)
|
|
_WRAP_METHOD(bool get_use_font() const, gtk_font_button_get_use_font)
|
|
_WRAP_METHOD(void set_use_font(bool use_font = true), gtk_font_button_set_use_font)
|
|
_WRAP_METHOD(bool get_use_size() const, gtk_font_button_get_use_size)
|
|
_WRAP_METHOD(void set_use_size(bool use_size = true), gtk_font_button_set_use_size)
|
|
_WRAP_METHOD(Glib::ustring get_font_name() const, gtk_font_button_get_font_name)
|
|
_WRAP_METHOD(bool set_font_name(const Glib::ustring& fontname), gtk_font_button_set_font_name)
|
|
_WRAP_METHOD(bool get_show_style() const, gtk_font_button_get_show_style)
|
|
_WRAP_METHOD(void set_show_style(bool show_style = true), gtk_font_button_set_show_style)
|
|
_WRAP_METHOD(bool get_show_size() const, gtk_font_button_get_show_size)
|
|
_WRAP_METHOD(void set_show_size(bool show_size = true), gtk_font_button_set_show_size)
|
|
|
|
_WRAP_PROPERTY("title", Glib::ustring)
|
|
_WRAP_PROPERTY("font-name", Glib::ustring)
|
|
_WRAP_PROPERTY("use-font", bool)
|
|
_WRAP_PROPERTY("use-size", bool)
|
|
_WRAP_PROPERTY("show-style", bool)
|
|
_WRAP_PROPERTY("show-size", bool)
|
|
|
|
/** The font_set signal is emitted when the user selects a font. When handling this signal,
|
|
* use get_font_name() to find out which font was just selected.
|
|
*/
|
|
_WRAP_SIGNAL(void font_set(), "font-set")
|
|
};
|
|
|
|
|
|
} // namespace Gtk
|
|
|