PIKApp/libpikawidgets/pikapropwidgets.h

256 lines
14 KiB
C
Raw Permalink Normal View History

2023-09-26 00:35:21 +02:00
/* LIBPIKA - The PIKA Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* pikapropwidgets.h
* Copyright (C) 2002 Michael Natterer <mitch@gimp.org>
*
* This library is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <https://www.gnu.org/licenses/>.
*/
#if !defined (__PIKA_WIDGETS_H_INSIDE__) && !defined (PIKA_WIDGETS_COMPILATION)
#error "Only <libpikawidgets/pikawidgets.h> can be included directly."
#endif
2023-10-30 23:55:30 +01:00
#ifndef __PIKAWIDGETS_PROP_WIDGETS_H__
#define __PIKAWIDGETS_PROP_WIDGETS_H__
2023-09-26 00:35:21 +02:00
G_BEGIN_DECLS
/* GParamBoolean */
GtkWidget * pika_prop_check_button_new (GObject *config,
const gchar *property_name,
const gchar *label);
GtkWidget * pika_prop_switch_new (GObject *config,
const gchar *property_name,
const gchar *label,
GtkWidget **label_out,
GtkWidget **switch_out);
GtkWidget * pika_prop_boolean_combo_box_new (GObject *config,
const gchar *property_name,
const gchar *true_text,
const gchar *false_text);
GtkWidget * pika_prop_boolean_radio_frame_new (GObject *config,
const gchar *property_name,
const gchar *title,
const gchar *true_text,
const gchar *false_text);
GtkWidget * pika_prop_expander_new (GObject *config,
const gchar *property_name,
const gchar *label);
/* GParamInt */
GtkWidget * pika_prop_int_combo_box_new (GObject *config,
const gchar *property_name,
PikaIntStore *store);
GtkWidget * pika_prop_int_radio_frame_new (GObject *config,
const gchar *property_name,
const gchar *title,
PikaIntStore *store);
/* GParamGType */
GtkWidget * pika_prop_pointer_combo_box_new (GObject *config,
const gchar *property_name,
PikaIntStore *store);
/* GParamEnum */
GtkWidget * pika_prop_enum_combo_box_new (GObject *config,
const gchar *property_name,
gint minimum,
gint maximum);
GtkWidget * pika_prop_enum_check_button_new (GObject *config,
const gchar *property_name,
const gchar *label,
gint false_value,
gint true_value);
GtkWidget * pika_prop_enum_radio_frame_new (GObject *config,
const gchar *property_name,
const gchar *title,
gint minimum,
gint maximum);
GtkWidget * pika_prop_enum_radio_box_new (GObject *config,
const gchar *property_name,
gint minimum,
gint maximum);
GtkWidget * pika_prop_enum_icon_box_new (GObject *config,
const gchar *property_name,
const gchar *icon_prefix,
gint minimum,
gint maximum);
GtkWidget * pika_prop_enum_label_new (GObject *config,
const gchar *property_name);
/* GParamInt, GParamUInt, GParamLong, GParamULong, GParamDouble */
GtkWidget * pika_prop_spin_button_new (GObject *config,
const gchar *property_name,
gdouble step_increment,
gdouble page_increment,
gint digits);
GtkWidget * pika_prop_label_spin_new (GObject *config,
const gchar *property_name,
gint digits);
GtkWidget * pika_prop_spin_scale_new (GObject *config,
const gchar *property_name,
gdouble step_increment,
gdouble page_increment,
gint digits);
void pika_prop_widget_set_factor (GtkWidget *widget,
gdouble factor,
gdouble step_increment,
gdouble page_increment,
gint digits);
GtkWidget * pika_prop_hscale_new (GObject *config,
const gchar *property_name,
gdouble step_increment,
gdouble page_increment,
gint digits);
GtkWidget * pika_prop_scale_entry_new (GObject *config,
const gchar *property_name,
const gchar *label,
gdouble factor,
gboolean limit_scale,
gdouble lower_limit,
gdouble upper_limit);
/* PikaParamMemsize */
GtkWidget * pika_prop_memsize_entry_new (GObject *config,
const gchar *property_name);
/* GParamString */
GtkWidget * pika_prop_label_new (GObject *config,
const gchar *property_name);
GtkWidget * pika_prop_entry_new (GObject *config,
const gchar *property_name,
gint max_len);
GtkWidget * pika_prop_label_entry_new (GObject *config,
const gchar *property_name,
gint max_len);
GtkTextBuffer * pika_prop_text_buffer_new (GObject *config,
const gchar *property_name,
gint max_len);
GtkWidget * pika_prop_string_combo_box_new (GObject *config,
const gchar *property_name,
GtkTreeModel *model,
gint id_column,
gint label_column);
2023-10-30 23:55:30 +01:00
GtkWidget * pika_prop_choice_combo_box_new (GObject *config,
const gchar *property_name);
2023-09-26 00:35:21 +02:00
/* PikaParamPath */
GtkWidget * pika_prop_file_chooser_button_new (GObject *config,
const gchar *property_name,
const gchar *title,
GtkFileChooserAction action);
GtkWidget * pika_prop_file_chooser_button_new_with_dialog (GObject *config,
const gchar *property_name,
GtkWidget *dialog);
GtkWidget * pika_prop_path_editor_new (GObject *config,
const gchar *path_property_name,
const gchar *writable_property_name,
const gchar *filechooser_title);
/* GParamInt, GParamUInt, GParamDouble unit: PikaParamUnit */
GtkWidget * pika_prop_size_entry_new (GObject *config,
const gchar *property_name,
gboolean property_is_pixel,
const gchar *unit_property_name,
const gchar *unit_format,
PikaSizeEntryUpdatePolicy update_policy,
gdouble resolution);
/* x,y: GParamInt, GParamDouble unit: PikaParamUnit */
GtkWidget * pika_prop_coordinates_new (GObject *config,
const gchar *x_property_name,
const gchar *y_property_name,
const gchar *unit_property_name,
const gchar *unit_format,
PikaSizeEntryUpdatePolicy update_policy,
gdouble xresolution,
gdouble yresolution,
gboolean has_chainbutton);
gboolean pika_prop_coordinates_connect (GObject *config,
const gchar *x_property_name,
const gchar *y_property_name,
const gchar *unit_property_name,
GtkWidget *sizeentry,
GtkWidget *chainbutton,
gdouble xresolution,
gdouble yresolution);
/* PikaParamColor */
GtkWidget * pika_prop_color_area_new (GObject *config,
const gchar *property_name,
gint width,
gint height,
PikaColorAreaType type);
GtkWidget * pika_prop_color_select_new (GObject *config,
const gchar *property_name,
gint width,
gint height,
PikaColorAreaType type);
GtkWidget * pika_prop_label_color_new (GObject *config,
const gchar *property_name,
gboolean editable);
/* PikaParamUnit */
GtkWidget * pika_prop_unit_combo_box_new (GObject *config,
const gchar *property_name);
/* GParamString (icon name) */
GtkWidget * pika_prop_icon_image_new (GObject *config,
const gchar *property_name,
GtkIconSize icon_size);
G_END_DECLS
2023-10-30 23:55:30 +01:00
#endif /* __PIKAWIDGETS_PROP_WIDGETS_H__ */