Пример #1
0
void DiscreteSlider::setActiveSection(int index) {
	if (_activeIndex != index) {
		_activeIndex = index;
		activateCallback();
	}
	setSelectedSection(index);
}
Пример #2
0
void MSPulldownMenu::activate(void)
{
  if (activateCallback(MSWidgetCallback::activate)==MSFalse)
  {
     if (item()!=0) item()->activate();
  }
  done(); 
}
Пример #3
0
	void _GuiWinButton_handleClick (GuiObject widget) {
		iam_button;
		if (my activateCallback != NULL) {
			struct structGuiButtonEvent event = { widget, 0 };
			try {
				my activateCallback (my activateBoss, & event);
			} catch (MelderError) {
				Melder_error_ ("Your click on button \"", widget -> name, "\" was not completely handled.");
				Melder_flushError (NULL);
			}
		}
	}
Пример #4
0
	static void _GuiGtkButton_activateCallback (GuiObject widget, gpointer void_me) {
		iam (GuiButton);
		struct structGuiButtonEvent event = { widget, 0 };
		if (my activateCallback != NULL) {
			try {
				my activateCallback (my activateBoss, & event);
			} catch (MelderError) {
				Melder_error_ ("Your click on button \"", GTK_WIDGET (widget) -> name, "\" was not completely handled.");
				Melder_flushError (NULL);
			}
		}
	}
Пример #5
0
// this method makes the widget appear to the toolkit as if it has been
// destructed - all that remains to do is destroy the window and
// recover the memory for the widget (delete widget).
// this method is primarily used from MSWidget::destroy to allow
// callback safe destruction of widgets
void MSWidget::prepareForDestruction(void)
{
  freeze();
  MSWidget *pTopWidget=top();
  if (_window!=0) _server->widgetHashTable()->remove(_window); // no more events 
  if (pTopWidget!=0) pTopWidget->removeFromFocusList(this);
  if (pTopWidget!=0&&pTopWidget->inputFocus()==this) (void)pTopWidget->traverseFocus(0);
  if (focusWindow()==this) _focusWindow=0;
  childDestroyNotify();
  activateCallback(MSWidgetCallback::destroy);
  removeAllCallbacks();
}
Пример #6
0
void MSTableColumn::columnWidth(unsigned cw_)
{
  if (columnWidth()!=cw_)
   {
     _columnWidth=cw_;
     if (table()!=0)
      {
	table()->adjustNumVisible();
	table()->redraw();
      }
     activateCallback(MSWidgetCallback::columnresize);
   }
}
Пример #7
0
	bool _GuiWinButton_tryToHandleShortcutKey (GuiObject widget) {
		iam_button;
		if (my activateCallback != NULL) {
			struct structGuiButtonEvent event = { widget, 0 };
			try {
				my activateCallback (my activateBoss, & event);
			} catch (MelderError) {
				Melder_error_ ("Your click on button \"", widget -> name, "\" was not completely handled.");
				Melder_flushError (NULL);
			}
			return true;
		}
		return false;
	}
Пример #8
0
MSBoolean AplusPopup::traverseFocus(MSWidget *newFocusWidget_)
{
  static MSSymbol takeFocusSymbol("takefocus");
  if (AplusShell::allowNestedTraversal())
   {
     MSBoolean lf=MSTrue;
     if (focusWidget()!=0&&focusWidget()!=newFocusWidget_) lf=loseFocusNotify(focusWidget());
     if (lf==MSTrue)
      {
	focusWidget(newFocusWidget_);
	takeFocusNotify(focusWidget());
	activateCallback(focusWidget(),takeFocusSymbol);
	return MSTrue;
      }
     return MSFalse;
   }
  else return MSPopup::traverseFocus(newFocusWidget_);
}
Пример #9
0
		void _GuiMacButton_handleClick (GuiObject widget, EventRecord *macEvent) {
			iam_button;
			_GuiMac_clipOnParent (widget);
			bool pushed = HandleControlClick (widget -> nat.control.handle, macEvent -> where, macEvent -> modifiers, NULL);
			GuiMac_clipOff ();
			if (pushed && my activateCallback != NULL) {
				struct structGuiButtonEvent event = { widget, 0 };
				//enum { cmdKey = 256, shiftKey = 512, optionKey = 2048, controlKey = 4096 };
				Melder_assert (macEvent -> what == mouseDown);
				event. shiftKeyPressed = (macEvent -> modifiers & shiftKey) != 0;
				event. commandKeyPressed = (macEvent -> modifiers & cmdKey) != 0;
				event. optionKeyPressed = (macEvent -> modifiers & optionKey) != 0;
				event. extraControlKeyPressed = (macEvent -> modifiers & controlKey) != 0;
				try {
					my activateCallback (my activateBoss, & event);
				} catch (MelderError) {
					Melder_error_ ("Your click on button \"", widget -> name, "\" was not completely handled.");
					Melder_flushError (NULL);
				}
			}
		}
Пример #10
0
void DiscreteSlider::timerEvent(QTimerEvent *e) {
	activateCallback();
}
Пример #11
0
void MSMenuBarItem::menushow()
{ activateCallback(MSWidgetCallback::menushow); }
Пример #12
0
void MSArrowButton::activate(void)
{
  if (isProtected()==MSFalse) activateCallback(MSWidgetCallback::activate);
}
Пример #13
0
void MSOptionMenu::activate(void)
{ activateCallback(MSWidgetCallback::activate); }
Пример #14
0
void MSWidget::selectionClear(const XEvent *)
{
  _server->copyBuffer("Selection Cleared");
  activateCallback(MSWidgetCallback::selectionclear);
}
Пример #15
0
void MSWidget::insertPrimarySelection(void)
{
  activateCallback(MSWidgetCallback::selectionnotify);  
}