/* PIKA - Photo and Image Kooker Application
 * a rebranding of The GNU Image Manipulation Program (created with heckimp)
 * A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
 *
 * Original copyright, applying to most contents (license remains unchanged): 
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 *
 * pikaproceduredialog.h
 * Copyright (C) 2019 Michael Natterer <mitch@gimp.org>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

#if !defined (__PIKA_UI_H_INSIDE__) && !defined (PIKA_COMPILATION)
#error "Only <libpika/pikaui.h> can be included directly."
#endif

#ifndef __PIKA_PROCEDURE_DIALOG_H__
#define __PIKA_PROCEDURE_DIALOG_H__

G_BEGIN_DECLS

/* For information look into the C source or the html documentation */


#define PIKA_TYPE_PROCEDURE_DIALOG            (pika_procedure_dialog_get_type ())
#define PIKA_PROCEDURE_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIKA_TYPE_PROCEDURE_DIALOG, PikaProcedureDialog))
#define PIKA_PROCEDURE_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), PIKA_TYPE_PROCEDURE_DIALOG, PikaProcedureDialogClass))
#define PIKA_IS_PROCEDURE_DIALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIKA_TYPE_PROCEDURE_DIALOG))
#define PIKA_IS_PROCEDURE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIKA_TYPE_PROCEDURE_DIALOG))
#define PIKA_PROCEDURE_DIALOG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), PIKA_TYPE_PROCEDURE_DIALOG, PikaProcedureDialogClass))


typedef struct _PikaProcedureDialogClass   PikaProcedureDialogClass;
typedef struct _PikaProcedureDialogPrivate PikaProcedureDialogPrivate;

struct _PikaProcedureDialog
{
  PikaDialog                  parent_instance;

  PikaProcedureDialogPrivate *priv;
};

struct _PikaProcedureDialogClass
{
  PikaDialogClass  parent_class;

  void             (* fill_list) (PikaProcedureDialog *dialog,
                                  PikaProcedure       *procedure,
                                  PikaProcedureConfig *config,
                                  GList               *properties);

  /* Padding for future expansion */
  void (*_pika_reserved1) (void);
  void (*_pika_reserved2) (void);
  void (*_pika_reserved3) (void);
  void (*_pika_reserved4) (void);
  void (*_pika_reserved5) (void);
  void (*_pika_reserved6) (void);
  void (*_pika_reserved7) (void);
  void (*_pika_reserved8) (void);
};


GType       pika_procedure_dialog_get_type          (void) G_GNUC_CONST;

GtkWidget * pika_procedure_dialog_new               (PikaProcedure       *procedure,
                                                     PikaProcedureConfig *config,
                                                     const gchar         *title);
void        pika_procedure_dialog_set_ok_label      (PikaProcedureDialog *dialog,
                                                     const gchar         *ok_label);

GtkWidget * pika_procedure_dialog_get_widget        (PikaProcedureDialog *dialog,
                                                     const gchar         *property,
                                                     GType                widget_type);
GtkWidget * pika_procedure_dialog_get_color_widget  (PikaProcedureDialog *dialog,
                                                     const gchar         *property,
                                                     gboolean             editable,
                                                     PikaColorAreaType    type);
GtkWidget * pika_procedure_dialog_get_int_combo     (PikaProcedureDialog *dialog,
                                                     const gchar         *property,
                                                     PikaIntStore        *store);
GtkWidget * pika_procedure_dialog_get_int_radio     (PikaProcedureDialog *dialog,
                                                     const gchar         *property,
                                                     PikaIntStore        *store);
GtkWidget * pika_procedure_dialog_get_spin_scale    (PikaProcedureDialog *dialog,
                                                     const gchar         *property,
                                                     gdouble              factor);
GtkWidget * pika_procedure_dialog_get_scale_entry   (PikaProcedureDialog *dialog,
                                                     const gchar         *property,
                                                     gdouble              factor);
GtkWidget * pika_procedure_dialog_get_size_entry    (PikaProcedureDialog *dialog,
                                                     const gchar         *property,
                                                     gboolean             property_is_pixel,
                                                     const gchar         *unit_property,
                                                     const gchar         *unit_format,
                                                     PikaSizeEntryUpdatePolicy
                                                                          update_policy,
                                                     gdouble              resolution);
GtkWidget * pika_procedure_dialog_get_label         (PikaProcedureDialog *dialog,
                                                     const gchar         *label_id,
                                                     const gchar         *text,
                                                     gboolean             is_markup,
                                                     gboolean             with_mnemonic);
GtkWidget * pika_procedure_dialog_get_file_chooser  (PikaProcedureDialog *dialog,
                                                     const gchar         *property,
                                                     GtkFileChooserAction action);

GtkWidget * pika_procedure_dialog_fill_box          (PikaProcedureDialog *dialog,
                                                     const gchar         *container_id,
                                                     const gchar         *first_property,
                                                     ...) G_GNUC_NULL_TERMINATED;
GtkWidget * pika_procedure_dialog_fill_box_list     (PikaProcedureDialog *dialog,
                                                     const gchar         *container_id,
                                                     GList               *properties);
GtkWidget * pika_procedure_dialog_fill_flowbox      (PikaProcedureDialog *dialog,
                                                     const gchar         *container_id,
                                                     const gchar         *first_property,
                                                     ...) G_GNUC_NULL_TERMINATED;
GtkWidget * pika_procedure_dialog_fill_flowbox_list (PikaProcedureDialog *dialog,
                                                     const gchar         *container_id,
                                                     GList               *properties);

GtkWidget * pika_procedure_dialog_fill_frame        (PikaProcedureDialog *dialog,
                                                     const gchar         *container_id,
                                                     const gchar         *title_id,
                                                     gboolean             invert_title,
                                                     const gchar         *contents_id);

GtkWidget * pika_procedure_dialog_fill_expander     (PikaProcedureDialog *dialog,
                                                     const gchar         *container_id,
                                                     const gchar         *title_id,
                                                     gboolean             invert_title,
                                                     const gchar         *contents_id);

GtkWidget * pika_procedure_dialog_fill_scrolled_window
                                                    (PikaProcedureDialog  *dialog,
                                                     const gchar          *container_id,
                                                     const gchar          *contents_id);

GtkWidget * pika_procedure_dialog_fill_notebook     (PikaProcedureDialog *dialog,
                                                     const gchar         *container_id,
                                                     const gchar         *label_id,
                                                     const gchar         *page_id,
                                                     ...) G_GNUC_NULL_TERMINATED;
GtkWidget * pika_procedure_dialog_fill_notebook_list
                                                    (PikaProcedureDialog *dialog,
                                                     const gchar         *container_id,
                                                     GList               *label_list,
                                                     GList               *page_list);

GtkWidget * pika_procedure_dialog_fill_paned        (PikaProcedureDialog *dialog,
                                                     const gchar         *container_id,
                                                     GtkOrientation       orientation,
                                                     const gchar         *child1_id,
                                                     const gchar         *child2_id);

void        pika_procedure_dialog_fill              (PikaProcedureDialog *dialog,
                                                     ...) G_GNUC_NULL_TERMINATED;
void        pika_procedure_dialog_fill_list         (PikaProcedureDialog *dialog,
                                                     GList               *properties);

void        pika_procedure_dialog_set_sensitive     (PikaProcedureDialog *dialog,
                                                     const gchar         *property,
                                                     gboolean             sensitive,
                                                     GObject             *config,
                                                     const gchar         *config_property,
                                                     gboolean             config_invert);

void        pika_procedure_dialog_set_sensitive_if_in (PikaProcedureDialog *dialog,
                                                       const gchar         *property,
                                                       GObject             *config,
                                                       const gchar         *config_property,
                                                       PikaValueArray      *values,
                                                       gboolean             in_values);

gboolean    pika_procedure_dialog_run               (PikaProcedureDialog *dialog);


G_END_DECLS

#endif /* __PIKA_PROCEDURE_DIALOG_H__ */
