changeset 1795:0099818bc45b

some UI constants
author corvid <corvid@lavabit.com>
date Thu, 06 Jan 2011 03:38:57 +0000
parents a973b2fa80aa
children 32fc5dc5f549
files dw/fltkpreview.cc dw/fltkui.cc src/dialog.cc src/findbar.cc src/ui.cc src/uicmd.cc
diffstat 6 files changed, 27 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/dw/fltkpreview.cc	Thu Jan 06 03:09:45 2011 +0000
+++ b/dw/fltkpreview.cc	Thu Jan 06 03:38:57 2011 +0000
@@ -169,7 +169,7 @@
 FltkPreviewWindow::FltkPreviewWindow (dw::core::Layout *layout):
    MenuWindow (1, 1)
 {
-   box (EMBOSSED_BOX);
+   box (FL_EMBOSSED_BOX);
 
    begin ();
    preview = new FltkPreview (BORDER_WIDTH, BORDER_WIDTH, 1, 1, layout);
--- a/dw/fltkui.cc	Thu Jan 06 03:09:45 2011 +0000
+++ b/dw/fltkui.cc	Thu Jan 06 03:38:57 2011 +0000
@@ -432,7 +432,7 @@
    button->callback (widgetCallback, this);
    button->when (FL_WHEN_RELEASE);
    if (!relief)
-      button->box(::fltk::FLAT_BOX);
+      button->box(FL_FLAT_BOX);
 
    flatView = new FltkFlatView (allocation->x + reliefXThickness (),
                                 allocation->y + reliefYThickness (),
@@ -483,7 +483,7 @@
 
    if (label) {
       input->label(label);
-      input->set_flag(::fltk::ALIGN_INSIDE_LEFT);
+      input->set_flag(FL_ALIGN_INSIDE);
    }
    if (initText)
       input->value (initText);
--- a/src/dialog.cc	Thu Jan 06 03:09:45 2011 +0000
+++ b/src/dialog.cc	Thu Jan 06 03:38:57 2011 +0000
@@ -197,8 +197,8 @@
     window->resizable(ib);
 
     Widget *box = new Widget(0,0,ww,wh-bh, QuestionTxt);
-    box->box(DOWN_BOX);
-    box->labelfont(HELVETICA_BOLD_ITALIC);
+    box->box(FL_DOWN_BOX);
+    box->labelfont(FL_HELVETICA_BOLD_ITALIC);
     box->labelsize(14);
 
     HighlightButton *b;
@@ -207,8 +207,8 @@
     xpos += gap;
     for (int i=1; i <= nb; ++i) {
        b = new HighlightButton(xpos, wh-bh, bw, bh, txt[i]);
-       b->align(ALIGN_WRAP|ALIGN_CLIP);
-       b->box(UP_BOX);
+       b->align(FL_ALIGN_WRAP|FL_ALIGN_CLIP);
+       b->box(FL_UP_BOX);
        b->callback(choice5_cb, INT2VOIDP(i));
        xpos += bw + gap;
     }
@@ -253,9 +253,9 @@
    /* message */
    WordwrapOutput *message_output =
       new WordwrapOutput(20,20,window_w-40,100);
-   message_output->box(DOWN_BOX);
+   message_output->box(FL_DOWN_BOX);
    message_output->text(message);
-   message_output->textfont(HELVETICA_BOLD_ITALIC);
+   message_output->textfont(FL_HELVETICA_BOLD_ITALIC);
    message_output->textsize(14);
 
    /* inputs */
--- a/src/findbar.cc	Thu Jan 06 03:09:45 2011 +0000
+++ b/src/findbar.cc	Thu Jan 06 03:38:57 2011 +0000
@@ -117,7 +117,7 @@
    int x = border;
    height -= 2 * border;
 
-   box(PLASTIC_UP_BOX);
+   box(FL_PLASTIC_UP_BOX);
    Group::hide();
 
    begin();
--- a/src/ui.cc	Thu Jan 06 03:09:45 2011 +0000
+++ b/src/ui.cc	Thu Jan 06 03:38:57 2011 +0000
@@ -505,12 +505,12 @@
    ProgBox->begin();
     // Images
     IProg = new CustProgressBox(0,0,0,0);
-    IProg->box(thin_up ? THIN_UP_BOX : EMBOSSED_BOX);
+    IProg->box(thin_up ? FL_THIN_UP_BOX : FL_EMBOSSED_BOX);
     IProg->labelcolor(GRAY10);
     IProg->update_label(wide ? "Images\n0 of 0" : "0 of 0");
     // Page
     PProg = new CustProgressBox(0,0,0,0);
-    PProg->box(thin_up ? THIN_UP_BOX : EMBOSSED_BOX);
+    PProg->box(thin_up ? FL_THIN_UP_BOX : FL_EMBOSSED_BOX);
     PProg->labelcolor(GRAY10);
     PProg->update_label(wide ? "Page\n0.0KB" : "0.0KB");
    ProgBox->type(PackedGroup::ALL_CHILDREN_VERTICAL);
@@ -537,7 +537,7 @@
       h = fh;
    btn->resize(w+padding,h);
    _MSG("UI::make_filemenu_button w=%d h=%d padding=%d\n", w, h, padding);
-   btn->box(PanelSize == P_large ? FLAT_BOX : THIN_UP_BOX);
+   btn->box(PanelSize == P_large ? FL_FLAT_BOX : FL_THIN_UP_BOX);
    btn->callback(filemenu_cb, this);
    if (prefs.show_tooltip)
       btn->tooltip("File menu");
@@ -593,7 +593,7 @@
       g1 = new Group(0,0,ww,bh);
        // Toolbar
        pg = make_toolbar(ww,bh);
-       pg->box(EMBOSSED_BOX);
+       pg->box(FL_EMBOSSED_BOX);
        g1->add(pg);
        w = make_filemenu_button();
        pg->add(w);
@@ -611,7 +611,7 @@
         // File menu
         if (PanelSize == P_large) {
            g3 = new Group(0,0,ww,lh);
-           g3->box(FLAT_BOX);
+           g3->box(FL_FLAT_BOX);
            Widget *bn = make_filemenu_button();
            g3->add(bn);
            g3->add_resizable(*new InvisibleBox(bn->w(),0,ww - bn->w(),lh));
@@ -648,8 +648,8 @@
         pg->add(w);
 
        g3->resizable(pg); // Better than 'w3' and it also works
-       pg->box(BORDER_FRAME);
-       //g3->box(EMBOSSED_BOX);
+       pg->box(FL_BORDER_FRAME);
+       //g3->box(FL_EMBOSSED_BOX);
        g3->end();
 
       g1->resizable(g3);
@@ -670,7 +670,7 @@
    // Status box
    Status = new Output(0, 0, ww-bm_w, s_h, 0);
    Status->value("");
-   Status->box(THIN_DOWN_BOX);
+   Status->box(FL_THIN_DOWN_BOX);
    Status->clear_click_to_focus();
    Status->clear_tab_to_focus();
    Status->color(GRAY80);
@@ -680,8 +680,8 @@
    // Bug Meter
    BugMeter = new HighlightButton(ww-bm_w,0,bm_w,s_h,0);
    BugMeter->image(icons->ImgMeterOK);
-   BugMeter->box(THIN_DOWN_BOX);
-   BugMeter->align(ALIGN_INSIDE|ALIGN_CLIP|ALIGN_LEFT);
+   BugMeter->box(FL_THIN_DOWN_BOX);
+   BugMeter->align(FL_ALIGN_INSIDE|FL_ALIGN_CLIP|FL_ALIGN_LEFT);
    if (prefs.show_tooltip)
       BugMeter->tooltip("Show HTML bugs\n(right-click for menu)");
    BugMeter->callback(bugmeter_cb, this);
@@ -731,12 +731,12 @@
 
    // Render area
    Main = new Widget(0,0,1,1,"Welcome...");
-   Main->box(FLAT_BOX);
+   Main->box(FL_FLAT_BOX);
    Main->color(GRAY15);
-   Main->labelfont(HELVETICA_BOLD_ITALIC);
+   Main->labelfont(FL_HELVETICA_BOLD_ITALIC);
    Main->labelsize(36);
-   Main->labeltype(SHADOW_LABEL);
-   Main->labelcolor(WHITE);
+   Main->labeltype(FL_SHADOW_LABEL);
+   Main->labelcolor(FL_WHITE);
    TopGroup->add(Main);
    TopGroup->resizable(Main);
    MainIdx = TopGroup->find(Main);
@@ -1117,8 +1117,8 @@
    TopGroup->replace(MainIdx, nw);
    delete(Main);
    Main = &nw;
-   //TopGroup->box(DOWN_BOX);
-   //TopGroup->box(BORDER_FRAME);
+   //TopGroup->box(FL_DOWN_BOX);
+   //TopGroup->box(FL_BORDER_FRAME);
    TopGroup->resizable(TopGroup->child(MainIdx));
 }
 
--- a/src/uicmd.cc	Thu Jan 06 03:09:45 2011 +0000
+++ b/src/uicmd.cc	Thu Jan 06 03:38:57 2011 +0000
@@ -89,7 +89,7 @@
          setcolor(btn_hl ? 206 : GRAY75);
          fillrect(r);
          if (btn_hl) {
-            setcolor(WHITE);
+            setcolor(FL_WHITE);
             strokerect(r);
          }
          setcolor(GRAY10);