/[svn]/gigedit/trunk/src/dimregionedit.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/dimregionedit.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1195 by schoenebeck, Wed Apr 18 12:31:41 2007 UTC revision 1196 by persson, Fri May 18 10:19:36 2007 UTC
# Line 161  DimRegionEdit::DimRegionEdit() : Line 161  DimRegionEdit::DimRegionEdit() :
161      //TODO: the following would break drag&drop:   wSample->property_editable().set_value(false);  or this:    wSample->set_editable(false);      //TODO: the following would break drag&drop:   wSample->property_editable().set_value(false);  or this:    wSample->set_editable(false);
162      tooltips.set_tip(*wSample, _("Drop a sample here"));      tooltips.set_tip(*wSample, _("Drop a sample here"));
163      addProp(eUnityNote);      addProp(eUnityNote);
164        // prop_table.addProp(eUnityNote);
165      addHeader(_("Optional Settings"));      addHeader(_("Optional Settings"));
166      addProp(eSampleStartOffset);      addProp(eSampleStartOffset);
167      addProp(eChannelOffset);      addProp(eChannelOffset);
# Line 181  DimRegionEdit::DimRegionEdit() : Line 182  DimRegionEdit::DimRegionEdit() :
182      addProp(eSampleLoopInfinite);      addProp(eSampleLoopInfinite);
183      addProp(eSampleLoopPlayCount);      addProp(eSampleLoopPlayCount);
184    
185        Gtk::Requisition req = table[0]->size_request();
186        printf("w=%d h=%d\n", req.width, req.height);
187        req = eCrossfade_out_end.widget.size_request();
188        printf("widget: w=%d h=%d\n", req.width, req.height);
189    
190        Gtk::Allocation all = table[0]->get_allocation();
191        printf("allocation: w=%d h=%d\n", all.get_width(), all.get_height());
192    
193      nextPage();      nextPage();
194    
195      addHeader(_("General Amplitude Settings"));      addHeader(_("General Amplitude Settings"));
# Line 501  void DimRegionEdit::addProp(BoolEntry& b Line 510  void DimRegionEdit::addProp(BoolEntry& b
510      rowno++;      rowno++;
511  }  }
512    
513    void DimRegionEdit::addProp(BoolEntryPlus6& boolentry)
514    {
515        table[pageno]->attach(boolentry.widget, 1, 3, rowno, rowno + 1,
516                              Gtk::FILL, Gtk::SHRINK);
517        rowno++;
518    }
519    
520    PropTable::PropTable()
521    {
522        rowno = 0;
523        firstRowInBlock = 0;
524    
525        table = new Gtk::Table(3, 1);
526        table->set_col_spacings(7);
527        tables.push_back(table);
528    }
529    
530    void PropTable::addProp(LabelWidget& prop)
531    {
532        table->attach(prop.label, 1, 2, rowno, rowno + 1,
533                      Gtk::FILL, Gtk::SHRINK);
534        table->attach(prop.widget, 2, 3, rowno, rowno + 1,
535                      Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK);
536        rowno++;
537    }
538    
539    void PropTable::nextPage()
540    {
541        if (firstRowInBlock < rowno - 1)
542        {
543            Gtk::Label* filler = new Gtk::Label("    ");
544            table->attach(*filler, 0, 1, firstRowInBlock, rowno,
545                          Gtk::FILL, Gtk::SHRINK);
546        }
547        table = new Gtk::Table(3, 1);
548        table->set_col_spacings(7);
549        tables.push_back(table);
550        rowno = 0;
551        firstRowInBlock = 0;
552    }
553    
554  void DimRegionEdit::addProp(LabelWidget& prop)  void DimRegionEdit::addProp(LabelWidget& prop)
555  {  {
556      table[pageno]->attach(prop.label, 1, 2, rowno, rowno + 1,      table[pageno]->attach(prop.label, 1, 2, rowno, rowno + 1,

Legend:
Removed from v.1195  
changed lines
  Added in v.1196

  ViewVC Help
Powered by ViewVC