#include "lib/lib.h"
#include <X11/Xlib.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <fontconfig/fontconfig.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <iconv.h>
#include <errno.h>
#include <langinfo.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "font/font.h"
#include "gui/main.h"
#include "gui/dialogs.h"
#include "gui/properties.h"
Defines | |
| #define | TE_ADD_PROP(_left, _top, _key, _desc) |
Enumerations | |
| enum | { TEM_TEXT, TEM_TEX, TEM_OTHER } |
Functions | |
| void | text_edit_destroy (GtkWidget *w, struct text_edit *te) |
| void | text_edit_go_del (struct o *o, struct o *owner UNUSED, struct o *prev UNUSED, struct go_hook *h) |
| void | text_edit_obj_del (struct o *o, struct o *owner UNUSED, struct o *prev UNUSED, struct obj_hook *h) |
| void | text_edit_go_prop_changed (struct o *o, struct go_hook *h) |
| void | text_edit_obj_prop_changed (struct o *o, struct obj_hook *h) |
| void | text_edit_obj_prop_deleted (struct o *o, struct prop *p, struct obj_hook *h) |
| void | text_edit_go_prop_deleted (struct o *o, struct prop *p, struct go_hook *h) |
| void | text_edit_refresh_text (GtkButton *b, struct text_edit *te) |
| void | text_edit_refresh_widgets (struct text_edit *te) |
| void | on_modified_changed (GtkTextBuffer *textbuffer, struct text_edit *te) |
| void | gui_fonts_finish (void) |
| Destroy the allocated font list. | |
| int | fill_font_list (void) |
| Fill the font list using the Fontconfig. | |
| int | fonts_get_default (void) |
| Return the default or least recently used font_id. | |
| uns | fonts_iter_to_font_id (GtkTreeIter *ti) |
| Convert the TreeIter of the font list to font_id. | |
| int | fonts_compare_iter_with (GtkTreeIter *ti, char *filename) |
| Compare the TreeIter of the font list with the font filename. | |
| char * | get_text_from_text_buffer (GtkTextBuffer *text_buf) |
| char * | convert_text (char *text, int exporting) |
| int | save_text (char *text, const char *filename) |
| Save the text to a file. | |
| char * | load_text (const char *filename) |
| Load the text from a file. | |
| int | save_text_edit (struct text_edit *te, const char *filename) |
| int | load_text_edit (struct text_edit *te, const char *filename) |
| void | on_save_text (GtkWidget *button UNUSED, struct text_edit *te) |
| void | on_load_text (GtkWidget *button UNUSED, struct text_edit *te) |
| void | open_external_editor (GtkWidget *button UNUSED, struct text_edit *te) |
| Open external editor on the text contained in the buffer, wait for the editor to finish and load the text again. | |
| void | text_edit_refresh_text (GtkButton *b UNUSED, struct text_edit *te) |
| void | text_edit_set_window_title (struct text_edit *te) |
| void | text_edit_destroy (GtkWidget *w UNUSED, struct text_edit *te) |
| void | text_edit_create (struct o *o, string text_key) |
| Create the text editor window. | |
Variables | |
| GtkListStore * | font_list |
| The list of all fonts found by the Fontconfig. | |
| GSList * | text_edit_list |
| The list of all existing text editor windows. | |
| int | last_used_font |
| uns | prop_counts [] = { 8, 6, 0 } |
Implementation of the Text and TeX text editors.
Copyright (c) 2004-2005 The VRR Team <vrr@ucw.cz> This program is distributed under GNU General Public License, see COPYING.
|
|
Value: ASSERT(counter < te->prop_count); \
pi = te->pi + counter++; \
prop_item_init( pi, te->o, _key ); \
label = gtk_label_new(_desc); \
g_object_set( G_OBJECT(label), "xalign", 0.0, NULL ); \
gtk_table_attach( table, label, _left, _left+1, _top, _top+1, GTK_FILL, GTK_FILL, 5, 0 ); \
if (pi->unit_edit) \
{ \
gtk_table_attach( table, pi->value_edit, _left+1, _left+2, _top, _top+1, GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0 ); \
gtk_table_attach( table, pi->unit_edit, _left+2, _left+3, _top, _top+1, GTK_FILL, GTK_FILL, 0, 0 ); \
} else \
gtk_table_attach( table, pi->value_edit, _left+1, _left+3, _top, _top+1, GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0 )
|
|
|
Fill the font list using the Fontconfig.
|
|
||||||||||||
|
Create the text editor window. The window has three forms according to what object o is edited and what is the key identifier of the property. For the "text" property of a go_text and go_tex_text, it displays additional property editors. |
1.3.5