mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00

Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
83 lines
2.5 KiB
C
83 lines
2.5 KiB
C
/* gimpunit.h
|
|
* Copyright (C) 1999 Michael Natterer <mitschel@cs.tu-berlin.de>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 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
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
#ifndef __GIMPUNIT_H__
|
|
#define __GIMPUNIT_H__
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
/* I've put this here and not to libgimp/gimpenums.h, because if this
|
|
* file includes libgimp/gimpenums.h there is a name clash wherever
|
|
* someone includes libgimp/gimpunit.h and app/gimpimage.h
|
|
* (the constants RGB, GRAY and INDEXED are defined in both
|
|
* gimpenums.h and gimpimage.h) (is this a bug? don't know...)
|
|
*/
|
|
typedef enum
|
|
{
|
|
UNIT_PIXEL = 0,
|
|
UNIT_INCH = 1,
|
|
UNIT_CM = 2,
|
|
UNIT_POINT = 3,
|
|
UNIT_PICA = 4,
|
|
UNIT_MM = 5,
|
|
UNIT_METER = 6,
|
|
UNIT_FOOT = 7,
|
|
UNIT_YARD = 8,
|
|
UNIT_END
|
|
} GUnit;
|
|
|
|
|
|
#define gimp_unit_get_number_of_units() UNIT_END
|
|
|
|
/* the following functions fall back to inch (not pixel, as pixel is not
|
|
* a 'real' unit) if the value passed is out of range
|
|
*/
|
|
|
|
/* the meaning of 'factor' is:
|
|
* distance_in_units == ( factor * distance_in_inches )
|
|
*
|
|
* returns 0 for unit == UNIT_PIXEL as we don't have resolution info here
|
|
*/
|
|
gfloat gimp_unit_get_factor (GUnit unit);
|
|
|
|
/* the following function gives a hint how many digits a spinbutton
|
|
* should provide to get approximately the accuracy of an inch-spinbutton
|
|
* with two digits.
|
|
*
|
|
* returns 0 for unit == UNIT_PIXEL as we don't have resolution info here
|
|
*/
|
|
gint gimp_unit_get_digits (GUnit unit);
|
|
|
|
const gchar * gimp_unit_get_symbol (GUnit unit);
|
|
const gchar * gimp_unit_get_abbreviation (GUnit unit);
|
|
const gchar * gimp_unit_get_singular (GUnit unit);
|
|
const gchar * gimp_unit_get_plural (GUnit unit);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* __GIMPUNIT_H__ */
|