/* 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
 *
 * pikatoolgui.h
 * Copyright (C) 2013  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/>.
 */

#ifndef __PIKA_TOOL_GUI_H__
#define __PIKA_TOOL_GUI_H__


#include "core/pikaobject.h"


#define PIKA_TYPE_TOOL_GUI            (pika_tool_gui_get_type ())
#define PIKA_TOOL_GUI(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIKA_TYPE_TOOL_GUI, PikaToolGui))
#define PIKA_TOOL_GUI_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), PIKA_TYPE_TOOL_GUI, PikaToolGuiClass))
#define PIKA_IS_TOOL_GUI(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIKA_TYPE_TOOL_GUI))
#define PIKA_IS_TOOL_GUI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIKA_TYPE_TOOL_GUI))
#define PIKA_TOOL_GUI_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), PIKA_TYPE_TOOL_GUI, PikaToolGuiClass))


typedef struct _PikaToolGuiClass PikaToolGuiClass;

struct _PikaToolGui
{
  PikaObject  parent_instance;
};

struct _PikaToolGuiClass
{
  PikaObjectClass  parent_instance;

  void (* response) (PikaToolGui *gui,
                     gint         response_id);

};


GType         pika_tool_gui_get_type               (void) G_GNUC_CONST;

PikaToolGui * pika_tool_gui_new                    (PikaToolInfo     *tool_info,
                                                    const gchar      *title,
                                                    const gchar      *description,
                                                    const gchar      *icon_name,
                                                    const gchar      *help_id,
                                                    GdkMonitor       *monitor,
                                                    gboolean          overlay,
                                                    ...) G_GNUC_NULL_TERMINATED;

void          pika_tool_gui_set_title              (PikaToolGui      *gui,
                                                    const gchar      *title);
void          pika_tool_gui_set_description        (PikaToolGui      *gui,
                                                    const gchar      *description);
void          pika_tool_gui_set_icon_name          (PikaToolGui      *gui,
                                                    const gchar      *icon_name);
void          pika_tool_gui_set_help_id            (PikaToolGui      *gui,
                                                    const gchar      *help_id);

void          pika_tool_gui_set_shell              (PikaToolGui      *gui,
                                                    PikaDisplayShell *shell);
void          pika_tool_gui_set_viewables          (PikaToolGui      *gui,
                                                    GList            *viewables);
void          pika_tool_gui_set_viewable           (PikaToolGui      *gui,
                                                    PikaViewable     *viewable);

GtkWidget   * pika_tool_gui_get_dialog             (PikaToolGui      *gui);
GtkWidget   * pika_tool_gui_get_vbox               (PikaToolGui      *gui);

gboolean      pika_tool_gui_get_visible            (PikaToolGui      *gui);
void          pika_tool_gui_show                   (PikaToolGui      *gui);
void          pika_tool_gui_hide                   (PikaToolGui      *gui);

void          pika_tool_gui_set_overlay            (PikaToolGui      *gui,
                                                    GdkMonitor       *monitor,
                                                    gboolean          overlay);
gboolean      pika_tool_gui_get_overlay            (PikaToolGui      *gui);

void          pika_tool_gui_set_auto_overlay       (PikaToolGui      *gui,
                                                    gboolean          auto_overlay);
gboolean      pika_tool_gui_get_auto_overlay       (PikaToolGui      *gui);

void          pika_tool_gui_set_focus_on_map       (PikaToolGui      *gui,
                                                    gboolean          focus_on_map);
gboolean      pika_tool_gui_get_focus_on_map       (PikaToolGui      *gui);


void          pika_tool_gui_add_buttons_valist     (PikaToolGui      *gui,
                                                    va_list           args);
void          pika_tool_gui_add_button             (PikaToolGui      *gui,
                                                    const gchar      *button_text,
                                                    gint              response_id);
void          pika_tool_gui_set_default_response   (PikaToolGui      *gui,
                                                    gint              response_id);
void          pika_tool_gui_set_response_sensitive (PikaToolGui      *gui,
                                                    gint              response_id,
                                                    gboolean          sensitive);
void    pika_tool_gui_set_alternative_button_order (PikaToolGui      *gui,
                                                    ...);


#endif /* __PIKA_TOOL_GUI_H__ */
