1998-09-15 00:18:54 +04:00
|
|
|
/* GTK - The GIMP Toolkit
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
|
|
*
|
|
|
|
* 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 __GTK_EDIT_H__
|
|
|
|
#define __GTK_EDIT_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include <gdk/gdk.h>
|
|
|
|
#include <gtk/gtkadjustment.h>
|
|
|
|
#include <gtk/gtkeditable.h>
|
2000-08-08 17:29:33 +04:00
|
|
|
#if ! defined (MIDNIGHT) && ! defined (GTK)
|
1998-09-15 00:18:54 +04:00
|
|
|
#include <gtkedit/mousemark.h>
|
2000-08-04 01:53:01 +04:00
|
|
|
#endif
|
1998-09-15 00:18:54 +04:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
|
|
|
|
#define GTK_EDIT(obj) GTK_CHECK_CAST (obj, gtk_edit_get_type (), GtkEdit)
|
|
|
|
#define GTK_EDIT_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_edit_get_type (), GtkEditClass)
|
|
|
|
#define GTK_IS_EDIT(obj) GTK_CHECK_TYPE (obj, gtk_edit_get_type ())
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _GtkEdit GtkEdit;
|
|
|
|
typedef struct _GtkEditClass GtkEditClass;
|
|
|
|
|
|
|
|
|
|
|
|
struct _GtkEdit
|
|
|
|
{
|
|
|
|
GtkEditable editable;
|
|
|
|
|
|
|
|
GdkWindow *text_area;
|
|
|
|
GtkWidget *menubar, *status;
|
|
|
|
|
|
|
|
GtkAdjustment *hadj;
|
|
|
|
gint last_hadj_value;
|
|
|
|
|
|
|
|
GtkAdjustment *vadj;
|
|
|
|
gint last_vadj_value;
|
|
|
|
|
|
|
|
GdkGC *gc;
|
|
|
|
GdkColor color[256];
|
|
|
|
int color_last_pixel;
|
2001-06-02 05:37:23 +04:00
|
|
|
void (*destroy_me) (GtkWidget *);
|
|
|
|
GtkWidget *destroy_me_user_data;
|
1998-09-15 00:18:54 +04:00
|
|
|
struct editor_widget *editor;
|
|
|
|
gulong options;
|
|
|
|
gint timer;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkEditClass
|
|
|
|
{
|
|
|
|
GtkEditableClass parent_class;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
guint gtk_edit_get_type (void);
|
|
|
|
GtkWidget* gtk_edit_new (GtkAdjustment *hadj,
|
|
|
|
GtkAdjustment *vadj);
|
|
|
|
void gtk_edit_set_editable (GtkEdit *text,
|
|
|
|
gint editable);
|
|
|
|
void gtk_edit_set_word_wrap (GtkEdit *text,
|
|
|
|
gint word_wrap);
|
|
|
|
void gtk_edit_set_adjustments (GtkEdit *text,
|
|
|
|
GtkAdjustment *hadj,
|
|
|
|
GtkAdjustment *vadj);
|
|
|
|
void gtk_edit_set_point (GtkEdit *text,
|
|
|
|
guint index);
|
|
|
|
guint gtk_edit_get_point (GtkEdit *text);
|
|
|
|
guint gtk_edit_get_length (GtkEdit *text);
|
|
|
|
void gtk_edit_freeze (GtkEdit *text);
|
|
|
|
void gtk_edit_thaw (GtkEdit *text);
|
|
|
|
void gtk_edit_insert (GtkEdit *text,
|
|
|
|
GdkFont *font,
|
|
|
|
GdkColor *fore,
|
|
|
|
GdkColor *back,
|
|
|
|
const char *chars,
|
|
|
|
gint length);
|
|
|
|
gint gtk_edit_backward_delete (GtkEdit *text,
|
|
|
|
guint nchars);
|
|
|
|
gint gtk_edit_forward_delete (GtkEdit *text,
|
|
|
|
guint nchars);
|
|
|
|
|
|
|
|
|
|
|
|
char *gtk_edit_dialog_get_load_file (guchar * directory, guchar * file, guchar * heading);
|
|
|
|
char *gtk_edit_dialog_get_save_file (guchar * directory, guchar * file, guchar * heading);
|
|
|
|
void gtk_edit_dialog_error (guchar * heading, char *fmt,...);
|
|
|
|
void gtk_edit_dialog_message (guchar * heading, char *fmt,...);
|
|
|
|
int gtk_edit_dialog_query (guchar * heading, guchar * first,...);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* __GTK_EDIT_H__ */
|