Gimp/app/widgets/gimpsessioninfo-dock.h
Jehan 2b0928d895 app: big UI rework of the align/distribute tool.
- Adding a separate pivot widget to allow choosing which point of the items we
  align or distribute. E.g. until now, we could only align the right side of
  objects to the right side of the reference object, left to left and center to
  center. Now these are independent. Therefore I can align the left side of
  objects to the right border of a selection or a layer, and so on.
- Only keep 2 "distribute" buttons (for now). Most of the distribution actions
  were basically broken or extremely hard to understand. Also they were
  apparently mixing concepts of alignments with distributions. Now let's
  basically only keep the bases: horizontal or vertical distributions.
  Everything is still possible using a mix of alignment and distribution
  buttons, and it's much clearer.
- Since the GimpAlignmentType was used nearly only there (except for some usage
  like to store dock side or filter preview split direction, but these
  GIMP_ARRANGE_* values were unused there), I removed the various enum values
  which we don't use anymore.
- The Reference settings gets its own subsection in the Align tool options.
  Until now, it looked like it only applied to alignment, whereas it applies to
  distribution too.

Note: this is still work-in-progress, mostly some initial dev work to put some
algorithmic bases. We had some UI and specification discussions with Aryeom
already and some things might still change a lot.
2022-11-08 19:19:55 +01:00

64 lines
2.6 KiB
C

/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpsessioninfo-dock.h
* Copyright (C) 2001-2007 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 __GIMP_SESSION_INFO_DOCK_H__
#define __GIMP_SESSION_INFO_DOCK_H__
/**
* GimpSessionInfoDock:
*
* Contains information about a dock in the interface.
*/
struct _GimpSessionInfoDock
{
/* Type of dock, written to/read from sessionrc. E.g. 'gimp-dock' or
* 'gimp-toolbox'
*/
gchar *dock_type;
/* What side this dock is in in single-window mode. Either
* GIMP_ALIGN_LEFT, GIMP_ALIGN_RIGHT or -1.
*/
GimpAlignmentType side;
/* GtkPaned position of this dock */
gint position;
/* list of GimpSessionInfoBook */
GList *books;
};
GimpSessionInfoDock * gimp_session_info_dock_new (const gchar *dock_type);
void gimp_session_info_dock_free (GimpSessionInfoDock *dock_info);
void gimp_session_info_dock_serialize (GimpConfigWriter *writer,
GimpSessionInfoDock *dock);
GTokenType gimp_session_info_dock_deserialize (GScanner *scanner,
gint scope,
GimpSessionInfoDock **info,
const gchar *dock_type);
GimpSessionInfoDock * gimp_session_info_dock_from_widget (GimpDock *dock);
GimpDock * gimp_session_info_dock_restore (GimpSessionInfoDock *dock_info,
GimpDialogFactory *factory,
GdkMonitor *monitor,
GimpDockContainer *dock_container);
#endif /* __GIMP_SESSION_INFO_DOCK_H__ */