- popup = new GrabshotPopup(this, menu_item->mode);
- popup->lock_window("GrabshotThread::start");
- for( int i=0; i<4; ++i )
- edge[i] = new BC_Popup(mwindow->gui, 0,0, 1,1, ORANGE, 1);
- mwindow->gui->grab_buttons();
- mwindow->gui->grab_cursor();
- popup->grab(mwindow->gui);
- popup->create_objects();
- popup->show_window();
- popup->unlock_window();
- done = 0;
- Thread::start();
-}
-
-void GrabshotThread::run()
-{
- popup->lock_window("GrabshotThread::run 0");
- while( !done ) {
- popup->update();
- popup->unlock_window();
- enable_cancel();
- Timer::delay(200);
- disable_cancel();
- popup->lock_window("GrabshotThread::run 1");
- }
- mwindow->gui->ungrab_cursor();
- mwindow->gui->ungrab_buttons();
- popup->ungrab(mwindow->gui);
- for( int i=0; i<4; ++i ) delete edge[i];
- popup->unlock_window();
- delete popup; popup = 0;
-}
-
-GrabshotPopup::GrabshotPopup(GrabshotThread *grab_thread, int mode)
- : BC_Popup(grab_thread->mwindow->gui, 0,0, 16,16, -1,1)
-{
- this->grab_thread = grab_thread;
- this->mode = mode;
- dragging = -1;
- grab_color = ORANGE;
- x0 = y0 = x1 = y1 = -1;
- lx0 = ly0 = lx1 = ly1 = -1;
-}
-GrabshotPopup::~GrabshotPopup()
-{