Mercurial > hg > xemacs-beta
comparison src/frame-x.c @ 219:262b8bb4a523 r20-4b8
Import from CVS: tag r20-4b8
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:09:35 +0200 |
parents | d44af0c54775 |
children | 2c611d1463a6 |
comparison
equal
deleted
inserted
replaced
218:c9f226976f56 | 219:262b8bb4a523 |
---|---|
1725 static void | 1725 static void |
1726 x_create_widgets (struct frame *f, Lisp_Object lisp_window_id, | 1726 x_create_widgets (struct frame *f, Lisp_Object lisp_window_id, |
1727 Lisp_Object parent) | 1727 Lisp_Object parent) |
1728 { | 1728 { |
1729 struct device *d = XDEVICE (f->device); | 1729 struct device *d = XDEVICE (f->device); |
1730 Visual *visual = DEVICE_X_VISUAL (d); | |
1731 int depth = DEVICE_X_DEPTH (d); | |
1732 Colormap cmap = DEVICE_X_COLORMAP (d); | |
1730 #ifdef EXTERNAL_WIDGET | 1733 #ifdef EXTERNAL_WIDGET |
1731 Window window_id = 0; | 1734 Window window_id = 0; |
1732 #endif | 1735 #endif |
1733 CONST char *name; | 1736 CONST char *name; |
1734 Arg al [25]; | 1737 Arg al [25]; |
1808 #endif /* EXTERNAL_WIDGET */ | 1811 #endif /* EXTERNAL_WIDGET */ |
1809 { | 1812 { |
1810 XtSetArg (al[ac], XtNinput, True); ac++; | 1813 XtSetArg (al[ac], XtNinput, True); ac++; |
1811 XtSetArg (al[ac], XtNminWidthCells, 10); ac++; | 1814 XtSetArg (al[ac], XtNminWidthCells, 10); ac++; |
1812 XtSetArg (al[ac], XtNminHeightCells, 1); ac++; | 1815 XtSetArg (al[ac], XtNminHeightCells, 1); ac++; |
1816 XtSetArg (al[ac], XtNvisual, visual); ac++; | |
1817 XtSetArg (al[ac], XtNdepth, depth); ac++; | |
1818 XtSetArg (al[ac], XtNcolormap, cmap); ac++; | |
1813 } | 1819 } |
1814 | 1820 |
1815 if (!NILP (parent)) | 1821 if (!NILP (parent)) |
1816 { | 1822 { |
1817 parentwid = FRAME_X_SHELL_WIDGET (XFRAME (parent)); | 1823 parentwid = FRAME_X_SHELL_WIDGET (XFRAME (parent)); |
1831 al, ac); | 1837 al, ac); |
1832 FRAME_X_SHELL_WIDGET (f) = shell; | 1838 FRAME_X_SHELL_WIDGET (f) = shell; |
1833 maybe_set_frame_title_format (shell); | 1839 maybe_set_frame_title_format (shell); |
1834 | 1840 |
1835 /* Create the manager widget */ | 1841 /* Create the manager widget */ |
1842 ac = 0; | |
1843 XtSetArg (al[ac], XtNvisual, visual); ac++; | |
1844 XtSetArg (al[ac], XtNdepth, depth); ac++; | |
1845 XtSetArg (al[ac], XtNcolormap, cmap); ac++; | |
1846 | |
1836 container = XtCreateWidget ("container", | 1847 container = XtCreateWidget ("container", |
1837 emacsManagerWidgetClass, shell, NULL, 0); | 1848 emacsManagerWidgetClass, shell, al, ac); |
1838 FRAME_X_CONTAINER_WIDGET (f) = container; | 1849 FRAME_X_CONTAINER_WIDGET (f) = container; |
1839 XtAddCallback (container, XtNresizeCallback, x_layout_widgets, | 1850 XtAddCallback (container, XtNresizeCallback, x_layout_widgets, |
1840 (XtPointer) f); | 1851 (XtPointer) f); |
1841 XtAddCallback (container, XtNqueryGeometryCallback, x_do_query_geometry, | 1852 XtAddCallback (container, XtNqueryGeometryCallback, x_do_query_geometry, |
1842 (XtPointer) f); | 1853 (XtPointer) f); |
1843 | 1854 |
1844 /* Create the text area */ | 1855 /* Create the text area */ |
1845 XtSetArg (al [0], XtNborderWidth, 0); /* should this be settable? */ | 1856 ac = 0; |
1846 XtSetArg (al [1], XtNemacsFrame, f); | 1857 XtSetArg (al[ac], XtNvisual, visual); ac++; |
1847 text = XtCreateWidget (name, emacsFrameClass, container, al, 2); | 1858 XtSetArg (al[ac], XtNdepth, depth); ac++; |
1859 XtSetArg (al[ac], XtNcolormap, cmap); ac++; | |
1860 XtSetArg (al[ac], XtNborderWidth, 0); ac++; /* should this be settable? */ | |
1861 XtSetArg (al[ac], XtNemacsFrame, f); ac++; | |
1862 text = XtCreateWidget (name, emacsFrameClass, container, al, ac); | |
1848 FRAME_X_TEXT_WIDGET (f) = text; | 1863 FRAME_X_TEXT_WIDGET (f) = text; |
1849 | 1864 |
1850 #ifdef HAVE_MENUBARS | 1865 #ifdef HAVE_MENUBARS |
1851 /* Create the initial menubar widget. */ | 1866 /* Create the initial menubar widget. */ |
1852 menubar_visible = x_initialize_frame_menubar (f); | 1867 menubar_visible = x_initialize_frame_menubar (f); |