Home | History | Annotate | Download | only in layout

Lines Matching full:context

21 struct Context
28 typedef struct Context Context;
80 Context *context = (Context *) gtk_object_get_data(GTK_OBJECT(app), "context");
92 if (context->paragraph != NULL) {
93 pf_close(context->paragraph);
96 context->paragraph = newPara;
100 pf_breakLines(context->paragraph, context->width, context->height);
195 static gint eventConfigure(GtkWidget *widget, GdkEventConfigure *event, Context *context)
197 if (context->paragraph != NULL) {
198 context->width = event->width;
199 context->height = event->height;
201 if (context->width > 0 && context->height > 0) {
202 pf_breakLines(context->paragraph, context->width, context->height);
209 static gint eventExpose(GtkWidget *widget, GdkEvent *event, Context *context)
211 if (context->paragraph != NULL) {
212 gint maxLines = pf_getLineCount(context->paragraph) - 1;
213 gint firstLine = 0, lastLine = context->height / pf_getLineHeight(context->paragraph);
216 pf_draw(context->paragraph, surface, firstLine, (maxLines < lastLine)? maxLines : lastLine);
226 Context *context = NEW_ARRAY(Context, 1);
233 context->width = 600;
234 context->height = 400;
235 context->paragraph = pf_factory(fileName, font, guiSupport);
240 gtk_object_set_data(GTK_OBJECT(app), "context", context);
265 context);
270 context);
281 Context *context = (Context *) gtk_object_get_data(GTK_OBJECT(app), "context");
283 if (context->paragraph != NULL) {
284 pf_close(context->paragraph);
287 DELETE_ARRAY(context);