+ frame.ulabel = texture->render(frame.label_w, frame.label_h, frame.ulabel);
+ if (! frame.ulabel)
+ frame.ulabel_pixel = texture->color().pixel();
+}
+
+
+void BlackboxWindow::createHandle(void) {
+ frame.handle = createChildWindow(frame.window);
+ blackbox->saveWindowSearch(frame.handle, this);
+
+ frame.left_grip =
+ createChildWindow(frame.handle, blackbox->getLowerLeftAngleCursor());
+ blackbox->saveWindowSearch(frame.left_grip, this);
+
+ frame.right_grip =
+ createChildWindow(frame.handle, blackbox->getLowerRightAngleCursor());
+ blackbox->saveWindowSearch(frame.right_grip, this);
+}
+
+
+void BlackboxWindow::destroyHandle(void) {
+ if (frame.fhandle)
+ screen->getImageControl()->removeImage(frame.fhandle);
+
+ if (frame.uhandle)
+ screen->getImageControl()->removeImage(frame.uhandle);
+
+ if (frame.fgrip)
+ screen->getImageControl()->removeImage(frame.fgrip);
+
+ if (frame.ugrip)
+ screen->getImageControl()->removeImage(frame.ugrip);
+
+ blackbox->removeWindowSearch(frame.left_grip);
+ blackbox->removeWindowSearch(frame.right_grip);
+
+ XDestroyWindow(blackbox->getXDisplay(), frame.left_grip);
+ XDestroyWindow(blackbox->getXDisplay(), frame.right_grip);
+ frame.left_grip = frame.right_grip = None;
+
+ blackbox->removeWindowSearch(frame.handle);
+ XDestroyWindow(blackbox->getXDisplay(), frame.handle);
+ frame.handle = None;
+}
+
+
+void BlackboxWindow::createTitlebar(void) {
+ frame.title = createChildWindow(frame.window);
+ frame.label = createChildWindow(frame.title);
+ blackbox->saveWindowSearch(frame.title, this);
+ blackbox->saveWindowSearch(frame.label, this);
+
+ if (decorations & Decor_Iconify) createIconifyButton();
+ if (decorations & Decor_Maximize) createMaximizeButton();
+ if (decorations & Decor_Close) createCloseButton();
+}
+
+
+void BlackboxWindow::destroyTitlebar(void) {
+ if (frame.close_button)
+ destroyCloseButton();
+
+ if (frame.iconify_button)
+ destroyIconifyButton();
+
+ if (frame.maximize_button)
+ destroyMaximizeButton();
+
+ if (frame.ftitle)
+ screen->getImageControl()->removeImage(frame.ftitle);
+
+ if (frame.utitle)
+ screen->getImageControl()->removeImage(frame.utitle);
+
+ if (frame.flabel)
+ screen->getImageControl()->removeImage(frame.flabel);
+
+ if( frame.ulabel)
+ screen->getImageControl()->removeImage(frame.ulabel);
+
+ if (frame.fbutton)
+ screen->getImageControl()->removeImage(frame.fbutton);
+
+ if (frame.ubutton)
+ screen->getImageControl()->removeImage(frame.ubutton);
+
+ if (frame.pbutton)
+ screen->getImageControl()->removeImage(frame.pbutton);
+
+ blackbox->removeWindowSearch(frame.title);
+ blackbox->removeWindowSearch(frame.label);
+
+ XDestroyWindow(blackbox->getXDisplay(), frame.label);
+ XDestroyWindow(blackbox->getXDisplay(), frame.title);
+ frame.title = frame.label = None;