Home | History | Annotate | Download | only in layout

Lines Matching full:context

28 struct Context
50 void InitParagraph(HWND hwnd, Context *context)
54 if (context->paragraph != NULL) {
57 if (context->width > 0 && context->height > 0) {
58 context->paragraph->breakLines(context->width, context->height);
64 si.nMax = context->paragraph->getLineCount() - 1;
65 si.nPage = context->height / context->paragraph->getLineHeight();
120 Context *context;
143 context = new Context();
145 context->width = 600;
146 context->height = 400;
148 context->paragraph = Paragraph::paragraphFactory("Sample.txt", font, guiSupport);
149 SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) context);
160 context = (Context *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
161 context->width = LOWORD(lParam);
162 context->height = HIWORD(lParam);
164 InitParagraph(hwnd, context);
217 context = (Context *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
219 if (context->paragraph != NULL && si.nPos != vertPos) {
220 ScrollWindow(hwnd, 0, context->paragraph->getLineHeight() * (vertPos - si.nPos), NULL, NULL);
242 context = (Context *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
244 if (context->paragraph != NULL) {
250 lastLine = min (si.nPos + (le_int32) si.nPage, context->paragraph->getLineCount() - 1);
252 context->paragraph->draw(surface, firstLine, lastLine);
298 context = (Context *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
300 if (context->paragraph != NULL) {
301 delete context->paragraph;
304 context->paragraph = newParagraph;
305 InitParagraph(hwnd, context);
335 context = (Context *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
337 if (context != NULL && context->paragraph != NULL) {
338 delete context->paragraph;
341 delete context;