Lines Matching full:context
33 struct Context
88 Context *context = (Context *) gtk_object_get_data(GTK_OBJECT(app), "context");
100 if (context->paragraph != NULL) {
101 delete context->paragraph;
104 context->paragraph = newPara;
108 context->paragraph->breakLines(context->width, context->height);
203 gint eventConfigure(GtkWidget */*widget*/, GdkEventConfigure *event, Context *context)
205 if (context->paragraph != NULL) {
206 context->width = event->width;
207 context->height = event->height;
209 if (context->width > 0 && context->height > 0) {
210 context->paragraph->breakLines(context->width, context->height);
217 gint eventExpose(GtkWidget *widget, GdkEvent */*event*/, Context *context)
219 if (context->paragraph != NULL) {
220 gint maxLines = context->paragraph->getLineCount() - 1;
221 gint firstLine = 0, lastLine = context->height / context->paragraph->getLineHeight();
224 context->paragraph->draw(&surface, firstLine, (maxLines < lastLine)? maxLines : lastLine);
232 Context *context = new Context();
234 context->width = 600;
235 context->height = 400;
236 context->paragraph = Paragraph::paragraphFactory(fileName, font, guiSupport);
241 gtk_object_set_data(GTK_OBJECT(app), "context", context);
266 context);
271 context);
282 Context *context = (Context *) gtk_object_get_data(GTK_OBJECT(app), "context");
284 if (context->paragraph != NULL) {
285 delete context->paragraph;
288 delete context;