Index: uspace/app/uidemo/uidemo.c
===================================================================
--- uspace/app/uidemo/uidemo.c	(revision ef734b78b1ad5a89163b14e6f38f206aa9b6e636)
+++ uspace/app/uidemo/uidemo.c	(revision bfb055b5d8b4b517c36ae0332c76d2f90f85bd12)
@@ -43,4 +43,7 @@
 #include <ui/image.h>
 #include <ui/label.h>
+#include <ui/menubar.h>
+#include <ui/menuentry.h>
+#include <ui/menu.h>
 #include <ui/pbutton.h>
 #include <ui/resource.h>
@@ -80,4 +83,6 @@
 	.moved = slider_moved
 };
+
+static void uidemo_file_exit(ui_menu_entry_t *, void *);
 
 /** Window close button was clicked.
@@ -185,4 +190,16 @@
 }
 
+/** File/exit menu entry selected.
+ *
+ * @param mentry Menu entry
+ * @param arg Argument (demo)
+ */
+static void uidemo_file_exit(ui_menu_entry_t *mentry, void *arg)
+{
+	ui_demo_t *demo = (ui_demo_t *) arg;
+
+	ui_quit(demo->ui);
+}
+
 /** Run UI demo on display server. */
 static errno_t ui_demo(const char *display_spec)
@@ -198,4 +215,9 @@
 	gfx_bitmap_t *bitmap;
 	gfx_coord2_t off;
+	ui_menu_entry_t *mfoo;
+	ui_menu_entry_t *mbar;
+	ui_menu_entry_t *mfoobar;
+	ui_menu_entry_t *mexit;
+	ui_menu_entry_t *mabout;
 	errno_t rc;
 
@@ -212,5 +234,5 @@
 	params.rect.p0.y = 0;
 	params.rect.p1.x = 220;
-	params.rect.p1.y = 340;
+	params.rect.p1.y = 350;
 
 	memset((void *) &demo, 0, sizeof(demo));
@@ -235,4 +257,97 @@
 	}
 
+	rc = ui_menu_bar_create(ui_res, &demo.mbar);
+	if (rc != EOK) {
+		printf("Error creating menu bar.\n");
+		return rc;
+	}
+
+	rc = ui_menu_create(demo.mbar, "File", &demo.mfile);
+	if (rc != EOK) {
+		printf("Error creating menu.\n");
+		return rc;
+	}
+
+	rc = ui_menu_entry_create(demo.mfile, "Foo", &mfoo);
+	if (rc != EOK) {
+		printf("Error creating menu.\n");
+		return rc;
+	}
+
+	rc = ui_menu_entry_create(demo.mfile, "Bar", &mbar);
+	if (rc != EOK) {
+		printf("Error creating menu.\n");
+		return rc;
+	}
+
+	rc = ui_menu_entry_create(demo.mfile, "Foobar", &mfoobar);
+	if (rc != EOK) {
+		printf("Error creating menu.\n");
+		return rc;
+	}
+
+	rc = ui_menu_entry_create(demo.mfile, "Exit", &mexit);
+	if (rc != EOK) {
+		printf("Error creating menu.\n");
+		return rc;
+	}
+
+	ui_menu_entry_set_cb(mexit, uidemo_file_exit, (void *) &demo);
+
+	rc = ui_menu_create(demo.mbar, "Edit", &demo.medit);
+	if (rc != EOK) {
+		printf("Error creating menu.\n");
+		return rc;
+	}
+
+	rc = ui_menu_create(demo.mbar, "Preferences", &demo.mpreferences);
+	if (rc != EOK) {
+		printf("Error creating menu.\n");
+		return rc;
+	}
+
+	rc = ui_menu_create(demo.mbar, "Help", &demo.mhelp);
+	if (rc != EOK) {
+		printf("Error creating menu.\n");
+		return rc;
+	}
+
+	rc = ui_menu_entry_create(demo.mhelp, "About", &mabout);
+	if (rc != EOK) {
+		printf("Error creating menu.\n");
+		return rc;
+	}
+
+	rect.p0.x = 4;
+	rect.p0.y = 30;
+	rect.p1.x = 216;
+	rect.p1.y = 52;
+	ui_menu_bar_set_rect(demo.mbar, &rect);
+
+	rc = ui_fixed_add(demo.fixed, ui_menu_bar_ctl(demo.mbar));
+	if (rc != EOK) {
+		printf("Error adding control to layout.\n");
+		return rc;
+	}
+
+	rc = ui_entry_create(ui_res, "", &demo.entry);
+	if (rc != EOK) {
+		printf("Error creating entry.\n");
+		return rc;
+	}
+
+	rect.p0.x = 15;
+	rect.p0.y = 53;
+	rect.p1.x = 205;
+	rect.p1.y = 78;
+	ui_entry_set_rect(demo.entry, &rect);
+	ui_entry_set_halign(demo.entry, gfx_halign_center);
+
+	rc = ui_fixed_add(demo.fixed, ui_entry_ctl(demo.entry));
+	if (rc != EOK) {
+		printf("Error adding control to layout.\n");
+		return rc;
+	}
+
 	rc = ui_label_create(ui_res, "Text label", &demo.label);
 	if (rc != EOK) {
@@ -242,7 +357,7 @@
 
 	rect.p0.x = 60;
-	rect.p0.y = 37;
+	rect.p0.y = 88;
 	rect.p1.x = 160;
-	rect.p1.y = 50;
+	rect.p1.y = 101;
 	ui_label_set_rect(demo.label, &rect);
 	ui_label_set_halign(demo.label, gfx_halign_center);
@@ -263,7 +378,7 @@
 
 	rect.p0.x = 15;
-	rect.p0.y = 70;
+	rect.p0.y = 111;
 	rect.p1.x = 105;
-	rect.p1.y = 98;
+	rect.p1.y = 139;
 	ui_pbutton_set_rect(demo.pb1, &rect);
 
@@ -285,29 +400,10 @@
 
 	rect.p0.x = 115;
-	rect.p0.y = 70;
+	rect.p0.y = 111;
 	rect.p1.x = 205;
-	rect.p1.y = 98;
+	rect.p1.y = 139;
 	ui_pbutton_set_rect(demo.pb2, &rect);
 
 	rc = ui_fixed_add(demo.fixed, ui_pbutton_ctl(demo.pb2));
-	if (rc != EOK) {
-		printf("Error adding control to layout.\n");
-		return rc;
-	}
-
-	rc = ui_entry_create(ui_res, "", &demo.entry);
-	if (rc != EOK) {
-		printf("Error creating entry.\n");
-		return rc;
-	}
-
-	rect.p0.x = 15;
-	rect.p0.y = 110;
-	rect.p1.x = 205;
-	rect.p1.y = 135;
-	ui_entry_set_rect(demo.entry, &rect);
-	ui_entry_set_halign(demo.entry, gfx_halign_center);
-
-	rc = ui_fixed_add(demo.fixed, ui_entry_ctl(demo.entry));
 	if (rc != EOK) {
 		printf("Error adding control to layout.\n");
@@ -336,5 +432,5 @@
 
 	off.x = 15;
-	off.y = 145;
+	off.y = 155;
 	gfx_rect_translate(&off, &bparams.rect, &rect);
 
@@ -360,7 +456,7 @@
 
 	rect.p0.x = 15;
-	rect.p0.y = 180;
+	rect.p0.y = 190;
 	rect.p1.x = 140;
-	rect.p1.y = 200;
+	rect.p1.y = 210;
 	ui_checkbox_set_rect(demo.checkbox, &rect);
 
@@ -388,7 +484,7 @@
 
 	rect.p0.x = 15;
-	rect.p0.y = 210;
+	rect.p0.y = 220;
 	rect.p1.x = 140;
-	rect.p1.y = 230;
+	rect.p1.y = 240;
 	ui_rbutton_set_rect(demo.rb1, &rect);
 
@@ -407,7 +503,7 @@
 
 	rect.p0.x = 15;
-	rect.p0.y = 240;
+	rect.p0.y = 250;
 	rect.p1.x = 140;
-	rect.p1.y = 260;
+	rect.p1.y = 270;
 	ui_rbutton_set_rect(demo.rb2, &rect);
 
@@ -426,7 +522,7 @@
 
 	rect.p0.x = 15;
-	rect.p0.y = 270;
+	rect.p0.y = 280;
 	rect.p1.x = 140;
-	rect.p1.y = 290;
+	rect.p1.y = 300;
 	ui_rbutton_set_rect(demo.rb3, &rect);
 
@@ -446,7 +542,7 @@
 
 	rect.p0.x = 15;
-	rect.p0.y = 300;
+	rect.p0.y = 310;
 	rect.p1.x = 130;
-	rect.p1.y = 320;
+	rect.p1.y = 330;
 	ui_slider_set_rect(demo.slider, &rect);
 
