Пример #1
0
/* allocate an internal menu */
static int id_in_use(int id)
{
  LVAL next;
  
  for (next = GetMenuList(); consp(next); next = cdr(next)) {
    if (id == get_menu_id(car(next))) return(TRUE);
  }
  return(FALSE);
}
Пример #2
0
BOOL IsLispMenuHandle(HMENU wParam)
{
  LVAL next;

  for (next = GetMenuList(); consp(next); next = cdr(next))
    if (StMObAllocated(car(next)) && wParam == get_menu_address(car(next)))
      return(TRUE);
  return(FALSE);
}
Пример #3
0
/* dispose of a menu */
VOID StMObDispose P1C(LVAL, menu)
{
  LVAL menu_list;
  
  if (StMObAllocated(menu)) StMObDisposeMach(menu);
  standard_hardware_clobber(menu);

  menu_list = GetMenuList();
  menu_list = remove_from_list(menu, menu_list);
  SetMenuList(menu_list);
}
Пример #4
0
BOOL IsLispMenuItem(WORD wParam)
{
  LVAL next;
  int m;

  m = MENUITEMMENU(wParam);
  for (next = GetMenuList(); consp(next); next = cdr(next))
    if (StMObAllocated(car(next)) && m == get_menu_id(car(next)))
      return(TRUE);
  return(FALSE);
}
Пример #5
0
/* find menu object with given hardware address */
LVAL get_menu_by_hardware(HMENU m)
{
  LVAL menu = NIL, next;

  for (next = GetMenuList();
       menu == NIL && consp(next); next = cdr(next))
    if (StMObAllocated(car(next)) && m == get_menu_address(car(next)))
      menu = car(next);

  if (menu == NIL) xlfail("can't find menu with this handle");
  return(menu);
}
Пример #6
0
void GameModel::SetColourSelectorColour(ui::Colour colour_)
{
	colour = colour_;
	notifyColourSelectorColourChanged();

	vector<Tool*> tools = GetMenuList()[SC_DECO]->GetToolList();
	for(int i = 0; i < tools.size(); i++)
	{
		((DecorationTool*)tools[i])->Red = colour.Red;
		((DecorationTool*)tools[i])->Green = colour.Green;
		((DecorationTool*)tools[i])->Blue = colour.Blue;
		((DecorationTool*)tools[i])->Alpha = colour.Alpha;
	}
}
Пример #7
0
/* allocate a menu and enter it into the list of allocated menus */
VOID StMObAllocate P1C(LVAL, menu)
{
  LVAL menu_list;
  
  StMObDispose(menu);

  StMObAllocateMach(menu);
  
  StMObEnable(menu, menu_enabled_p(menu));
  StMObAppendItems(menu, slot_value(menu, s_items));
    
  menu_list = GetMenuList();
  menu_list = xlcallsubr2(xadjoin, menu, menu_list);
  SetMenuList(menu_list);
}
Пример #8
0
void LispMenuSelect(WORD wParam)
{
  LVAL next;
  int m, i;

  m = MENUITEMMENU(wParam);
  i = MENUITEMITEM(wParam);
  for (next = GetMenuList(); consp(next); next = cdr(next)) {
    if (StMObAllocated(car(next)) && m == get_menu_id(car(next))) {
      if (InPopup) PopupItem = i + 1;
      else send_callback_message1(car(next), sk_select, i + 1);
      return;
    }
  }
}
Пример #9
0
//How to customize a context menu for a class
//Author: Ilka antcheva
   
{
   cl = gROOT->GetClass("TH1F");
   
   cl->MakeCustomMenuList();
   ml = cl->GetMenuList();
   
   ((TClassMenuItem*)ml->At(1))->SetTitle("Add histos...");
   ((TClassMenuItem*)ml->At(2))->SetTitle("Divide histos...");
   ((TClassMenuItem*)ml->At(3))->SetTitle("Draw panel...");
   ((TClassMenuItem*)ml->At(4))->SetTitle("Fit one function...");
   ((TClassMenuItem*)ml->At(5))->SetTitle("Fit panel...");
   ((TClassMenuItem*)ml->At(6))->SetTitle("Multiply histos...");
   ((TClassMenuItem*)ml->At(7))->SetTitle("Rebin...");
   ((TClassMenuItem*)ml->At(8))->SetTitle("Set maximum scale...");
   ((TClassMenuItem*)ml->At(9))->SetTitle("Set minimum scale...");
   ((TClassMenuItem*)ml->At(10))->SetTitle("Smooth histogram");
   ((TClassMenuItem*)ml->At(12))->SetTitle("Set name...");
   ((TClassMenuItem*)ml->At(13))->SetTitle("Set title...");
   ((TClassMenuItem*)ml->At(15))->SetTitle("Delete histogram");
   ((TClassMenuItem*)ml->At(16))->SetTitle("Draw class info");
   ((TClassMenuItem*)ml->At(17))->SetTitle("Draw clone");
   ((TClassMenuItem*)ml->At(18))->SetTitle("Dump information");
   ((TClassMenuItem*)ml->At(19))->SetTitle("Inspect");
   ((TClassMenuItem*)ml->At(20))->SetTitle("Set drawing option...");
   ((TClassMenuItem*)ml->At(22))->SetTitle("Set line attributes...");
   ((TClassMenuItem*)ml->At(24))->SetTitle("Set fill attributes...");
   ((TClassMenuItem*)ml->At(26))->SetTitle("Set marker attributes...");