|
Support for GTK+ .
More...
#include "NME.h"
#include "NMEStyle.h"
#include <gtk/gtk.h>
Go to the source code of this file.
Data Structures |
struct | NMEGtkLinkCB |
| Private structure. More...
|
struct | NMEGtk |
| Private structure. More...
|
Defines |
#define | kMaxHeadingLevel 4 |
#define | kMaxListLevel 4 |
Typedefs |
typedef void(* | NMEGtkLinkFun )(NMEConstText link, void *data) |
| Callback to handle link clicks.
|
Functions |
void | NMEGtkInit (NMEGtk *nmegtk, GtkTextBuffer *textBuffer, int charSize) |
| Initialize NMEGtk data structure.
|
void | NMEGtkSetLinkFun (NMEGtk *nmegtk, NMEGtkLinkFun linkFun, void *linkFunData) |
| Set the callback which processes clicks on links.
|
void | NMEGtkApplyStyle (NMEGtk const *nmegtk, NMEStyleTable const *spanTable, NMEInt offset, NMEInt length, NMEConstText nmeTextForLinks) |
| Apply styles collected by NMEStyle to a GTK+ text buffer.
|
NMEErr | NMEGtkInsert (GtkTextBuffer *textBuffer, NMEGtk const *nmegtk, NMEConstText str, NMEInt len, NMEBoolean replaceSel, NMEBoolean links) |
| Insert text with NME markup in a GtkTextBuffer, calling NMEGtkApplyStyle.
|
Detailed Description
Support for GTK+ .
- Author:
- Yves Piguet.
- Copyright:
- 2007-2013, Yves Piguet
Definition in file NMEGtk.h.
Typedef Documentation
Callback to handle link clicks.
- Parameters:
-
[in] | link | raw link, as in NME source text, without leading and trailing spaces (null-terminated string) |
[in,out] | data | data value specific to the callback |
Definition at line 30 of file NMEGtk.h.
Function Documentation
Apply styles collected by NMEStyle to a GTK+ text buffer.
- Parameters:
-
[in] | nmegtk | data structure initialized by NMEGtkInit |
[in] | spanTable | table of style spans created by NMEProcess with NMEStyle |
[in] | offset | offset of NME output in textBuffer, in unicode characters |
[in] | length | length of NME output in unicode characters |
[in] | nmeTextForLinks | set hypertext links if source NME text, don't if NULL |
Definition at line 130 of file NMEGtk.c.
void NMEGtkInit |
( |
NMEGtk * |
nmegtk, |
|
|
GtkTextBuffer * |
textBuffer, |
|
|
int |
charSize |
|
) |
| |
Initialize NMEGtk data structure.
- Parameters:
-
[out] | nmegtk | data structure used by NMEGtkApplyStyle |
[in] | textBuffer | text buffer style is applied to |
[in] | charSize | standard text character size, used as the basis for heading sizes and superscript/subscript offsets |
Definition at line 18 of file NMEGtk.c.
Insert text with NME markup in a GtkTextBuffer, calling NMEGtkApplyStyle.
- Parameters:
-
[in,out] | textBuffer | GTK+ text buffer |
[in] | nmegtk | NMEGtk structure for textBuffer, initialized with NMEGtkInit |
[in] | str | text with NME markup |
[in] | len | length of str in bytes, or -1 if str is null-terminated |
[in] | replaceSel | if TRUE, replace selection, else replace whole text |
[in] | links | set hypertext links if TRUE |
Definition at line 221 of file NMEGtk.c.
Set the callback which processes clicks on links.
- Parameters:
-
[in,out] | nmegtk | data structure used by NMEGtkApplyStyle |
[in] | linkFun | callback which handles link clicks |
[in] | linkFunData | value passed to linkFun |
Definition at line 84 of file NMEGtk.c.
|
Generated by Doxygen.
Copyright 2007-2013, Yves Piguet.
All rights reserved.
|
|