/** * Copyright Mikael Högdahl - triyana@users.sourceforge.net * * This source is distributed under the terms of the Q Public License version 1.0, * created by Trolltech (www.trolltech.com). */ #include "Fl_Find.h" #include "Fl_Defines.h" #include #include /** * Create a search word dialog * @param MHVector* - Vector with selection strings */ Fl_Find::Fl_Find () : Fl_Dialog (450, 140, "Enter Search/Replace Word") { Fl_Window* o = this; o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); o->selection_color(FL_BACKGROUND_COLOR); o->labeltype(FL_NO_LABEL); o->labelfont(0); o->labelsize(14); o->labelcolor(FL_BLACK); o->align(FL_ALIGN_TOP); o->when(FL_WHEN_NEVER); { Fl_Input* o = aFind = new Fl_Input(85, 5, 355, 25, "Find"); o->box(FL_THIN_DOWN_BOX); o->labelfont(1); o->when(FL_WHEN_CHANGED); } { Fl_Input* o = aReplace = new Fl_Input(85, 35, 355, 25, "Replace"); o->box(FL_THIN_DOWN_BOX); o->labelfont(1); o->when(FL_WHEN_CHANGED); } { Fl_Check_Button* o = aCase = new Fl_Check_Button(155, 60, 285, 25, "Case Sensitive"); o->down_box(FL_THIN_DOWN_BOX); o->labelfont(1); o->align(FL_ALIGN_LEFT); } { Fl_Check_Button* o = aBegin = new Fl_Check_Button(155, 85, 285, 25, "From Beginning"); o->down_box(FL_THIN_DOWN_BOX); o->labelfont(1); o->align(FL_ALIGN_LEFT); } { Fl_Return_Button* o = aFindButton = new Fl_Return_Button(10, 110, 140, 25, "&Find"); o->box(FL_THIN_UP_BOX); } { Fl_Button* o = aReplaceButton = new Fl_Button(160, 110, 150, 25, "&Replace"); o->box(FL_THIN_UP_BOX); } { Fl_Button* o = aCloseButton = new Fl_Button(320, 110, 120, 25, "&Close"); o->box(FL_THIN_UP_BOX); } o->end(); aCloseButton->callback (Fl_Dialog::cb1_, this); aFindButton->callback (Fl_Dialog::cb2_, this); aReplaceButton->callback (Fl_Dialog::cb3_, this); aReplaceButton->deactivate(); }