1
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
2
/* This file is part of the GtkHTML library
4
Copyright (C) 2000 Helix Code, Inc.
6
This library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Library General Public
8
License as published by the Free Software Foundation; either
9
version 2 of the License, or (at your option) any later version.
11
This library is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
Library General Public License for more details.
16
You should have received a copy of the GNU Library General Public License
17
along with this library; see the file COPYING.LIB. If not, write to
18
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
Boston, MA 02110-1301, USA.
4
* Copyright (C) 2000 Helix Code, Inc.
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Library General Public
8
* License as published by the Free Software Foundation; either
9
* version 2 of the License, or (at your option) any later version.
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Library General Public License for more details.
16
* You should have received a copy of the GNU Library General Public License
17
* along with this library; see the file COPYING.LIB. If not, write to
18
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
* Boston, MA 02110-1301, USA.
22
22
#include <config.h>
279
object_set_font_style (HTMLObject *o, HTMLEngine *e, gpointer data)
279
object_set_font_style (HTMLObject *o,
281
283
if (html_object_is_text (o)) {
282
284
struct tmp_font *tf = (struct tmp_font *) data;
297
299
static void set_empty_flow_style (HTMLEngine *e, GtkHTMLFontStyle and_mask, GtkHTMLFontStyle or_mask, HTMLUndoDirection dir);
300
set_empty_flow_style_undo_action (HTMLEngine *e, HTMLUndoData *undo_data, HTMLUndoDirection dir, guint position_after)
302
set_empty_flow_style_undo_action (HTMLEngine *e,
303
HTMLUndoData *undo_data,
304
HTMLUndoDirection dir,
305
guint position_after)
302
307
HTMLEmptyParaSetStyle *undo = (HTMLEmptyParaSetStyle *) undo_data;
308
set_empty_flow_style (HTMLEngine *e, GtkHTMLFontStyle and_mask, GtkHTMLFontStyle or_mask, HTMLUndoDirection dir)
313
set_empty_flow_style (HTMLEngine *e,
314
GtkHTMLFontStyle and_mask,
315
GtkHTMLFontStyle or_mask,
316
HTMLUndoDirection dir)
310
318
HTMLEmptyParaSetStyle *undo;
311
319
GtkHTMLFontStyle old_or_mask;
331
339
html_engine_set_font_style (HTMLEngine *e,
332
GtkHTMLFontStyle and_mask,
333
GtkHTMLFontStyle or_mask)
340
GtkHTMLFontStyle and_mask,
341
GtkHTMLFontStyle or_mask)
336
344
GtkHTMLFontStyle old = e->insertion_font_style;
401
inc_dec_size_cb (HTMLObject *o, HTMLEngine *e, gpointer data)
411
inc_dec_size_cb (HTMLObject *o,
403
415
if (html_object_is_text (o)) {
404
416
html_text_set_font_style (HTML_TEXT (o), e, inc_dec_size (HTML_TEXT (o)->font_style, GPOINTER_TO_INT (data)));
411
html_engine_font_size_inc_dec (HTMLEngine *e, gboolean inc)
423
html_engine_font_size_inc_dec (HTMLEngine *e,
413
426
if (html_engine_is_selection_active (e))
414
427
html_engine_cut_and_paste (e,
521
540
static HTMLObject *
522
html_engine_text_style_object (HTMLEngine *e, gint *offset)
541
html_engine_text_style_object (HTMLEngine *e,
524
544
if (HTML_IS_TEXT (e->cursor->object)
525
545
|| (e->cursor->offset && e->cursor->offset != html_object_get_length (e->cursor->object))) {