2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2003-02-02 05:50:21 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* GimpTextEditor
|
|
|
|
* Copyright (C) 2002-2003 Sven Neumann <sven@gimp.org>
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2003-02-02 05:50:21 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2003-02-02 05:50:21 +08:00
|
|
|
* (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
|
2009-01-18 06:28:01 +08:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2003-02-02 05:50:21 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GIMP_TEXT_EDITOR_H__
|
|
|
|
#define __GIMP_TEXT_EDITOR_H__
|
|
|
|
|
|
|
|
|
2003-03-31 23:10:15 +08:00
|
|
|
#define GIMP_TYPE_TEXT_EDITOR (gimp_text_editor_get_type ())
|
|
|
|
#define GIMP_TEXT_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_TEXT_EDITOR, GimpTextEditor))
|
|
|
|
#define GIMP_IS_TEXT_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_TEXT_EDITOR))
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _GimpTextEditorClass GimpTextEditorClass;
|
|
|
|
|
|
|
|
struct _GimpTextEditor
|
|
|
|
{
|
|
|
|
GimpDialog parent_instance;
|
|
|
|
|
|
|
|
/*< private >*/
|
2004-03-12 02:47:37 +08:00
|
|
|
GimpTextDirection base_dir;
|
2005-06-11 22:18:51 +08:00
|
|
|
gchar *font_name;
|
|
|
|
|
2003-03-31 23:10:15 +08:00
|
|
|
GtkWidget *view;
|
2005-06-11 22:18:51 +08:00
|
|
|
GtkWidget *font_toggle;
|
2004-02-27 04:04:20 +08:00
|
|
|
GtkWidget *file_dialog;
|
2004-11-04 22:24:32 +08:00
|
|
|
GimpUIManager *ui_manager;
|
2003-03-31 23:10:15 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GimpTextEditorClass
|
|
|
|
{
|
|
|
|
GimpDialogClass parent_class;
|
|
|
|
|
2004-03-12 02:47:37 +08:00
|
|
|
void (* text_changed) (GimpTextEditor *editor);
|
|
|
|
void (* dir_changed) (GimpTextEditor *editor);
|
2003-03-31 23:10:15 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2004-03-12 02:47:37 +08:00
|
|
|
GType gimp_text_editor_get_type (void) G_GNUC_CONST;
|
2004-11-04 22:24:32 +08:00
|
|
|
GtkWidget * gimp_text_editor_new (const gchar *title,
|
2006-08-28 23:26:25 +08:00
|
|
|
GtkWindow *parent,
|
2008-10-27 01:39:55 +08:00
|
|
|
GimpMenuFactory *menu_factory,
|
2010-02-26 00:41:10 +08:00
|
|
|
GimpTextBuffer *text_buffer);
|
2004-03-12 02:47:37 +08:00
|
|
|
|
|
|
|
void gimp_text_editor_set_text (GimpTextEditor *editor,
|
|
|
|
const gchar *text,
|
|
|
|
gint len);
|
|
|
|
gchar * gimp_text_editor_get_text (GimpTextEditor *editor);
|
|
|
|
|
|
|
|
void gimp_text_editor_set_direction (GimpTextEditor *editor,
|
|
|
|
GimpTextDirection base_dir);
|
|
|
|
GimpTextDirection gimp_text_editor_get_direction (GimpTextEditor *editor);
|
2003-02-02 05:50:21 +08:00
|
|
|
|
2005-06-11 22:18:51 +08:00
|
|
|
void gimp_text_editor_set_font_name (GimpTextEditor *editor,
|
|
|
|
const gchar *font_name);
|
|
|
|
const gchar * gimp_text_editor_get_font_name (GimpTextEditor *editor);
|
|
|
|
|
2003-02-02 05:50:21 +08:00
|
|
|
|
|
|
|
#endif /* __GIMP_TEXT_EDITOR_H__ */
|