Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 23, 2004, 3:40:04 PM (21 years ago)
Author:
bensch
Message:

orxonox/branches/updater: ProgressBar works, just a funny play-thing…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/updater/src/gui/orxonox_gui_update.cc

    r3258 r3259  
    5959  updateWindow = new Window ("dampfen::update");   
    6060  Window::addWindow(updateWindow);
    61  
    6261  updateWindowBox = new Box ('v');
    6362
    64   updateData = new Button ("update orxonox::Data");
    65 
    66 #ifdef HAVE_GTK2
    67   updateData->connectSignal("button_press_event", updateData, updateDataFunc);
    68 #endif /* HAVE_GTK2 */
    69   updateWindowBox->fill (updateData);
    70 
    71   updateSource = new Button ("update orxonox::Source");
    72 #ifdef HAVE_GTK2
    73   updateSource->connectSignal("button_press_event", updateData, updateSourceFunc);
    74 #endif /* HAVE_GTK2 */
    75   updateWindowBox->fill (updateSource);
     63  updateDataWindowCreate();
     64  updateWindowBox->fill (updateDataWindowGetButton());
     65  updateSourceWindowCreate();
     66  updateWindowBox->fill (updateSourceWindowGetButton());
    7667 
    7768  // the close-Button of the Update Window.
     
    10394}
    10495
     96void OrxonoxGuiUpdate::updateDataWindowCreate (void)
     97{
     98
     99  updateData = new Button ("update orxonox::Data");
     100
     101#ifdef HAVE_GTK2
     102  updateData->connectSignal("button_press_event", updateData, updateDataFunc);
     103#endif /* HAVE_GTK2 */
     104 
     105
     106}
     107
     108Button* OrxonoxGuiUpdate::updateDataWindowGetButton(void)
     109{
     110  return updateData;
     111}
     112
     113void OrxonoxGuiUpdate::updateSourceWindowCreate (void)
     114{
     115  // the button, that opens this Window.
     116  updateSource = new Button ("update orxonox::Source");
     117
     118  // the Window itself
     119  updateSourceWindow = new Window ("update orxonox::Source");
     120  updateSourceWindow->connectSignal("destroy", updateSourceWindow, Window::windowClose);
     121  updateSourceWindow->connectSignal("delete_event", updateSourceWindow, Window::windowClose);
     122
     123  updateSourceWindowBox = new Box ();
     124
     125  updateSourceBar = new ProgressBar ();
     126  updateSourceWindowBox->fill(updateSourceBar);
     127  test = new Button ("increment");
     128  test->connectSignal("button_press_event", updateSourceBar, updateSourceFunc);
     129  updateSourceWindowBox->fill(test);
     130  updateSourceWindow->fill(updateSourceWindowBox);
     131#ifdef HAVE_GTK2
     132  updateSource->connectSignal("button_press_event", updateSourceWindow, Window::windowOpen);
     133#endif /* HAVE_GTK2 */
     134
     135}
     136
     137Button* OrxonoxGuiUpdate::updateSourceWindowGetButton(void)
     138{
     139  return updateSource;
     140}
     141
    105142
    106143#ifdef HAVE_GTK2
     
    122159   \param button The Button, that triggered this event.
    123160*/
    124 gint OrxonoxGuiUpdate::updateSourceFunc(GtkWidget* w, GdkEventKey* event, void* button)
     161gint OrxonoxGuiUpdate::updateSourceFunc(GtkWidget* w, GdkEventKey* event, void* bar)
    125162{
    126 
     163  ProgressBar* tmpBar = static_cast<ProgressBar*>(bar);
     164  tmpBar->setTotalSize(20);
     165  tmpBar->setProgress(tmpBar->getProgress()+1);
    127166}
    128167
Note: See TracChangeset for help on using the changeset viewer.