GimpToolWidgetGroup is a tool widget acting as a container for child widgets, multiplexing widget events and demultiplexing tool events. It can be used by tools to display multiple widgets simultaneously. The group keeps track of the current focus widget, and hover widget. Certain events are only dispatched to/forwarded from these widgets. The hover widget is determined by performing a hit test for all the children, starting from the last child. The first widget returning GIMP_HIT_DIRECT, if any, is selected as the hover widget; otherwise, if the current focus widget returns GIMP_HIT_INDIRECT, it's selected; otherwise, if exactly one widget returns GIMP_HIT_INDIRECT, it's selected; otherwise, there is no hover widget. The focus widget is set when clicking on a widget (or programatically, using gimp_tool_widget_set_focus()). Additionally, the group can raise the clicked widget to the top of the stack (see gimp_tool_widget_group_set_auto_raise().)
53 lines
2 KiB
C
53 lines
2 KiB
C
/* GIMP - The GNU Image Manipulation Program
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
*
|
|
* 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 <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef __DISPLAY_TYPES_H__
|
|
#define __DISPLAY_TYPES_H__
|
|
|
|
|
|
#include "propgui/propgui-types.h"
|
|
|
|
#include "display/display-enums.h"
|
|
|
|
|
|
typedef struct _GimpCanvas GimpCanvas;
|
|
typedef struct _GimpCanvasGroup GimpCanvasGroup;
|
|
typedef struct _GimpCanvasItem GimpCanvasItem;
|
|
|
|
typedef struct _GimpDisplay GimpDisplay;
|
|
typedef struct _GimpDisplayShell GimpDisplayShell;
|
|
typedef struct _GimpMotionBuffer GimpMotionBuffer;
|
|
|
|
typedef struct _GimpImageWindow GimpImageWindow;
|
|
typedef struct _GimpMultiWindowStrategy GimpMultiWindowStrategy;
|
|
typedef struct _GimpSingleWindowStrategy GimpSingleWindowStrategy;
|
|
|
|
typedef struct _GimpCursorView GimpCursorView;
|
|
typedef struct _GimpNavigationEditor GimpNavigationEditor;
|
|
typedef struct _GimpScaleComboBox GimpScaleComboBox;
|
|
typedef struct _GimpStatusbar GimpStatusbar;
|
|
|
|
typedef struct _GimpToolDialog GimpToolDialog;
|
|
typedef struct _GimpToolGui GimpToolGui;
|
|
typedef struct _GimpToolWidget GimpToolWidget;
|
|
typedef struct _GimpToolWidgetGroup GimpToolWidgetGroup;
|
|
|
|
typedef struct _GimpDisplayXfer GimpDisplayXfer;
|
|
typedef struct _Selection Selection;
|
|
|
|
|
|
#endif /* __DISPLAY_TYPES_H__ */
|