BrowserToolbar::BrowserToolbar() : WToolbar(BRect(0, 0, 1, 1), "main toolbar") { BBitmap *icon = _RetrieveBitmap("back.png"); WToolbarButton *button = new WToolbarButton("Back", "Back", icon, new BMessage(kMsgNavBack)); AddItem(button, 0, W_TOOLBAR_LAST_POSITION); icon = _RetrieveBitmap("forward.png"); button = new WToolbarButton("Forward", "Forward", icon, new BMessage(kMsgNavForward)); AddItem(button, 0, W_TOOLBAR_LAST_POSITION); icon = _RetrieveBitmap("reload.png"); button = new WToolbarButton("Reload", "Reload", icon, new BMessage(kMsgNavReload)); AddItem(button, 0, W_TOOLBAR_LAST_POSITION); icon = _RetrieveBitmap("home.png"); button = new WToolbarButton("Home", "Home", icon, new BMessage(kMsgNavHome)); AddItem(button, 0, W_TOOLBAR_LAST_POSITION); AddItem(new WToolbarSeparator(), 0, W_TOOLBAR_LAST_POSITION); icon = _RetrieveBitmap("stop.png"); button = new WToolbarButton("Stop", "Stop", icon, new BMessage(kMsgNavStop)); AddItem(button, 0, W_TOOLBAR_LAST_POSITION); SetLabelPosition(W_TOOLBAR_LABEL_NONE); }
t_File::t_File(CProject* project,wxWindow* parent,int x0, int y0, int w, int h) :myFile(project,DISPLAY_DIALOG_TIMESTRING,parent,x0,y0,w,h,1) { int i; // first line DataFile= new wxMultiText(this,NULL,TIME_CURRENT,TIME_CURRENT_DEF, -1,-1,100,50,wxREADONLY); NewLine(); // second line (void) new wxMessage(this,TIME_SELECTED); Selected= new wxMessage(this,TIME_SELECTED_DEF); (void) new wxMessage(this,TIME_TOTAL); Total= new wxMessage(this,TIME_TOTAL_DEF); NewLine(); // third line (void) new wxMessage(this,TIME_START); Start= new wxMessage(this,TIME_START_DEF); (void) new wxMessage(this,TIME_END); End= new wxMessage(this,TIME_END_DEF); NewLine(); // fourth line ReverseScale = new wxCheckBox(this,(wxFunction)&ReverseClick,TIME_REVERSE); ReverseScale->SetValue(myProject.GetReverseScale()); NewLine(); // create Buttons for (i=0;i<4;i++) { Label[i]= new wxButton(this, DefaultButtonHandler(), myProject.NameSet(i).chars()); } NewLine(); // create tables int height=Timestring_ListHeight; int width=100; int spacing=10; // Create the first listbox long style; #ifdef wx_xt style=wxMULTIPLE|wxEXTENDED; #else style=wxEXTENDED; #endif SetLabelPosition(wxVERTICAL); Lists[0]= new wxListBox(this,(wxFunction)&ListBoxClick, NULL/*myProject.NameSet(0).chars()*/, style, -1,-1,width,height, 0,NULL, style ); // Now get Starting-positions int x=0,y=0; Lists[0]->GetPosition(&x,&y); // Create the other ones with the relevant coordinates for (i=1;i<4;i++) { // Calculate position x+=width+spacing; // Create listbox Lists[i]= new wxListBox(this, (wxFunction)&ListBoxClick, NULL/*myProject.NameSet(i).chars()*/, style, x,y,width,height, 0,NULL, style ); } SetLabelPosition(wxHORIZONTAL); NewLine(); // Create name-Change-buttons for (i=0;i<4;i++) { Edit[i]= new wxButton(this,DefaultButtonHandler(),TIME_EDIT); } NewLine(); // Adapt-Button-positions for (i=0;i<4;i++) { myAllign(Lists[i],Label[i],BTN_LABEL+i); myAllign(Lists[i],Edit[i],BTN_EDIT+i); } // start a new line NewLine(); // now create the other buttons myFile::CreateButtons(); // Update Display - especially the data in it... UpdateDisplay(); }