From b7b32344808bcd60d3a69ae6a997977b6fa6521b Mon Sep 17 00:00:00 2001 From: dmitry Date: Mon, 17 Dec 2012 09:27:45 +0300 Subject: [PATCH 1/3] =?UTF-8?q?=D0=BF=D1=80=D0=BE=D1=82=D0=BE=D0=BA=D0=BE?= =?UTF-8?q?=D0=BB=20=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D1=81=D0=BA=D0=B8=D1=85=20=D0=B4=D0=B5=D0=B9?= =?UTF-8?q?=D1=81=D1=82=D0=B2=D0=B8=D0=B9=20=D0=BC=D1=8B=D1=81=D0=BE=D0=B2?= =?UTF-8?q?=D1=81=D0=BA=D0=B8=EF=BF=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit решение проблем\моя команда -> узел с постоянной атомарной команда\вопросом --- components/common/menu.py | 1358 ++++++++--------- components/scg/base/scg_keynodes.py | 98 +- .../etc/questions_src/questions_keynodes.gwf | 646 ++++---- repo/fs_repo_src/include/_keynodes.scsy | 393 ++--- repo/fs_repo_src/include/etc_questions.scsy | 133 +- .../operation/get_my_command.m4scp | 361 +++++ repo/fs_repo_src/startup.scs | 77 +- repo/fs_repo_src/ui/menu/na_main_menu.gwf | 214 +-- .../na_main_menu/na_problems_solution.gwf | 214 +-- .../na_problems_solution/a_my_command.gwf | 85 ++ 10 files changed, 2020 insertions(+), 1559 deletions(-) create mode 100644 repo/fs_repo_src/operation/get_my_command.m4scp create mode 100644 repo/fs_repo_src/ui/menu/na_main_menu/na_problems_solution/a_my_command.gwf diff --git a/components/common/menu.py b/components/common/menu.py index 9dc8d23..114a0ed 100644 --- a/components/common/menu.py +++ b/components/common/menu.py @@ -1,679 +1,679 @@ -""" ------------------------------------------------------------------------------ -This source file is part of OSTIS (Open Semantic Technology for Intelligent Systems) -For the latest info, see http://www.ostis.net - -Copyright (c) 2010 OSTIS - -OSTIS is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -OSTIS is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with OSTIS. If not, see . ------------------------------------------------------------------------------ -""" - - -''' -Created on 21.10.2009 - -@author: Denis Koronchik - Max Kaskevich -''' - -import sys -import suit.core.kernel as core -import suit.core.objects as objects -import sc_core.constants as sc_constants -import sc_core.pm as sc -import ogre.io.OIS as ois -import ogre.renderer.OGRE as ogre -import suit.core.render.mygui as mygui -import suit.core.layout.LayoutGroup as layoutGroup -import suit.core.layout.LayoutGroupLine as layoutGroupLine -import suit.core.keynodes as keynodes -import suit.core.render.engine as render_engine -import menu_cmds -import suit.core.sc_utils as sc_utils - - -# log manager -logManager = core.Kernel.getSingleton().logManager -# session -session = core.Kernel.session() -# kernel object -kernel = core.Kernel.getSingleton() - -session = kernel.session() -session.open_segment(u"/ui/menu") -main_menu = session.find_keynode_full_uri(u"/ui/menu/main menu") - -menu_root = None -menu_layout_group = None - -_version_ = "0.2.0" -_name_ = "Menu" - -def initialize(): - # building menu - _buildMenu() - - global menu_root - global menu_layout_group - - # layout created menu - menu_layout_group = SCgMenuLayoutGroup(menu_root) - menu_root.callBackExpand = menu_layout_group._onExpand - menu_layout_group._layout(True) - - - -def shutdown(): - global menu_root - global menu_layout_group - menu_root.delete() - menu_layout_group = None - menu_root = None - - - -################### -# Generating menu # -################### -def _buildMenu(): - """Builds menu from sc memory - """ - global menu_root - menu_root = SCgMenuItem(u"", main_menu, None) - - -class Menu(objects.ObjectOverlay): - """Class that implement main window menu - @author: Max Kaskevich, Denis Koronchik - """ - - def __init__(self, caption = "Unknown"): - ''' - Constructor - ''' - objects.ObjectOverlay.__init__(self) - self._color = None - - #menu-button - self.button = None - self.icon = None - self._skin = "MenuItem" - self._icon_name = None - - self._icon_size = 15 - #menu-button position - #don`t use __view position methods because __view can be destroyed in method "hide()" - - #callbacks(should be functions with arg Menu) - self.callBackSetFocus = None - self.callBackLostFocus = None -# self.callBackRun = None - self.callBackExpand = None - - #states - self.__showed = False - self.__draged = False - self.__dragpoint = None - self.atom = None - self.question = False - - """self._move_time = 0.15 - self._auto_move = True - self._auto_move_pos = None - self._move_dt = self._move_time""" - self.autoSize = False - - self.position = (0, 0) - self.scale = (10, 14) - - self.textUpdateImpl = self._textUpdateImpl - - def __del__(self): - ''' - Destructor - ''' - objects.ObjectOverlay.__del__(self) - #if self.button: - #self.__gui.destroyWidget(self.button) - - def __setActions(self): - """set events listeners - """ - if self.button: - if self.callBackSetFocus: - self.button.subscribeEventMouseSetFocus(self, "setFocus") - self.button.subscribeEventKeySetFocus(self, "setFocus") - - if self.callBackLostFocus: - self.button.subscribeEventMouseLostFocus(self,"_lostFocus") - self.button.subscribeEventKeyLostFocus(self,"_lostFocus") - - self.button.subscribeEventMouseButtonClick(self,'_expandOrRun') - #self.button.subscribeEventMouseDrag(self,'_drag') - - def _setFocus(self, widget): - self.callBackSetFocus(self) - - def _lostFocus(self, widget): - self.callBackLostFocus(self) - - def _expandOrRun(self, widget): - """call run, expand or drop button in depends of states - """ - if self.__draged: - #drop - self.__dragpoint = None - self.__draged = False - else: - #if left alt pressed - #if core.Kernel.getSingleton().oisKeyboard.isKeyDown(ois.KC_LMENU): - - #call expand - if self.callBackExpand: - self.callBackExpand(self) -# else: -# #call run -# if self.callBackRun: -# self.callBackRun(self) - - def _textUpdateImpl(self): - if self.button is not None: - self.button.setCaption(self.getText()) - self.calculateAutoSize() - self.needTextUpdate = False - - def _updateView(self): - """Updates view representation of object - """ - """if self.needPositionUpdate: - if self.button is not None: - if self._auto_move: - self._move_dt = 0.0 - old_pos = self.button.getPosition() - self._auto_move_pos = (old_pos.left, old_pos.top) - else: - self.button.setPosition(self.position[0], self.position[1]) - self.needPositionUpdate = False""" - if self.needScaleUpdate: - if self.button is not None: - self.button.setSize(self.scale[0], self.scale[1]) - sz = max([0, min([self.scale[1] - 10, self._icon_size])]) - self.icon.setSize(sz, sz) - self.icon.setPosition(5, int(max([(self.scale[1] - sz) / 2.0, 0]))) - self.needScaleUpdate = False - - menu_layout_group._layout(True) - - objects.ObjectOverlay._updateView(self) - - def _update(self, _timeSinceLastFrame): - """Updates object - """ - objects.ObjectOverlay._update(self, _timeSinceLastFrame) - - # move object if need - """if self._auto_move and self._move_dt < self._move_time and self.button is not None: - self._move_dt += _timeSinceLastFrame - self._move_dt = min([self._move_dt, self._move_time]) - prop = self._move_dt / self._move_time - self.button.setPosition(int(self._auto_move_pos[0] + prop * (self.position[0] - self._auto_move_pos[0])), - int(self._auto_move_pos[1] + prop * (self.position[1] - self._auto_move_pos[1]))) - """ - - - def setAlpha(self, _value): - """Sets alpha value for item - """ - if self.button is not None: - self.button.setAlpha(_value) - - def show(self): - """show button - """ - if not self.__showed: - self.button = render_engine.Gui.createWidgetT("Button", - self._skin, - mygui.IntCoord(self.position[0], self.position[1], self.scale[0], self.scale[1]), - mygui.Align(), - "Popup", "") - self.icon = self.button.createWidgetT("StaticImage", - "StaticImage", - mygui.IntCoord(5, 5, 10, 10), - mygui.Align()) - - self.icon.setNeedKeyFocus(False) - self.icon.setNeedMouseFocus(False) - - if self._icon_name is not None: - self.icon.setImageTexture(self._icon_name) - - if self.getText() is not None: - self.button.setCaption(self.getText()) - self._widget = self.button - self.calculateAutoSize() - - self.__setActions() - self.__showed = True - - self.setEnabled(True) - self.setVisible(True) - -# self.setScale((170, 22)) - - def hide(self): - """hide button - """ - self.setEnabled(False) - self.setVisible(False) - - if self.__showed: - render_engine.Gui.destroyWidget(self.button) - self.__showed = False - self.button = None - - def calculateAutoSize(self): - """Set size of item to wrap caption - """ - if self.button: - tsize = self.button.getTextSize() - self.setScale((tsize.width + 50, tsize.height + 10)) - - def isShowed(self): - return self.__showed - - def setCaption(self, caption): - if self.button: - self.button.setCaption(caption) - self.calculateAutoSize() - - -class SCgMenuItem(Menu): - - def __init__(self, _caption, _sc_addr, _parent): - """Constructor - @param _caption: menu item caption - @type _caption: str - @param _sc_addr: sc_addr of node that represents menu item - @type _sc_addr: sc_addr - @param _parent: parent item - @type _parent: SCgMenuItem - """ - Menu.__init__(self, _caption) - self.childs = [] - #self.callBackExpand = self._expand - self.visible = False - self.parent = _parent - - self._color = None - - self._setScAddr(_sc_addr) - # check atom flag - self._checkAtom() - - - def __del__(self): - """Destructor - """ - Menu.__del__(self) - - def delete(self): - Menu.delete(self) - - def _expandOrRun(self, widget): - """Expands item or run event for atom class - """ - Menu._expandOrRun(self, widget) - if self.atom: - try: - self._run_event() - except RuntimeError, exc: - # FIXME: make more useful - global logManager - logManager.logError("Can't run event '%s': %s" % (self.getCaption(), str(exc))) - - def _run_event(self): - """Runs event attached to menu item - """ - menu_cmds.start_menu_cmd(self) - - - def _apendChildItem(self, _item): - """Appends child item - @param _item: child item to append - @type _item: SCgMenuItem - """ - if _item in self.childs: - raise RuntimeError("Item '%s' is already exists as child in item '%s'" % (item.getCaption(), self.getCaption())) - self.childs.append(_item) - _item.parent = self - - def _show(self): - """Show menu items - """ - if not self.visible: - self._parse() - for item in self.childs: - item.show() - - # make items on this level transparent - if self.parent is not None: - for item in self.parent.childs: - if item is not self: - item.setAlpha(0.5) - else: - raise RuntimeWarning("Menu '%s' already showed" % self.getCaption()) - - self.visible = True - - def _hide(self): - """Hide menu items - """ - if self.visible: - for item in self.childs: - item.hide() - #self.childs = [] - self.visible = False - - # make items on this level visible - if self.parent is not None: - for item in self.parent.childs: - item.setAlpha(1.0) - - else: - raise RuntimeWarning("Menu '%s' already hidden" % self.getCaption()) - - - def _parse(self): - """Parse menu item from sc-memory - @author: Denis Koronchik - """ - if len(self.childs) > 0: return # do nothing - - - current_translation = core.Kernel.getSingleton().getCurrentTranslation() - - # get child elements - session = core.Kernel.session() - #decomp = sc_utils.searchOneShotBinPairAttrFromNode(session, self._getScAddr(), keynodes.common.nrel_decomposition, sc.SC_CONST) - decomp = sc_utils.searchOneShotBinPairAttrToNode(session, self._getScAddr(), keynodes.common.nrel_decomposition, sc.SC_CONST) - - # parse child items - if decomp is not None: - it = session.create_iterator(session.sc_constraint_new(sc_constants.CONSTR_3_f_a_a, - decomp, - sc.SC_A_CONST | sc.SC_POS,# | sc.SC_PERMANENT, - sc.SC_N_CONST), True) - while not it.is_over(): - item_addr = it.value(2) - - item = SCgMenuItem(None, it.value(2), self) - item.setPosition(self.position) - self.childs.append(item) - - it.next() - - - def _checkAtom(self): - """Checks if menu item is atom menu class - """ - session = core.Kernel.session() - self._skin = "MenuItem" - self._color = "#ffffff" - - if sc_utils.checkIncToSets(session, self._getScAddr(), [keynodes.ui.atom_command], sc.SC_CONST): - self.atom = True - self._icon_name = sc_utils.getImageIdentifier(session, keynodes.ui.atom_command) - - # check if it is a question command - if sc_utils.checkIncToSets(session, self._getScAddr(), [keynodes.ui.question_command], sc.SC_CONST): - self.question = True - self._icon_name = sc_utils.getImageIdentifier(session, keynodes.ui.question_command) - return - - elif sc_utils.checkIncToSets(session, self._getScAddr(), [keynodes.ui.noatom_command], sc.SC_CONST): - self.atom = False - self._icon_name = sc_utils.getImageIdentifier(session, keynodes.ui.noatom_command) - return - else: #object - self.atom = False - self.question = False - return - - global logManager - logManager.logWarning("Unknown atom class for a menu item '%s'" % self.getCaption()) - - def setText(self, _text): - Menu.setText(self, _text) - - self.setCaption(_text) - - - def show(self): - """Overloaded show message to control tooltips - """ - Menu.show(self) - -class SCgMenuLayoutGroup(layoutGroup.LayoutGroupOverlay, ogre.WindowEventListener): - """Layouts menu by horizontal on window top - """ - - def __init__(self, _menuRoot): - """Constructor - """ - layoutGroup.LayoutGroupOverlay.__init__(self) - ogre.WindowEventListener.__init__(self) - - # list of horizontal layout groups - self.groups = {} - # render window size - self._updateWindowBounds() - - self.item_height = None - self.menu_root = _menuRoot - self._onExpand(self.menu_root) - - - # register listener for window events -# ogre.WindowEventUtilities.addWindowEventListener(self.renderWindow, self) - render_engine.registerWindowEventListener(self) - - - def __del__(self): - """Destructor - """ - layoutGroup.LayoutGroupOverlay.__del__(self) -# ogre.WindowEventUtilities.removeWindowEventListener(self.renderWindow, self) - render_engine.unregisterWindowEventListener(self) - - def _expandMain(self): - """Expands main menu - """ - self._onExpand(self.menu_root) - - def _apply(self): - """Apply layout algorithm - """ - for groups in self.groups.values(): - for group in groups: - group._layout(True) - layoutGroup.LayoutGroupOverlay._apply(self) - - def _onExpand(self, _menuItem): - """Notification for item expand - """ - - # check if menu expanded - if _menuItem.visible: - self.groups.pop(_menuItem) - # expanding child menus - for item in _menuItem.childs: - if self.groups.has_key(item): - self._onExpand(item) - - _menuItem._hide() - return - else: - # hiding menus with the same level - if _menuItem is not self.menu_root: - for item in _menuItem.parent.childs: - if self.groups.has_key(item): - self._onExpand(item) - # showing menu - _menuItem._show() - - - # update items - for item in _menuItem.childs: - item.calculateAutoSize() - item.callBackExpand = self._onExpand - - # check if it's a menu root item - if _menuItem is self.menu_root: - # create group - group = self._createGroupX((0, 0), self.width, layoutGroupLine.LayoutGroupLine2dX.Dir_pos, True) - self.groups[_menuItem] = [group] - width = 0 - y = 0 - # append items to groups - for item in _menuItem.childs: - sz = item.getScale() - - # store item height - if self.item_height is None: - self.item_height = sz[1] - - # create new group if we need - if width + sz[0] > self.width: - y += sz[1] - group = self._createGroupX((0, y), self.width, - layoutGroupLine.LayoutGroupLine2dX.Dir_pos, True) - width = 0 - self.groups[_menuItem].append(group) - # calculate new width - width += sz[0] - group.appendObject(item) - group.fit = False - - else: - # getting maximum item width - max_width = 0 - all_height = 0 - sizes = [] - for item in _menuItem.childs: - item._updateView() # not good, but it works, need to be redone - sz = item.getScale() - sizes.append(sz) - max_width = max([max_width, sz[0]]) - all_height += sz[1] - - # @todo: resolve problem with long menu - idx = 0 - - # if item not first level, then calculate optimal position - if _menuItem.parent is not self.menu_root: - sz = _menuItem.getScale() - pos = _menuItem.getPosition() - # calculate x position - if pos[0] + sz[0] + max_width > self.width: - x = pos[0] - max_width - else: - x = pos[0] + sz[0] - # calculate y position - if pos[1] + all_height > self.height: - y = self.height - all_height - else: - y = pos[1] - else: # calculate optimal position for a first level menu items - pos = _menuItem.getPosition() - if pos[0] + max_width > self.width: - x = self.width - max_width - else: - x = pos[0] - - y = len(self.groups[self.menu_root]) * self.item_height - - group = self._createGroupY((x, y), self.height - y, - layoutGroupLine.LayoutGroupLine2dY.Dir_pos, False) - self.groups[_menuItem] = [group] - for item in _menuItem.childs: - group.appendObject(item) - item.setScale((max_width, sizes[idx][1])) - idx += 1 - - group._layout(True) - - - - def _updateWindowBounds(self): - """Updates information about render window bounds - """ - self.width = render_engine.Window.width - self.height = render_engine.Window.height - self.depth = render_engine.Window.depth - self.left = render_engine.Window.left - self.top = render_engine.Window.top - - def _regroup(self): - """Regroup objects. - Change groups based on objects size and window width - """ - self.hgroups = [] - - - def _createGroupX(self, _pos, _max_length, _dir, _fit): - """Creates horizontal layout group - @param _pos: group position - @type _pos: tuple: (x, y) - @param _max_length: maximum group length - @type _max_length: int - @param _dir: layout direction - @param _fit: fit object in length flag - - @return: created group - """ - group = layoutGroupLine.LayoutGroupLine2dX(_pos = _pos, _max_length = _max_length, - _direction = _dir, _fit = _fit, _dist = -1, - _align = layoutGroupLine.LayoutGroupLine2dX.Align_center) - return group - - def _createGroupY(self, _pos, _max_length, _dir, _fit): - """Creates vertical layout group - @param _pos: group position - @type _pos: tuple: (x, y) - @param _max_length: maximum group length - @type _max_length: int - @param _dir: layout direction - @param _fit: fit object in length flag - - @return: created group - """ - group = layoutGroupLine.LayoutGroupLine2dY(_pos = _pos, _max_length = _max_length, - _direction = _dir, _fit = _fit, _dist = -1) - return group - - - def windowResized(self, renderWindow): - """Notification method for render window size changed - """ - # updating window bounds - self._updateWindowBounds() - - # regrouping objects - self._regroup() - - # updating horizontal groups size and layout them - for group in self.hgroups: - group.max_length = width - group._layout(True) +""" +----------------------------------------------------------------------------- +This source file is part of OSTIS (Open Semantic Technology for Intelligent Systems) +For the latest info, see http://www.ostis.net + +Copyright (c) 2010 OSTIS + +OSTIS is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +OSTIS is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with OSTIS. If not, see . +----------------------------------------------------------------------------- +""" + + +''' +Created on 21.10.2009 + +@author: Denis Koronchik + Max Kaskevich +''' + +import sys +import suit.core.kernel as core +import suit.core.objects as objects +import sc_core.constants as sc_constants +import sc_core.pm as sc +import ogre.io.OIS as ois +import ogre.renderer.OGRE as ogre +import suit.core.render.mygui as mygui +import suit.core.layout.LayoutGroup as layoutGroup +import suit.core.layout.LayoutGroupLine as layoutGroupLine +import suit.core.keynodes as keynodes +import suit.core.render.engine as render_engine +import menu_cmds +import suit.core.sc_utils as sc_utils + + +# log manager +logManager = core.Kernel.getSingleton().logManager +# session +session = core.Kernel.session() +# kernel object +kernel = core.Kernel.getSingleton() + +session = kernel.session() +session.open_segment(u"/ui/menu") +main_menu = session.find_keynode_full_uri(u"/ui/menu/main_menu") + +menu_root = None +menu_layout_group = None + +_version_ = "0.2.0" +_name_ = "Menu" + +def initialize(): + # building menu + _buildMenu() + + global menu_root + global menu_layout_group + + # layout created menu + menu_layout_group = SCgMenuLayoutGroup(menu_root) + menu_root.callBackExpand = menu_layout_group._onExpand + menu_layout_group._layout(True) + + + +def shutdown(): + global menu_root + global menu_layout_group + menu_root.delete() + menu_layout_group = None + menu_root = None + + + +################### +# Generating menu # +################### +def _buildMenu(): + """Builds menu from sc memory + """ + global menu_root + menu_root = SCgMenuItem(u"", main_menu, None) + + +class Menu(objects.ObjectOverlay): + """Class that implement main window menu + @author: Max Kaskevich, Denis Koronchik + """ + + def __init__(self, caption = "Unknown"): + ''' + Constructor + ''' + objects.ObjectOverlay.__init__(self) + self._color = None + + #menu-button + self.button = None + self.icon = None + self._skin = "MenuItem" + self._icon_name = None + + self._icon_size = 15 + #menu-button position + #don`t use __view position methods because __view can be destroyed in method "hide()" + + #callbacks(should be functions with arg Menu) + self.callBackSetFocus = None + self.callBackLostFocus = None +# self.callBackRun = None + self.callBackExpand = None + + #states + self.__showed = False + self.__draged = False + self.__dragpoint = None + self.atom = None + self.question = False + + """self._move_time = 0.15 + self._auto_move = True + self._auto_move_pos = None + self._move_dt = self._move_time""" + self.autoSize = False + + self.position = (0, 0) + self.scale = (10, 14) + + self.textUpdateImpl = self._textUpdateImpl + + def __del__(self): + ''' + Destructor + ''' + objects.ObjectOverlay.__del__(self) + #if self.button: + #self.__gui.destroyWidget(self.button) + + def __setActions(self): + """set events listeners + """ + if self.button: + if self.callBackSetFocus: + self.button.subscribeEventMouseSetFocus(self, "setFocus") + self.button.subscribeEventKeySetFocus(self, "setFocus") + + if self.callBackLostFocus: + self.button.subscribeEventMouseLostFocus(self,"_lostFocus") + self.button.subscribeEventKeyLostFocus(self,"_lostFocus") + + self.button.subscribeEventMouseButtonClick(self,'_expandOrRun') + #self.button.subscribeEventMouseDrag(self,'_drag') + + def _setFocus(self, widget): + self.callBackSetFocus(self) + + def _lostFocus(self, widget): + self.callBackLostFocus(self) + + def _expandOrRun(self, widget): + """call run, expand or drop button in depends of states + """ + if self.__draged: + #drop + self.__dragpoint = None + self.__draged = False + else: + #if left alt pressed + #if core.Kernel.getSingleton().oisKeyboard.isKeyDown(ois.KC_LMENU): + + #call expand + if self.callBackExpand: + self.callBackExpand(self) +# else: +# #call run +# if self.callBackRun: +# self.callBackRun(self) + + def _textUpdateImpl(self): + if self.button is not None: + self.button.setCaption(self.getText()) + self.calculateAutoSize() + self.needTextUpdate = False + + def _updateView(self): + """Updates view representation of object + """ + """if self.needPositionUpdate: + if self.button is not None: + if self._auto_move: + self._move_dt = 0.0 + old_pos = self.button.getPosition() + self._auto_move_pos = (old_pos.left, old_pos.top) + else: + self.button.setPosition(self.position[0], self.position[1]) + self.needPositionUpdate = False""" + if self.needScaleUpdate: + if self.button is not None: + self.button.setSize(self.scale[0], self.scale[1]) + sz = max([0, min([self.scale[1] - 10, self._icon_size])]) + self.icon.setSize(sz, sz) + self.icon.setPosition(5, int(max([(self.scale[1] - sz) / 2.0, 0]))) + self.needScaleUpdate = False + + menu_layout_group._layout(True) + + objects.ObjectOverlay._updateView(self) + + def _update(self, _timeSinceLastFrame): + """Updates object + """ + objects.ObjectOverlay._update(self, _timeSinceLastFrame) + + # move object if need + """if self._auto_move and self._move_dt < self._move_time and self.button is not None: + self._move_dt += _timeSinceLastFrame + self._move_dt = min([self._move_dt, self._move_time]) + prop = self._move_dt / self._move_time + self.button.setPosition(int(self._auto_move_pos[0] + prop * (self.position[0] - self._auto_move_pos[0])), + int(self._auto_move_pos[1] + prop * (self.position[1] - self._auto_move_pos[1]))) + """ + + + def setAlpha(self, _value): + """Sets alpha value for item + """ + if self.button is not None: + self.button.setAlpha(_value) + + def show(self): + """show button + """ + if not self.__showed: + self.button = render_engine.Gui.createWidgetT("Button", + self._skin, + mygui.IntCoord(self.position[0], self.position[1], self.scale[0], self.scale[1]), + mygui.Align(), + "Popup", "") + self.icon = self.button.createWidgetT("StaticImage", + "StaticImage", + mygui.IntCoord(5, 5, 10, 10), + mygui.Align()) + + self.icon.setNeedKeyFocus(False) + self.icon.setNeedMouseFocus(False) + + if self._icon_name is not None: + self.icon.setImageTexture(self._icon_name) + + if self.getText() is not None: + self.button.setCaption(self.getText()) + self._widget = self.button + self.calculateAutoSize() + + self.__setActions() + self.__showed = True + + self.setEnabled(True) + self.setVisible(True) + +# self.setScale((170, 22)) + + def hide(self): + """hide button + """ + self.setEnabled(False) + self.setVisible(False) + + if self.__showed: + render_engine.Gui.destroyWidget(self.button) + self.__showed = False + self.button = None + + def calculateAutoSize(self): + """Set size of item to wrap caption + """ + if self.button: + tsize = self.button.getTextSize() + self.setScale((tsize.width + 50, tsize.height + 10)) + + def isShowed(self): + return self.__showed + + def setCaption(self, caption): + if self.button: + self.button.setCaption(caption) + self.calculateAutoSize() + + +class SCgMenuItem(Menu): + + def __init__(self, _caption, _sc_addr, _parent): + """Constructor + @param _caption: menu item caption + @type _caption: str + @param _sc_addr: sc_addr of node that represents menu item + @type _sc_addr: sc_addr + @param _parent: parent item + @type _parent: SCgMenuItem + """ + Menu.__init__(self, _caption) + self.childs = [] + #self.callBackExpand = self._expand + self.visible = False + self.parent = _parent + + self._color = None + + self._setScAddr(_sc_addr) + # check atom flag + self._checkAtom() + + + def __del__(self): + """Destructor + """ + Menu.__del__(self) + + def delete(self): + Menu.delete(self) + + def _expandOrRun(self, widget): + """Expands item or run event for atom class + """ + Menu._expandOrRun(self, widget) + if self.atom: + try: + self._run_event() + except RuntimeError, exc: + # FIXME: make more useful + global logManager + logManager.logError("Can't run event '%s': %s" % (self.getCaption(), str(exc))) + + def _run_event(self): + """Runs event attached to menu item + """ + menu_cmds.start_menu_cmd(self) + + + def _apendChildItem(self, _item): + """Appends child item + @param _item: child item to append + @type _item: SCgMenuItem + """ + if _item in self.childs: + raise RuntimeError("Item '%s' is already exists as child in item '%s'" % (item.getCaption(), self.getCaption())) + self.childs.append(_item) + _item.parent = self + + def _show(self): + """Show menu items + """ + if not self.visible: + self._parse() + for item in self.childs: + item.show() + + # make items on this level transparent + if self.parent is not None: + for item in self.parent.childs: + if item is not self: + item.setAlpha(0.5) + else: + raise RuntimeWarning("Menu '%s' already showed" % self.getCaption()) + + self.visible = True + + def _hide(self): + """Hide menu items + """ + if self.visible: + for item in self.childs: + item.hide() + #self.childs = [] + self.visible = False + + # make items on this level visible + if self.parent is not None: + for item in self.parent.childs: + item.setAlpha(1.0) + + else: + raise RuntimeWarning("Menu '%s' already hidden" % self.getCaption()) + + + def _parse(self): + """Parse menu item from sc-memory + @author: Denis Koronchik + """ + if len(self.childs) > 0: return # do nothing + + + current_translation = core.Kernel.getSingleton().getCurrentTranslation() + + # get child elements + session = core.Kernel.session() + #decomp = sc_utils.searchOneShotBinPairAttrFromNode(session, self._getScAddr(), keynodes.common.nrel_decomposition, sc.SC_CONST) + decomp = sc_utils.searchOneShotBinPairAttrToNode(session, self._getScAddr(), keynodes.common.nrel_decomposition, sc.SC_CONST) + + # parse child items + if decomp is not None: + it = session.create_iterator(session.sc_constraint_new(sc_constants.CONSTR_3_f_a_a, + decomp, + sc.SC_A_CONST | sc.SC_POS,# | sc.SC_PERMANENT, + sc.SC_N_CONST), True) + while not it.is_over(): + item_addr = it.value(2) + + item = SCgMenuItem(None, it.value(2), self) + item.setPosition(self.position) + self.childs.append(item) + + it.next() + + + def _checkAtom(self): + """Checks if menu item is atom menu class + """ + session = core.Kernel.session() + self._skin = "MenuItem" + self._color = "#ffffff" + + if sc_utils.checkIncToSets(session, self._getScAddr(), [keynodes.ui.atom_command], sc.SC_CONST): + self.atom = True + self._icon_name = sc_utils.getImageIdentifier(session, keynodes.ui.atom_command) + + # check if it is a question command + if sc_utils.checkIncToSets(session, self._getScAddr(), [keynodes.ui.question_command], sc.SC_CONST): + self.question = True + self._icon_name = sc_utils.getImageIdentifier(session, keynodes.ui.question_command) + return + + elif sc_utils.checkIncToSets(session, self._getScAddr(), [keynodes.ui.noatom_command], sc.SC_CONST): + self.atom = False + self._icon_name = sc_utils.getImageIdentifier(session, keynodes.ui.noatom_command) + return + else: #object + self.atom = False + self.question = False + return + + global logManager + logManager.logWarning("Unknown atom class for a menu item '%s'" % self.getCaption()) + + def setText(self, _text): + Menu.setText(self, _text) + + self.setCaption(_text) + + + def show(self): + """Overloaded show message to control tooltips + """ + Menu.show(self) + +class SCgMenuLayoutGroup(layoutGroup.LayoutGroupOverlay, ogre.WindowEventListener): + """Layouts menu by horizontal on window top + """ + + def __init__(self, _menuRoot): + """Constructor + """ + layoutGroup.LayoutGroupOverlay.__init__(self) + ogre.WindowEventListener.__init__(self) + + # list of horizontal layout groups + self.groups = {} + # render window size + self._updateWindowBounds() + + self.item_height = None + self.menu_root = _menuRoot + self._onExpand(self.menu_root) + + + # register listener for window events +# ogre.WindowEventUtilities.addWindowEventListener(self.renderWindow, self) + render_engine.registerWindowEventListener(self) + + + def __del__(self): + """Destructor + """ + layoutGroup.LayoutGroupOverlay.__del__(self) +# ogre.WindowEventUtilities.removeWindowEventListener(self.renderWindow, self) + render_engine.unregisterWindowEventListener(self) + + def _expandMain(self): + """Expands main_menu + """ + self._onExpand(self.menu_root) + + def _apply(self): + """Apply layout algorithm + """ + for groups in self.groups.values(): + for group in groups: + group._layout(True) + layoutGroup.LayoutGroupOverlay._apply(self) + + def _onExpand(self, _menuItem): + """Notification for item expand + """ + + # check if menu expanded + if _menuItem.visible: + self.groups.pop(_menuItem) + # expanding child menus + for item in _menuItem.childs: + if self.groups.has_key(item): + self._onExpand(item) + + _menuItem._hide() + return + else: + # hiding menus with the same level + if _menuItem is not self.menu_root: + for item in _menuItem.parent.childs: + if self.groups.has_key(item): + self._onExpand(item) + # showing menu + _menuItem._show() + + + # update items + for item in _menuItem.childs: + item.calculateAutoSize() + item.callBackExpand = self._onExpand + + # check if it's a menu root item + if _menuItem is self.menu_root: + # create group + group = self._createGroupX((0, 0), self.width, layoutGroupLine.LayoutGroupLine2dX.Dir_pos, True) + self.groups[_menuItem] = [group] + width = 0 + y = 0 + # append items to groups + for item in _menuItem.childs: + sz = item.getScale() + + # store item height + if self.item_height is None: + self.item_height = sz[1] + + # create new group if we need + if width + sz[0] > self.width: + y += sz[1] + group = self._createGroupX((0, y), self.width, + layoutGroupLine.LayoutGroupLine2dX.Dir_pos, True) + width = 0 + self.groups[_menuItem].append(group) + # calculate new width + width += sz[0] + group.appendObject(item) + group.fit = False + + else: + # getting maximum item width + max_width = 0 + all_height = 0 + sizes = [] + for item in _menuItem.childs: + item._updateView() # not good, but it works, need to be redone + sz = item.getScale() + sizes.append(sz) + max_width = max([max_width, sz[0]]) + all_height += sz[1] + + # @todo: resolve problem with long menu + idx = 0 + + # if item not first level, then calculate optimal position + if _menuItem.parent is not self.menu_root: + sz = _menuItem.getScale() + pos = _menuItem.getPosition() + # calculate x position + if pos[0] + sz[0] + max_width > self.width: + x = pos[0] - max_width + else: + x = pos[0] + sz[0] + # calculate y position + if pos[1] + all_height > self.height: + y = self.height - all_height + else: + y = pos[1] + else: # calculate optimal position for a first level menu items + pos = _menuItem.getPosition() + if pos[0] + max_width > self.width: + x = self.width - max_width + else: + x = pos[0] + + y = len(self.groups[self.menu_root]) * self.item_height + + group = self._createGroupY((x, y), self.height - y, + layoutGroupLine.LayoutGroupLine2dY.Dir_pos, False) + self.groups[_menuItem] = [group] + for item in _menuItem.childs: + group.appendObject(item) + item.setScale((max_width, sizes[idx][1])) + idx += 1 + + group._layout(True) + + + + def _updateWindowBounds(self): + """Updates information about render window bounds + """ + self.width = render_engine.Window.width + self.height = render_engine.Window.height + self.depth = render_engine.Window.depth + self.left = render_engine.Window.left + self.top = render_engine.Window.top + + def _regroup(self): + """Regroup objects. + Change groups based on objects size and window width + """ + self.hgroups = [] + + + def _createGroupX(self, _pos, _max_length, _dir, _fit): + """Creates horizontal layout group + @param _pos: group position + @type _pos: tuple: (x, y) + @param _max_length: maximum group length + @type _max_length: int + @param _dir: layout direction + @param _fit: fit object in length flag + + @return: created group + """ + group = layoutGroupLine.LayoutGroupLine2dX(_pos = _pos, _max_length = _max_length, + _direction = _dir, _fit = _fit, _dist = -1, + _align = layoutGroupLine.LayoutGroupLine2dX.Align_center) + return group + + def _createGroupY(self, _pos, _max_length, _dir, _fit): + """Creates vertical layout group + @param _pos: group position + @type _pos: tuple: (x, y) + @param _max_length: maximum group length + @type _max_length: int + @param _dir: layout direction + @param _fit: fit object in length flag + + @return: created group + """ + group = layoutGroupLine.LayoutGroupLine2dY(_pos = _pos, _max_length = _max_length, + _direction = _dir, _fit = _fit, _dist = -1) + return group + + + def windowResized(self, renderWindow): + """Notification method for render window size changed + """ + # updating window bounds + self._updateWindowBounds() + + # regrouping objects + self._regroup() + + # updating horizontal groups size and layout them + for group in self.hgroups: + group.max_length = width + group._layout(True) diff --git a/components/scg/base/scg_keynodes.py b/components/scg/base/scg_keynodes.py index 91e0df4..7e12f3b 100644 --- a/components/scg/base/scg_keynodes.py +++ b/components/scg/base/scg_keynodes.py @@ -1,49 +1,49 @@ -""" ------------------------------------------------------------------------------ -This source file is part of OSTIS (Open Semantic Technology for Intelligent Systems) -For the latest info, see http://www.ostis.net - -Copyright (c) 2010 OSTIS - -OSTIS is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -OSTIS is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with OSTIS. If not, see . ------------------------------------------------------------------------------ -""" - - -''' -Created on 18.10.2009 - -@author: Denis Koronchik -''' - -import srs_engine.core as core -session = core.Kernel.session() - -session.open_segment(u"/ui/menu") - -# scg segments -class segments: - alphabet = u"/ui/scg_alphabet" - proc_keynode = u"/proc/keynode" - scg_menu = u"/ui/scg/menu" - - -#class core: -# parts = session.find_keynode_full_uri("/ui/core/parts") - -# menu keynodes -class menu: - root = session.find_keynode_full_uri(u"/ui/menu/main menu") - - +""" +----------------------------------------------------------------------------- +This source file is part of OSTIS (Open Semantic Technology for Intelligent Systems) +For the latest info, see http://www.ostis.net + +Copyright (c) 2010 OSTIS + +OSTIS is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +OSTIS is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with OSTIS. If not, see . +----------------------------------------------------------------------------- +""" + + +''' +Created on 18.10.2009 + +@author: Denis Koronchik +''' + +import srs_engine.core as core +session = core.Kernel.session() + +session.open_segment(u"/ui/menu") + +# scg segments +class segments: + alphabet = u"/ui/scg_alphabet" + proc_keynode = u"/proc/keynode" + scg_menu = u"/ui/scg/menu" + + +#class core: +# parts = session.find_keynode_full_uri("/ui/core/parts") + +# menu keynodes +class menu: + root = session.find_keynode_full_uri(u"/ui/menu/main_menu") + + diff --git a/repo/fs_repo_src/etc/questions_src/questions_keynodes.gwf b/repo/fs_repo_src/etc/questions_src/questions_keynodes.gwf index e12425c..2c14d5e 100644 --- a/repo/fs_repo_src/etc/questions_src/questions_keynodes.gwf +++ b/repo/fs_repo_src/etc/questions_src/questions_keynodes.gwf @@ -1,320 +1,326 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/repo/fs_repo_src/include/_keynodes.scsy b/repo/fs_repo_src/include/_keynodes.scsy index f3e00e0..d895418 100644 --- a/repo/fs_repo_src/include/_keynodes.scsy +++ b/repo/fs_repo_src/include/_keynodes.scsy @@ -1,196 +1,197 @@ -#include "ordinal.scsy" -//# File generated by rule_builder - - -//# etc/com_keynodes_src/com_keynodes.gwf -"������� ����" = "/etc/com_keynodes/������� ����"; -"���������� ����" = "/etc/com_keynodes/���������� ����"; -"����������� ����" = "/etc/com_keynodes/����������� ����"; -"����������_" = "/etc/com_keynodes/����������_"; -"�����������" = "/etc/com_keynodes/�����������"; -"�����������*" = "/etc/com_keynodes/�����������*"; -"������������*" = "/etc/com_keynodes/������������*"; -"������*" = "/etc/com_keynodes/������*"; -"������� �����_" = "/etc/com_keynodes/������� �����_"; -"���������� �����_" = "/etc/com_keynodes/���������� �����_"; -"���������*" = "/etc/com_keynodes/���������*"; -"�������������*" = "/etc/com_keynodes/�������������*"; -"����������� ������������� ����*" = "/etc/com_keynodes/����������� ������������� ����*"; -"�����*" = "/etc/com_keynodes/�����*"; -"������������_" = "/etc/com_keynodes/������������_"; -"������� �����������*" = "/etc/com_keynodes/������� �����������*"; -"�����������*" = "/etc/com_keynodes/�����������*"; -"��������_" = "/etc/com_keynodes/��������_"; -"��������������*" = "/etc/com_keynodes/��������������*"; -"��������*" = "/etc/com_keynodes/��������*"; -"���������, ������� ����������� ������� �������� ������������� ������������ ��������� � ������ ������ ������� ��������� �������� ������������ ��������� ����� �����*" = "/etc/com_keynodes/���������, ������� ����������� ������� �������� ������������� ������������ ��������� � ������ ������ ������� ��������� �������� ������������ ��������� ����� �����*"; -"����������*" = "/etc/com_keynodes/����������*"; -"����� ���������*" = "/etc/com_keynodes/����� ���������*"; -"������������ ���������*" = "/etc/com_keynodes/������������ ���������*"; -"������_" = "/etc/com_keynodes/������_"; -"������� ���������*" = "/etc/com_keynodes/������� ���������*"; -"���������*" = "/etc/com_keynodes/���������*"; -"���������, ������� ����������� ������� ������ ������������ � ����������� ����������*" = "/etc/com_keynodes/���������, ������� ����������� ������� ������ ������������ � ����������� ����������*"; -"����������� �� ����������� �������*" = "/etc/com_keynodes/����������� �� ����������� �������*"; -"������������_" = "/etc/com_keynodes/������������_"; -"�����������*" = "/etc/com_keynodes/�����������*"; -"���������, ������� ����������� ������� �������� ������������� ������������ ��������� � ������ �������, � ����� ������, ��������� �������� ������������ ��������� � ������� ���������*" = "/etc/com_keynodes/���������, ������� ����������� ������� �������� ������������� ������������ ��������� � ������ �������, � ����� ������, ��������� �������� ������������ ��������� � ������� ���������*"; -"���������� �����_" = "/etc/com_keynodes/���������� �����_"; -"������������ �����_" = "/etc/com_keynodes/������������ �����_"; -"����������� �����_" = "/etc/com_keynodes/����������� �����_"; -"����� ����������� � ����� ����_" = "/etc/com_keynodes/����� ����������� � ����� ����_"; -"����������� �������_" = "/etc/com_keynodes/����������� �������_"; -"�������� �����������_" = "/etc/com_keynodes/�������� �����������_"; -"�����*" = "/etc/com_keynodes/�����*"; -"���������*" = "/etc/com_keynodes/���������*"; -"impl*" = "/etc/com_keynodes/impl*"; -"eq*" = "/etc/com_keynodes/eq*"; -"conj*" = "/etc/com_keynodes/conj*"; -"������������ ���������" = "/etc/com_keynodes/������������ ���������"; -"��� ������������ ������������� �����������" = "/etc/com_keynodes/��� ������������ ������������� �����������"; -"������" = "/etc/com_keynodes/������"; -"��������������� ������������" = "/etc/com_keynodes/��������������� ������������"; -"������������� ����" = "/etc/com_keynodes/������������� ����"; -"����������� � ������*" = "/etc/com_keynodes/����������� � ������*"; -"�������� �������*" = "/etc/com_keynodes/�������� �������*"; -"������������ �������*" = "/etc/com_keynodes/������������ �������*"; -"��������*" = "/etc/com_keynodes/��������*"; -"���������� ������� � �������*" = "/etc/com_keynodes/���������� ������� � �������*"; -"��������� �����������_" = "/etc/com_keynodes/��������� �����������_"; -"��������� �� �����������_" = "/etc/com_keynodes/��������� �� �����������_"; -"���������_" = "/etc/com_keynodes/���������_"; -"�������_" = "/etc/com_keynodes/�������_"; -"������� ������������������*" = "/etc/com_keynodes/������� ������������������*"; - - -//# etc/questions_src/questions_keynodes.gwf -"����� ���������, ������� ����������� ������� �������� ������������� ������������ ��������� � ������ ������ ������� ��������� �������� ������������ ��������� ����� �����" = "/etc/questions/����� ���������, ������� ����������� ������� �������� ������������� ������������ ��������� � ������ ������ ������� ��������� �������� ������������ ��������� ����� �����"; -"����� ���������, ������� ����������� ������� �������� ������������� ������������ ��������� � ������ �������, � ����� ������, ��������� �������� ������������ ��������� � ������� ���������" = "/etc/questions/����� ���������, ������� ����������� ������� �������� ������������� ������������ ��������� � ������ �������, � ����� ������, ��������� �������� ������������ ��������� � ������� ���������"; -"����� ���������, ������� ����������� ������� ������ ������������ � ����������� ����������" = "/etc/questions/����� ���������, ������� ����������� ������� ������ ������������ � ����������� ����������"; -"����� ����� ���������" = "/etc/questions/����� ����� ���������"; -"����� ������� �����������" = "/etc/questions/����� ������� �����������"; -"����� �����������" = "/etc/questions/����� �����������"; -"����� ���������" = "/etc/questions/����� ���������"; -"����� ����������� �� ����������� �������" = "/etc/questions/����� ����������� �� ����������� �������"; -"����� ����������� �������" = "/etc/questions/����� ����������� �������"; -"����� ������������ ��������" = "/etc/questions/����� ������������ ��������"; -"����� �������" = "/etc/questions/����� �������"; -"������ ����������� ��������" = "/etc/questions/������ ����������� ��������"; -"������ �����" = "/etc/questions/������ �����"; -"������ �������� ��������" = "/etc/questions/������ �������� ��������"; -"������ �������" = "/etc/questions/������ �������"; -"������ ����������" = "/etc/questions/������ ����������"; -"������ �����������" = "/etc/questions/������ �����������"; -"����� ������������ �������" = "/etc/questions/����� ������������ �������"; -"����� ��������� ���" = "/etc/questions/����� ��������� ���"; -"�������� ������" = "/etc/questions/�������� ������"; -"�������� ������" = "/etc/questions/�������� ������"; -"��������� ������" = "/etc/questions/��������� ������"; -"������ �������� �������� �������" = "/etc/questions/������ �������� �������� �������"; -"������� �������� �������*" = "/etc/questions/������� �������� �������*"; -"�������� �������� �������*" = "/etc/questions/�������� �������� �������*"; -"�����*" = "/etc/questions/�����*"; -"���������� ������������ �������*" = "/etc/questions/���������� ������������ �������*"; -"����� ���������� �������� ���" = "/etc/questions/����� ���������� �������� ���"; -"����� ���������� ��������� ���" = "/etc/questions/����� ���������� ��������� ���"; -"����� �������" = "/etc/questions/����� �������"; -"����� ������� ���������������" = "/etc/questions/����� ������� ���������������"; -"�������������� ������" = "/etc/questions/�������������� ������"; -"����������� ������" = "/etc/questions/����������� ������"; -"������������ ������" = "/etc/questions/������������ ������"; -"������ ��������� SC-�����������" = "/etc/questions/������ ��������� SC-�����������"; -"������ �������� ��������� ���������" = "/etc/questions/������ �������� ��������� ���������"; -"������ ���������� �������� �������" = "/etc/questions/������ ���������� �������� �������"; -"������ ������������" = "/etc/questions/������ ������������"; -"������ ������ � �������" = "/etc/questions/������ ������ � �������"; -"������ ���������� ������������" = "/etc/questions/������ ���������� ������������"; -"������ ��������� ���� ������ ��������������" = "/etc/questions/������ ��������� ���� ������ ��������������"; -"������ ���������" = "/etc/questions/������ ���������"; -"������ ��������� ���� ������ ���������" = "/etc/questions/������ ��������� ���� ������ ���������"; -"������ �������" = "/etc/questions/������ �������"; -"������" = "/etc/questions/������"; -"����� ����������� ������������� ����" = "/etc/questions/����� ����������� ������������� ����"; -"����� ���������" = "/etc/questions/����� ���������"; -"����� ������������" = "/etc/questions/����� ������������"; -"����� ������" = "/etc/questions/����� ������"; -"����� ������������" = "/etc/questions/����� ������������"; -"����� �����������" = "/etc/questions/����� �����������"; -"����� ������ ������������� �����������" = "/etc/questions/����� ������ ������������� �����������"; -"����� ����������" = "/etc/questions/����� ����������"; -"��� ��������� ���������" = "/etc/questions/��� ��������� ���������"; -"����� ���������" = "/etc/questions/����� ���������"; -"����� �������" = "/etc/questions/����� �������"; -"����� �������" = "/etc/questions/����� �������"; -"���" = "/etc/questions/���"; - - -//# ui/core_src/ui_keynodes.gwf -"LOGICx" = "/ui/core/LOGICx"; -"MATH" = "/ui/core/MATH"; -"ui_arg_4" = "/ui/core/ui_arg_4"; -"ui_arg_3" = "/ui/core/ui_arg_3"; -"ui_arg_2" = "/ui/core/ui_arg_2"; -"ui_used_translation" = "/ui/core/ui_used_translation"; -"ui_all_translations" = "/ui/core/ui_all_translations"; -"����������� �������" = "/ui/core/����������� �������"; -"������� ������" = "/ui/core/������� ������"; -"������" = "/ui/core/������"; -"��������� �������" = "/ui/core/��������� �������"; -"ui_finished_user_command" = "/ui/core/ui_finished_user_command"; -"ui_active_user_command" = "/ui/core/ui_active_user_command"; -"ui_initiated_user_command" = "/ui/core/ui_initiated_user_command"; -"ui_user_command" = "/ui/core/ui_user_command"; -"���������� ������������ �������*" = "/ui/core/���������� ������������ �������*"; -"�������" = "/ui/core/�������"; -"ui_cmd_change_localization" = "/ui/core/ui_cmd_change_localization"; -"������������ ���������������� �������" = "/ui/core/������������ ���������������� �������"; -"ui_cmd_mouse_move_obj" = "/ui/core/ui_cmd_mouse_move_obj"; -"ui_arg_set_only" = "/ui/core/ui_arg_set_only"; -"mouse_button_right" = "/ui/core/mouse_button_right"; -"�������������� ������������ ���������������� �������" = "/ui/core/�������������� ������������ ���������������� �������"; -"MPG" = "/ui/core/MPG"; -"mouse_button_middle" = "/ui/core/mouse_button_middle"; -"ui_arg_cur_window" = "/ui/core/ui_arg_cur_window"; -"������� ����" = "/ui/core/������� ����"; -"�������� ����*" = "/ui/core/�������� ����*"; -"�������� �������������� ��������*" = "/ui/core/�������� �������������� ��������*"; -"��������� �������������� ������� ��������*" = "/ui/core/��������� �������������� ������� ��������*"; -"��������� �������������� �������� ��������*" = "/ui/core/��������� �������������� �������� ��������*"; -"GEOMx" = "/ui/core/GEOMx"; -"JPEG" = "/ui/core/JPEG"; -"INT" = "/ui/core/INT"; -"REAL" = "/ui/core/REAL"; -"MP4" = "/ui/core/MP4"; -"MIDMIF" = "/ui/core/MIDMIF"; -"OBJx" = "/ui/core/OBJx"; -"SPACEx" = "/ui/core/SPACEx"; -"������������" = "/ui/core/������������"; -"ui_arg_1" = "/ui/core/ui_arg_1"; -"sc-����" = "/ui/core/sc-����"; -"�����������" = "/ui/core/�����������"; -"��������" = "/ui/core/��������"; -"����������" = "/ui/core/����������"; -"��������� ���� ��� ������ ������*" = "/ui/core/��������� ���� ��� ������ ������*"; -"SCGx" = "/ui/core/SCGx"; -"PNG" = "/ui/core/PNG"; -"WMV" = "/ui/core/WMV"; -"CHEMISTRY" = "/ui/core/CHEMISTRY"; -"GRAPH" = "/ui/core/GRAPH"; -"�������� ������������ ���������������� �������" = "/ui/core/�������� ������������ ���������������� �������"; -"����������� ������������ ���������������� �������" = "/ui/core/����������� ������������ ���������������� �������"; -"ui_cmd_mouse_button_press" = "/ui/core/ui_cmd_mouse_button_press"; -"ui_cmd_mouse_button_release" = "/ui/core/ui_cmd_mouse_button_release"; -"mouse_button_left" = "/ui/core/mouse_button_left"; -"FLV" = "/ui/core/FLV"; -"SC" = "/ui/core/SC"; -"JPG" = "/ui/core/JPG"; -"BMP" = "/ui/core/BMP"; -"STRING" = "/ui/core/STRING"; -"TERM" = "/ui/core/TERM"; -"AVI" = "/ui/core/AVI"; -"SWF" = "/ui/core/SWF"; -"HTML" = "/ui/core/HTML"; -"ui_output_window_set" = "/ui/core/ui_output_window_set"; -"ui_cmd_play_user_command" = "/ui/core/ui_cmd_play_user_command"; -"ui_arg_set" = "/ui/core/ui_arg_set"; -"ui_arg_all_el" = "/ui/core/ui_arg_all_el"; +#include "ordinal.scsy" +//# File generated by rule_builder + + +//# etc/com_keynodes_src/com_keynodes.gwf +"������� ����" = "/etc/com_keynodes/������� ����"; +"���������� ����" = "/etc/com_keynodes/���������� ����"; +"����������� ����" = "/etc/com_keynodes/����������� ����"; +"����������_" = "/etc/com_keynodes/����������_"; +"�����������" = "/etc/com_keynodes/�����������"; +"�����������*" = "/etc/com_keynodes/�����������*"; +"������������*" = "/etc/com_keynodes/������������*"; +"������*" = "/etc/com_keynodes/������*"; +"������� �����_" = "/etc/com_keynodes/������� �����_"; +"���������� �����_" = "/etc/com_keynodes/���������� �����_"; +"���������*" = "/etc/com_keynodes/���������*"; +"�������������*" = "/etc/com_keynodes/�������������*"; +"����������� ������������� ����*" = "/etc/com_keynodes/����������� ������������� ����*"; +"�����*" = "/etc/com_keynodes/�����*"; +"������������_" = "/etc/com_keynodes/������������_"; +"������� �����������*" = "/etc/com_keynodes/������� �����������*"; +"�����������*" = "/etc/com_keynodes/�����������*"; +"��������_" = "/etc/com_keynodes/��������_"; +"��������������*" = "/etc/com_keynodes/��������������*"; +"��������*" = "/etc/com_keynodes/��������*"; +"���������, ������� ����������� ������� �������� ������������� ������������ ��������� � ������ ������ ������� ��������� �������� ������������ ��������� ����� �����*" = "/etc/com_keynodes/���������, ������� ����������� ������� �������� ������������� ������������ ��������� � ������ ������ ������� ��������� �������� ������������ ��������� ����� �����*"; +"����������*" = "/etc/com_keynodes/����������*"; +"����� ���������*" = "/etc/com_keynodes/����� ���������*"; +"������������ ���������*" = "/etc/com_keynodes/������������ ���������*"; +"������_" = "/etc/com_keynodes/������_"; +"������� ���������*" = "/etc/com_keynodes/������� ���������*"; +"���������*" = "/etc/com_keynodes/���������*"; +"���������, ������� ����������� ������� ������ ������������ � ����������� ����������*" = "/etc/com_keynodes/���������, ������� ����������� ������� ������ ������������ � ����������� ����������*"; +"����������� �� ����������� �������*" = "/etc/com_keynodes/����������� �� ����������� �������*"; +"������������_" = "/etc/com_keynodes/������������_"; +"�����������*" = "/etc/com_keynodes/�����������*"; +"���������, ������� ����������� ������� �������� ������������� ������������ ��������� � ������ �������, � ����� ������, ��������� �������� ������������ ��������� � ������� ���������*" = "/etc/com_keynodes/���������, ������� ����������� ������� �������� ������������� ������������ ��������� � ������ �������, � ����� ������, ��������� �������� ������������ ��������� � ������� ���������*"; +"���������� �����_" = "/etc/com_keynodes/���������� �����_"; +"������������ �����_" = "/etc/com_keynodes/������������ �����_"; +"����������� �����_" = "/etc/com_keynodes/����������� �����_"; +"����� ����������� � ����� ����_" = "/etc/com_keynodes/����� ����������� � ����� ����_"; +"����������� �������_" = "/etc/com_keynodes/����������� �������_"; +"�������� �����������_" = "/etc/com_keynodes/�������� �����������_"; +"�����*" = "/etc/com_keynodes/�����*"; +"���������*" = "/etc/com_keynodes/���������*"; +"impl*" = "/etc/com_keynodes/impl*"; +"eq*" = "/etc/com_keynodes/eq*"; +"conj*" = "/etc/com_keynodes/conj*"; +"������������ ���������" = "/etc/com_keynodes/������������ ���������"; +"��� ������������ ������������� �����������" = "/etc/com_keynodes/��� ������������ ������������� �����������"; +"������" = "/etc/com_keynodes/������"; +"��������������� ������������" = "/etc/com_keynodes/��������������� ������������"; +"������������� ����" = "/etc/com_keynodes/������������� ����"; +"����������� � ������*" = "/etc/com_keynodes/����������� � ������*"; +"�������� �������*" = "/etc/com_keynodes/�������� �������*"; +"������������ �������*" = "/etc/com_keynodes/������������ �������*"; +"��������*" = "/etc/com_keynodes/��������*"; +"���������� ������� � �������*" = "/etc/com_keynodes/���������� ������� � �������*"; +"��������� �����������_" = "/etc/com_keynodes/��������� �����������_"; +"��������� �� �����������_" = "/etc/com_keynodes/��������� �� �����������_"; +"���������_" = "/etc/com_keynodes/���������_"; +"�������_" = "/etc/com_keynodes/�������_"; +"������� ������������������*" = "/etc/com_keynodes/������� ������������������*"; + + +//# etc/questions_src/questions_keynodes.gwf +"����� ���������, ������� ����������� ������� �������� ������������� ������������ ��������� � ������ ������ ������� ��������� �������� ������������ ��������� ����� �����" = "/etc/questions/����� ���������, ������� ����������� ������� �������� ������������� ������������ ��������� � ������ ������ ������� ��������� �������� ������������ ��������� ����� �����"; +"����� ���������, ������� ����������� ������� �������� ������������� ������������ ��������� � ������ �������, � ����� ������, ��������� �������� ������������ ��������� � ������� ���������" = "/etc/questions/����� ���������, ������� ����������� ������� �������� ������������� ������������ ��������� � ������ �������, � ����� ������, ��������� �������� ������������ ��������� � ������� ���������"; +"����� ���������, ������� ����������� ������� ������ ������������ � ����������� ����������" = "/etc/questions/����� ���������, ������� ����������� ������� ������ ������������ � ����������� ����������"; +"����� ����� ���������" = "/etc/questions/����� ����� ���������"; +"����� ������� �����������" = "/etc/questions/����� ������� �����������"; +"����� �����������" = "/etc/questions/����� �����������"; +"����� ���������" = "/etc/questions/����� ���������"; +"����� ����������� �� ����������� �������" = "/etc/questions/����� ����������� �� ����������� �������"; +"����� ����������� �������" = "/etc/questions/����� ����������� �������"; +"����� ������������ ��������" = "/etc/questions/����� ������������ ��������"; +"����� �������" = "/etc/questions/����� �������"; +"������ ����������� ��������" = "/etc/questions/������ ����������� ��������"; +"������ �����" = "/etc/questions/������ �����"; +"������ �������� ��������" = "/etc/questions/������ �������� ��������"; +"������ �������" = "/etc/questions/������ �������"; +"������ ����������" = "/etc/questions/������ ����������"; +"������ �����������" = "/etc/questions/������ �����������"; +"����� ������������ �������" = "/etc/questions/����� ������������ �������"; +"����� ��������� ���" = "/etc/questions/����� ��������� ���"; +"�������� ������" = "/etc/questions/�������� ������"; +"�������� ������" = "/etc/questions/�������� ������"; +"��������� ������" = "/etc/questions/��������� ������"; +"������ �������� �������� �������" = "/etc/questions/������ �������� �������� �������"; +"������� �������� �������*" = "/etc/questions/������� �������� �������*"; +"�������� �������� �������*" = "/etc/questions/�������� �������� �������*"; +"�����*" = "/etc/questions/�����*"; +"���������� ������������ �������*" = "/etc/questions/���������� ������������ �������*"; +"����� ���������� �������� ���" = "/etc/questions/����� ���������� �������� ���"; +"����� ���������� ��������� ���" = "/etc/questions/����� ���������� ��������� ���"; +"����� �������" = "/etc/questions/����� �������"; +"����� ������� ���������������" = "/etc/questions/����� ������� ���������������"; +"�������������� ������" = "/etc/questions/�������������� ������"; +"����������� ������" = "/etc/questions/����������� ������"; +"������������ ������" = "/etc/questions/������������ ������"; +"������ ��������� SC-�����������" = "/etc/questions/������ ��������� SC-�����������"; +"������ �������� ��������� ���������" = "/etc/questions/������ �������� ��������� ���������"; +"������ ���������� �������� �������" = "/etc/questions/������ ���������� �������� �������"; +"������ ������������" = "/etc/questions/������ ������������"; +"������ ������ � �������" = "/etc/questions/������ ������ � �������"; +"������ ���������� ������������" = "/etc/questions/������ ���������� ������������"; +"������ ��������� ���� ������ ��������������" = "/etc/questions/������ ��������� ���� ������ ��������������"; +"������ ���������" = "/etc/questions/������ ���������"; +"������ ��������� ���� ������ ���������" = "/etc/questions/������ ��������� ���� ������ ���������"; +"������ �������" = "/etc/questions/������ �������"; +"������" = "/etc/questions/������"; +"����� ����������� ������������� ����" = "/etc/questions/����� ����������� ������������� ����"; +"����� ���������" = "/etc/questions/����� ���������"; +"����� ������������" = "/etc/questions/����� ������������"; +"����� ������" = "/etc/questions/����� ������"; +"����� ������������" = "/etc/questions/����� ������������"; +"����� �����������" = "/etc/questions/����� �����������"; +"����� ������ ������������� �����������" = "/etc/questions/����� ������ ������������� �����������"; +"����� ����������" = "/etc/questions/����� ����������"; +"��� ��������� ���������" = "/etc/questions/��� ��������� ���������"; +"����� ���������" = "/etc/questions/����� ���������"; +"����� �������" = "/etc/questions/����� �������"; +"����� �������" = "/etc/questions/����� �������"; +"���" = "/etc/questions/���"; + + +//# ui/core_src/ui_keynodes.gwf +"LOGICx" = "/ui/core/LOGICx"; +"MATH" = "/ui/core/MATH"; +"ui_arg_4" = "/ui/core/ui_arg_4"; +"ui_arg_3" = "/ui/core/ui_arg_3"; +"ui_arg_2" = "/ui/core/ui_arg_2"; +"ui_used_translation" = "/ui/core/ui_used_translation"; +"ui_all_translations" = "/ui/core/ui_all_translations"; +"����������� �������" = "/ui/core/����������� �������"; +"������� ������" = "/ui/core/������� ������"; +"������" = "/ui/core/������"; +"��������� �������" = "/ui/core/��������� �������"; +"ui_finished_user_command" = "/ui/core/ui_finished_user_command"; +"ui_active_user_command" = "/ui/core/ui_active_user_command"; +"ui_initiated_user_command" = "/ui/core/ui_initiated_user_command"; +"ui_user_command" = "/ui/core/ui_user_command"; +"���������� ������������ �������*" = "/ui/core/���������� ������������ �������*"; +"�������" = "/ui/core/�������"; +"ui_cmd_change_localization" = "/ui/core/ui_cmd_change_localization"; +"������������ ���������������� �������" = "/ui/core/������������ ���������������� �������"; +"ui_cmd_mouse_move_obj" = "/ui/core/ui_cmd_mouse_move_obj"; +"ui_arg_set_only" = "/ui/core/ui_arg_set_only"; +"mouse_button_right" = "/ui/core/mouse_button_right"; +"�������������� ������������ ���������������� �������" = "/ui/core/�������������� ������������ ���������������� �������"; +"MPG" = "/ui/core/MPG"; +"mouse_button_middle" = "/ui/core/mouse_button_middle"; +"ui_arg_cur_window" = "/ui/core/ui_arg_cur_window"; +"������� ����" = "/ui/core/������� ����"; +"�������� ����*" = "/ui/core/�������� ����*"; +"�������� �������������� ��������*" = "/ui/core/�������� �������������� ��������*"; +"��������� �������������� ������� ��������*" = "/ui/core/��������� �������������� ������� ��������*"; +"��������� �������������� �������� ��������*" = "/ui/core/��������� �������������� �������� ��������*"; +"GEOMx" = "/ui/core/GEOMx"; +"JPEG" = "/ui/core/JPEG"; +"INT" = "/ui/core/INT"; +"REAL" = "/ui/core/REAL"; +"MP4" = "/ui/core/MP4"; +"MIDMIF" = "/ui/core/MIDMIF"; +"OBJx" = "/ui/core/OBJx"; +"SPACEx" = "/ui/core/SPACEx"; +"������������" = "/ui/core/������������"; +"ui_arg_1" = "/ui/core/ui_arg_1"; +"sc-����" = "/ui/core/sc-����"; +"�����������" = "/ui/core/�����������"; +"��������" = "/ui/core/��������"; +"����������" = "/ui/core/����������"; +"��������� ���� ��� ������ ������*" = "/ui/core/��������� ���� ��� ������ ������*"; +"SCGx" = "/ui/core/SCGx"; +"PNG" = "/ui/core/PNG"; +"WMV" = "/ui/core/WMV"; +"CHEMISTRY" = "/ui/core/CHEMISTRY"; +"GRAPH" = "/ui/core/GRAPH"; +"�������� ������������ ���������������� �������" = "/ui/core/�������� ������������ ���������������� �������"; +"����������� ������������ ���������������� �������" = "/ui/core/����������� ������������ ���������������� �������"; +"ui_cmd_mouse_button_press" = "/ui/core/ui_cmd_mouse_button_press"; +"ui_cmd_mouse_button_release" = "/ui/core/ui_cmd_mouse_button_release"; +"mouse_button_left" = "/ui/core/mouse_button_left"; +"FLV" = "/ui/core/FLV"; +"SC" = "/ui/core/SC"; +"JPG" = "/ui/core/JPG"; +"BMP" = "/ui/core/BMP"; +"STRING" = "/ui/core/STRING"; +"TERM" = "/ui/core/TERM"; +"AVI" = "/ui/core/AVI"; +"SWF" = "/ui/core/SWF"; +"HTML" = "/ui/core/HTML"; +"ui_output_window_set" = "/ui/core/ui_output_window_set"; +"ui_cmd_play_user_command" = "/ui/core/ui_cmd_play_user_command"; +"ui_arg_set" = "/ui/core/ui_arg_set"; +"ui_arg_all_el" = "/ui/core/ui_arg_all_el"; +"��� �������" = "/etc/questions/��� �������"; diff --git a/repo/fs_repo_src/include/etc_questions.scsy b/repo/fs_repo_src/include/etc_questions.scsy index 0150abe..97aefa5 100644 --- a/repo/fs_repo_src/include/etc_questions.scsy +++ b/repo/fs_repo_src/include/etc_questions.scsy @@ -1,66 +1,67 @@ - -/* ------------------------------------------------------------------------------ -This source file is part of OSTIS (Open Semantic Technology for Intelligent Systems) -For the latest info, see http://www.ostis.net - -Copyright (c) 2010 OSTIS - -OSTIS is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -OSTIS is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with OSTIS. If not, see . ------------------------------------------------------------------------------ -*/ - -question = "/etc/questions/������"; -q_initiated = "/etc/questions/�������������� ������"; -q_atom = "/etc/questions/��������� ������"; -q_noatom = "/etc/questions/����������� ������"; -q_active = "/etc/questions/�������� ������"; -q_finished = "/etc/questions/������������ ������"; -q_successful = "/etc/questions/�������� ������"; - -q_search_subsets = "/etc/questions/����� �����������"; -q_search_supersets = "/etc/questions/����� �����������"; -q_search_all_pos_in_arcs = "/etc/questions/����� ���������� �������� ���"; -q_search_all_pos_out_arcs = "/etc/questions/����� ���������� ��������� ���"; -q_search_authors = "/etc/questions/����� �������"; -q_search_identifiers = "/etc/questions/����� ������� ���������������"; -q_search_decomposition = "/etc/questions/����� ������������ �������"; -q_search_illustration = "/etc/questions/����� ����������� �������"; - -q_verification = "/etc/questions/������ �����������"; -q_add_child_command = "/etc/questions/������ ���������� �������� �������"; -q_remove_child_command = "/etc/questions/������ �������� �������� �������"; - -q_generate_construct = "/etc/questions/������ ��������� SC-�����������"; -q_erase_set_elements = "/etc/questions/������ �������� ��������� ���������"; -q_el_content = "/etc/questions/������ ����������� ��������"; - -q_square = "/etc/questions/������ �������"; - -q_addition = "/etc/questions/������ �����"; -q_multiplication = "/etc/questions/������ ������������"; -q_exponention = "/etc/questions/������ �������"; -q_calculation = "/etc/questions/������ ����������"; - -q_statement_validity = "/etc/questions/������ ���������� ������������"; -q_var_value = "/etc/questions/������ �������� ��������"; -q_postorder_tree_search = "/etc/questions/������ ������ � �������"; -q_production = "/etc/questions/������ ���������"; -q_gen_all_accessory_links = "/etc/questions/������ ��������� ���� ������ ��������������"; -q_gen_all_trans_relation_links = "/etc/questions/������ ��������� ���� ������ ���������"; - -nrel_action_area = "/etc/questions/������� �������� �������*"; -nrel_key_fragment = "/etc/questions/�������� �������� �������*"; -nrel_answer = "/etc/questions/�����*"; -nrel_general_formulation = "/etc/questions/���������� ������������ �������*"; \ No newline at end of file + +/* +----------------------------------------------------------------------------- +This source file is part of OSTIS (Open Semantic Technology for Intelligent Systems) +For the latest info, see http://www.ostis.net + +Copyright (c) 2010 OSTIS + +OSTIS is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +OSTIS is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with OSTIS. If not, see . +----------------------------------------------------------------------------- +*/ + +question = "/etc/questions/������"; +q_initiated = "/etc/questions/�������������� ������"; +q_atom = "/etc/questions/��������� ������"; +q_noatom = "/etc/questions/����������� ������"; +q_active = "/etc/questions/�������� ������"; +q_finished = "/etc/questions/������������ ������"; +q_successful = "/etc/questions/�������� ������"; + +q_search_subsets = "/etc/questions/����� �����������"; +q_search_supersets = "/etc/questions/����� �����������"; +q_search_all_pos_in_arcs = "/etc/questions/����� ���������� �������� ���"; +q_search_all_pos_out_arcs = "/etc/questions/����� ���������� ��������� ���"; +q_search_authors = "/etc/questions/����� �������"; +q_search_identifiers = "/etc/questions/����� ������� ���������������"; +q_search_decomposition = "/etc/questions/����� ������������ �������"; +q_search_illustration = "/etc/questions/����� ����������� �������"; + +q_verification = "/etc/questions/������ �����������"; +q_add_child_command = "/etc/questions/������ ���������� �������� �������"; +q_remove_child_command = "/etc/questions/������ �������� �������� �������"; + +q_generate_construct = "/etc/questions/������ ��������� SC-�����������"; +q_erase_set_elements = "/etc/questions/������ �������� ��������� ���������"; +q_el_content = "/etc/questions/������ ����������� ��������"; + +q_square = "/etc/questions/������ �������"; + +q_addition = "/etc/questions/������ �����"; +q_multiplication = "/etc/questions/������ ������������"; +q_exponention = "/etc/questions/������ �������"; +q_calculation = "/etc/questions/������ ����������"; + +q_statement_validity = "/etc/questions/������ ���������� ������������"; +q_var_value = "/etc/questions/������ �������� ��������"; +q_postorder_tree_search = "/etc/questions/������ ������ � �������"; +q_production = "/etc/questions/������ ���������"; +q_gen_all_accessory_links = "/etc/questions/������ ��������� ���� ������ ��������������"; +q_gen_all_trans_relation_links = "/etc/questions/������ ��������� ���� ������ ���������"; + +nrel_action_area = "/etc/questions/������� �������� �������*"; +nrel_key_fragment = "/etc/questions/�������� �������� �������*"; +nrel_answer = "/etc/questions/�����*"; +nrel_general_formulation = "/etc/questions/���������� ������������ �������*"; +q_mycommand = "/etc/questions/��� �������"; \ No newline at end of file diff --git a/repo/fs_repo_src/operation/get_my_command.m4scp b/repo/fs_repo_src/operation/get_my_command.m4scp new file mode 100644 index 0000000..1e6e96c --- /dev/null +++ b/repo/fs_repo_src/operation/get_my_command.m4scp @@ -0,0 +1,361 @@ + + +/* +----------------------------------------------------------------------------- +This source file is part of OSTIS (Open Semantic Technology for Intelligent Systems) +For the latest info, see http://www.ostis.net + +Copyright (c) 2011 OSTIS + +OSTIS is free software: you can redistribute it and/or modfirst_ely +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +OSTIS is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with OSTIS. first_el not, see . +----------------------------------------------------------------------------- +*/ + +///////////////////////////////////////////////////// +// File: get_length.m4scp +// Description: ���� �������� �������� ���������� ����� +///////////////////////////////////////////////////// +// Author: Sergei Zalivako +// Date: 14.02.2012 +#include "meta_info.scsy" +#include "scp_keynodes.scsy" +#include "etc_questions.scsy" +#include "com_keynodes.scsy" +#include "lib_search.scsy" +#include "lib_check.scsy" +#include "lib_gen.scsy" +#include "lib_answer.scsy" +#include "lib_set.scsy" + + +program(init_op, +[[ + // ���������� SCP-��������� + my_comm; + // �������� ����, ������������ �������������� ������ + q_initiated; + // �������, �� ������� ��������� ����������(���������� ��������� ���� �� ����) + catch_output_arc; +]], +[{ +}], +{[ +]} +) +// ��������� ����������� ������� �� ���������� ���� �� ���� "�������������� ������" +sys_set_event_handler([ + 1_: fixed_: catch_output_arc, + 2_: fixed_: my_comm, + 3_: fixed_: {1_: q_initiated} +]) + +return() + +end + +procedure(my_comm, +[[ + // �������� ����, ������������ ������ + q_mycommand; + + // �������� ����, ������������ �������������� ������ + q_initiated; + + // �������� ����, ������������ ������ + question; + + // �������� ����, ������������ ������ �������� �������� + q_var_value; + + // ������� ����������� ������ + rrel_answer_is_present; + + // �������� ���� ��������� ��������� + nrel_length; + + // ��������� ������ �������� �������� + search_quantity_value; + + // ������� ��� ����������� ����������� ����� + rrel_decimal_number; + + // ��������� ������ ����� �������� ���� + search_bin_pair_end_proc; + + // ��������� ��� ��������� ������ + answer_make; + + // ��������� �������� �������� �� ��������� + set_rm_el; + + // ����, ���������� �������� �������� ����� 0 + zero =n= 0; + nrel_decomposition; + // ����, ���������� �������� �������� ����� 1 + one =n= 1; + //������� ������� ���� + main_menu; + + // ������ ��� ������ �������������� ��������� ��� ��������� + +/*! + Procedure to find construction showed on schema with specified relation. + + relation + | + | + v + O<======== (-) + |-----> e1 + | + |-----> e2 + | + .... + |-----> en + + @result Result contains whole construction (excluding O) set and binary pair (author relation) +*/ + + pattern = [ + _rel_arc = (_relation ->> _tmp_rel); + _con_a2 = (_tmp_rel ->> _elem); + _con_a1 = (_tmp_rel ->> _node); + _attr_a1 = (1_ ->> _con_a1); + _attr_a2 = (2_ ->> _con_a2); + _arc = (_node ->> _elem_node) + ]; + + +]], +[{ + handler, element, + arcFromRequest, arcFromQuestion, + location, segments, + questionLink, + arcForChecking, arcVar, attributeArc, nodeVar, checkingNode, + object, valueNode, questionNode, result, + upper_menu, + old_upper_menu, + stype_sheaf_s, + needEraseArc, + EraseInFindedDecomp, + node, + arc, + searching_node, + finded_decomp, + //������ + sheaf, + viewedNode, + parentNode, + nodesToView, + arcVari, + arcVaric, + up_node, + up_nodes, + upViewedNode, + stype_sheaf, + relation, + node1, + answer +}], +{[ + 1_: in_: handler, + 2_: in_: element, + 3_: in_: arcFromQuestion, + 4_: in_: questionLink +]} +) + +// ��������� ��������, � ������� ��������� ���� ��������� ����� +sys_get_location([ + 1_: fixed_: questionLink, + 2_: assign_: location +]) + +// ��������� ���������� �������� ��� ��������� +sys_set_default_segment([ + 1_: fixed_: location +]) + +// �������������� �������������� �������� +sys_spin_segment([ + 1_: fixed_: location, + 2_: assign_: segments +]) + +// ���������, ��� � ���� ������� ��������� ���� �� ���� "������ �����" +searchElStr3([ + 1_: fixed_: q_mycommand, + 2_: assign_: const_: pos_: arc_: arcFromRequest, + 3_: fixed_: questionLink +], , finishOperation) + +// ������� ������, ����� �������� ���� ����� +searchElStr3([ + 1_: fixed_: questionLink, + 2_: assign_: const_: pos_: arc_: arcVar, + 3_: assign_: const_: node_: object +]) +// good - merged +// ������� �������� ����� ��� ���������� ������� + genEl([ + 1_: assign_: node_: result + ]) + genEl([ + 1_: assign_: node_: nodesToView + ]) + genEl([ + 1_: assign_: node_: up_nodes + ]) +varAssign([1_:upper_menu,2_:object]) + + +/* make answer */ + +genElStr3([ + 1_:fixed_:result, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:upper_menu +]) + +label(oneMoreUp) +varAssign([1_:old_upper_menu,2_:upper_menu]) + +// ���� ����������� �� ����� +sys_search([ + 1_: fixed_: pattern, + 2_: fixed_: { + {1_: _elem, 2_: viewedNode} + }, + 3_: fixed_: { + {1_: _relation, 2_: nrel_decomposition}, + {1_: _elem_node, 2_: upper_menu} + } +], , goto_error) + +searchSetStr3([ + 1_:fixed_:q_atom, + 2_:assign_:arc_:arc, + 3_:fixed_:viewedNode +],foundNewParentNode,,error) +searchSetStr3([ + 1_:fixed_:q_noatom, + 2_:assign_:arc_:arc, + 3_:fixed_:viewedNode +],foundNewParentNode,,error) +searchSetStr3([ + 1_:fixed_:ui_noatom_command, + 2_:assign_:arc_:arc, + 3_:fixed_:viewedNode +],foundNewParentNode,,error) +searchSetStr3([ + 1_:fixed_:ui_atom_command, + 2_:assign_:arc_:arc, + 3_:fixed_:viewedNode +],foundNewParentNode,,error) + +label(foundNewParentNode) + +ifCoin([ + 1_:fixed_:viewedNode, + 2_:fixed_:"/ui/menu/main_menu" +],ending,secondSegment,goto_error) + +label(secondSegment) +genElStr5([ + 1_:fixed_:viewedNode, + 2_:assign_:const_:pos_:arcVar, + 3_:fixed_:old_upper_menu, + 4_:assign_:const_:pos_:arcVaric, + 5_:fixed_:nrel_basic_sequence +]) + +genElStr3([ + 1_:fixed_:result, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:viewedNode +]) + +genElStr3([ + 1_:fixed_:result, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVaric +]) + +genElStr3([ + 1_:fixed_:result, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +]) + + + +varAssign([1_:upper_menu,2_:viewedNode],oneMoreUp) + +label(ending) + +genElStr5([ + 1_:fixed_:"/ui/menu/main_menu", + 2_:assign_:const_:pos_:arcVar, + 3_:fixed_:old_upper_menu, + 4_:assign_:const_:pos_:arcVaric, + 5_:fixed_:nrel_basic_sequence +]) + +genElStr3([ + 1_:fixed_:result, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:viewedNode +]) + +genElStr3([ + 1_:fixed_:result, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVaric +]) + +genElStr3([ + 1_:fixed_:result, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +]) + +genElStr3([ + 1_:fixed_:result, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:nrel_basic_sequence +]) + + ///////////////////////////////////////////////////// + // Call of the answer making procedure + callReturn([ + 1_: fixed_: answer_make, + 2_: fixed_: {[ + 1_: questionLink, + 2_: result + ]} + ] + ) + +label(theend) +printNl([ 1_: /"theend"/ ]) +label(goto_error) +printNl([ 1_: /"goto_error"/ ]) +label(finish_op) +printNl([ 1_: /"finish_op"/ ]) +label(finishOperation) +printNl([ 1_: /"finishOperation"/ ]) +return() + +end \ No newline at end of file diff --git a/repo/fs_repo_src/startup.scs b/repo/fs_repo_src/startup.scs index eee032b..0990605 100644 --- a/repo/fs_repo_src/startup.scs +++ b/repo/fs_repo_src/startup.scs @@ -1,39 +1,40 @@ - -/* ------------------------------------------------------------------------------ -This source file is part of OSTIS (Open Semantic Technology for Intelligent Systems) -For the latest info, see http://www.ostis.net - -Copyright (c) 2010 OSTIS - -OSTIS is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -OSTIS is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with OSTIS. If not, see . ------------------------------------------------------------------------------ -*/ - - -// ������ �������� ��� ������ ������������� ������ - -"/proc/keynode/current_module" -> "/proc/keynode/startup_" : { - - "/operation/search_all_output_pos_arcs_with_attr/init_op", - "/operation/search_all_input_pos_arcs/init_op", - "/operation/search_all_output_pos_arcs/init_op", - "/operation/search_authors/init_op", - "/operation/search_identifiers/init_op", - "/operation/search_decomposition/init_op", - "/operation/search_illustration/init_op", - - "/operation/ui_change_localization/init_op" - + +/* +----------------------------------------------------------------------------- +This source file is part of OSTIS (Open Semantic Technology for Intelligent Systems) +For the latest info, see http://www.ostis.net + +Copyright (c) 2010 OSTIS + +OSTIS is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +OSTIS is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with OSTIS. If not, see . +----------------------------------------------------------------------------- +*/ + + +// ������ �������� ��� ������ ������������� ������ + +"/proc/keynode/current_module" -> "/proc/keynode/startup_" : { + + "/operation/search_all_output_pos_arcs_with_attr/init_op", + "/operation/search_all_input_pos_arcs/init_op", + "/operation/search_all_output_pos_arcs/init_op", + "/operation/search_authors/init_op", + "/operation/search_identifiers/init_op", + "/operation/search_decomposition/init_op", + "/operation/search_illustration/init_op", + "/operation/get_my_command/init_op", + + "/operation/ui_change_localization/init_op" + }; \ No newline at end of file diff --git a/repo/fs_repo_src/ui/menu/na_main_menu.gwf b/repo/fs_repo_src/ui/menu/na_main_menu.gwf index f01ceb2..ec9979e 100644 --- a/repo/fs_repo_src/ui/menu/na_main_menu.gwf +++ b/repo/fs_repo_src/ui/menu/na_main_menu.gwf @@ -1,107 +1,107 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/repo/fs_repo_src/ui/menu/na_main_menu/na_problems_solution.gwf b/repo/fs_repo_src/ui/menu/na_main_menu/na_problems_solution.gwf index d017fb8..82ef8d2 100644 --- a/repo/fs_repo_src/ui/menu/na_main_menu/na_problems_solution.gwf +++ b/repo/fs_repo_src/ui/menu/na_main_menu/na_problems_solution.gwf @@ -1,104 +1,110 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/repo/fs_repo_src/ui/menu/na_main_menu/na_problems_solution/a_my_command.gwf b/repo/fs_repo_src/ui/menu/na_main_menu/na_problems_solution/a_my_command.gwf new file mode 100644 index 0000000..f0936ab --- /dev/null +++ b/repo/fs_repo_src/ui/menu/na_main_menu/na_problems_solution/a_my_command.gwf @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 2fbce08db15e735ddd620a404ea762159cfee951 Mon Sep 17 00:00:00 2001 From: dmitry Date: Tue, 18 Dec 2012 10:14:25 +0300 Subject: [PATCH 2/3] upd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit генерация последовательности действиий для проигрывателя --- .../operation/get_my_command.m4scp | 449 +++++++++++++++++- 1 file changed, 425 insertions(+), 24 deletions(-) diff --git a/repo/fs_repo_src/operation/get_my_command.m4scp b/repo/fs_repo_src/operation/get_my_command.m4scp index 1e6e96c..e6282a9 100644 --- a/repo/fs_repo_src/operation/get_my_command.m4scp +++ b/repo/fs_repo_src/operation/get_my_command.m4scp @@ -107,6 +107,8 @@ procedure(my_comm, //������� ������� ���� main_menu; + stype_sheaf; + // ������ ��� ������ �������������� ��������� ��� ��������� /*! @@ -151,8 +153,11 @@ procedure(my_comm, needEraseArc, EraseInFindedDecomp, node, + oneMoreNode, arc, searching_node, + deleteAfterUse, + updateAfterUse, finded_decomp, //������ sheaf, @@ -164,9 +169,10 @@ procedure(my_comm, up_node, up_nodes, upViewedNode, - stype_sheaf, relation, node1, + mypermrel, + myresult, answer }], {[ @@ -211,15 +217,54 @@ searchElStr3([ // ������� �������� ����� ��� ���������� ������� genEl([ 1_: assign_: node_: result + ]) + genEl([ + 1_: assign_: node_: myresult ]) genEl([ 1_: assign_: node_: nodesToView ]) genEl([ 1_: assign_: node_: up_nodes + ]) + genEl([ + 1_: assign_: node_: mypermrel ]) varAssign([1_:upper_menu,2_:object]) + genEl([ + 1_: assign_: var_: node_: node + ]) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:node +]) +genElStr3([ + 1_:fixed_:ui_user_command, + 2_:assign_:var_:pos_:arcVar, + 3_:fixed_:node +]) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:ui_user_command +]) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +]) +genElStr3([ + 1_:fixed_:node, + 2_:assign_:var_:pos_:arcVar, + 3_:assign_:var_:oneMoreNode +]) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +]) /* make answer */ @@ -273,24 +318,17 @@ ifCoin([ ],ending,secondSegment,goto_error) label(secondSegment) -genElStr5([ - 1_:fixed_:viewedNode, - 2_:assign_:const_:pos_:arcVar, - 3_:fixed_:old_upper_menu, - 4_:assign_:const_:pos_:arcVaric, - 5_:fixed_:nrel_basic_sequence -]) genElStr3([ - 1_:fixed_:result, - 2_:assign_:const_:pos_:arc, - 3_:fixed_:viewedNode + 1_:fixed_:viewedNode, + 2_:assign_:var_:neg_:arcVar, + 3_:fixed_:old_upper_menu ]) genElStr3([ 1_:fixed_:result, 2_:assign_:const_:pos_:arc, - 3_:fixed_:arcVaric + 3_:fixed_:viewedNode ]) genElStr3([ @@ -305,12 +343,12 @@ varAssign([1_:upper_menu,2_:viewedNode],oneMoreUp) label(ending) -genElStr5([ - 1_:fixed_:"/ui/menu/main_menu", - 2_:assign_:const_:pos_:arcVar, - 3_:fixed_:old_upper_menu, - 4_:assign_:const_:pos_:arcVaric, - 5_:fixed_:nrel_basic_sequence +varAssign([1_:upper_menu,2_:"/ui/menu/main_menu"]) + +genElStr3([ + 1_:fixed_:upper_menu, + 2_:assign_:var_:neg_:arc_:arcVar, + 3_:fixed_:old_upper_menu ]) genElStr3([ @@ -322,20 +360,383 @@ genElStr3([ genElStr3([ 1_:fixed_:result, 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],thirdSegment) + +label(thirdSegment) +/////////////////////////////////////////////////////// +varAssign([1_:viewedNode,2_:upper_menu]) + +label(generetionOneMore) +printNl([ 1_: /"***************************"/ ]) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:oneMoreNode +],,,goto_error) + +genElStr3([ + 1_:fixed_:ui_cmd_mouse_move_obj, + 2_:assign_:var_:pos_:arcVar, + 3_:fixed_:oneMoreNode +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:ui_cmd_mouse_move_obj +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],,,goto_error) + + + +genElStr3([ + 1_:fixed_:"������������ ���������������� �������", + 2_:assign_:var_:pos_:arcVar, + 3_:fixed_:oneMoreNode +],,,goto_error) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],,,goto_error) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:"������������ ���������������� �������" +],,,goto_error) + +genElStr3([ + 1_:fixed_:oneMoreNode, + 2_:assign_:var_:pos_:arcVar, + 3_:fixed_:viewedNode +],,,goto_error) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:viewedNode +],,,goto_error) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],,,goto_error) + +genElStr5([ + 1_:fixed_:oneMoreNode, + 2_:assign_:var_:pos_:arcVar, + 3_:assign_:var_:node, + 4_:assign_:var_:arcVaric, + 5_:fixed_:1_ +],,,goto_error) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:node +],,,goto_error) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, 3_:fixed_:arcVaric -]) +],,,goto_error) +genElStr5([ + 1_:fixed_:node, + 2_:assign_:var_:pos_:arcVar, + 3_:assign_:var_:oneMoreNode, + 4_:assign_:var_:arcVaric, + 5_:fixed_:2_ +],,,goto_error) genElStr3([ - 1_:fixed_:result, + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:oneMoreNode +]) +genElStr3([ + 1_:fixed_:myresult, 2_:assign_:const_:pos_:arc, 3_:fixed_:arcVar -]) +],,,goto_error) genElStr3([ - 1_:fixed_:result, + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVaric +],,,goto_error) + +genElStr3([ + 1_:fixed_:node, + 2_:assign_:var_:pos_:arcVar, + 3_:fixed_:"������� ������������������*" +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],,,goto_error) + +genElStr3([ + 1_:fixed_:node, + 2_:assign_:var_:pos_:arcVar, + 3_:fixed_:stype_sheaf +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],,,goto_error) + +//////////////////////////////////////////////// + +genElStr3([ + 1_:fixed_:ui_cmd_mouse_button_press, + 2_:assign_:var_:pos_:arcVar, + 3_:fixed_:oneMoreNode +],,,goto_error) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:ui_cmd_mouse_button_press +],,,goto_error) +genElStr3([ + 1_:fixed_:myresult, 2_:assign_:const_:pos_:arc, - 3_:fixed_:nrel_basic_sequence + 3_:fixed_:arcVar +],,,goto_error) + + +genElStr3([ + 1_:fixed_:"������������ ���������������� �������", + 2_:assign_:var_:pos_:arcVar, + 3_:fixed_:oneMoreNode +],,,goto_error) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],,,goto_error) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:"������������ ���������������� �������" +],,,goto_error) + +genElStr3([ + 1_:fixed_:oneMoreNode, + 2_:assign_:var_:pos_:arcVar, + 3_:fixed_:mouse_button_left +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:mouse_button_left +],,,goto_error) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],,,goto_error) + +genElStr5([ + 1_:fixed_:oneMoreNode, + 2_:assign_:var_:pos_:arcVar, + 3_:assign_:var_:node, + 4_:assign_:var_:arcVaric, + 5_:fixed_:1_ +],,,goto_error) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:node +],,,goto_error) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVaric +],,,goto_error) + +genElStr5([ + 1_:fixed_:node, + 2_:assign_:var_:pos_:arcVar, + 3_:assign_:var_:oneMoreNode, + 4_:assign_:var_:arcVaric, + 5_:fixed_:2_ +],,,goto_error) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:oneMoreNode ]) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVaric +],,,goto_error) + +genElStr3([ + 1_:fixed_:node, + 2_:assign_:var_:pos_:arcVar, + 3_:fixed_:"������� ������������������*" +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],,,goto_error) + +genElStr3([ + 1_:fixed_:node, + 2_:assign_:var_:pos_:arcVar, + 3_:fixed_:stype_sheaf +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],,,goto_error) +//////////////////////////////////////////////// + +genElStr3([ + 1_:fixed_:ui_cmd_mouse_button_release, + 2_:assign_:var_:pos_:arc, + 3_:fixed_:oneMoreNode +],,,goto_error) + +genElStr3([ + 1_:fixed_:"������������ ���������������� �������", + 2_:assign_:var_:pos_:arc, + 3_:fixed_:oneMoreNode +],,,goto_error) + +genElStr3([ + 1_:fixed_:oneMoreNode, + 2_:assign_:var_:pos_:arc, + 3_:fixed_:mouse_button_left +],,,goto_error) + +genElStr5([ + 1_:fixed_:oneMoreNode, + 2_:assign_:var_:pos_:arcVar, + 3_:assign_:var_:node, + 4_:assign_:var_:arcVaric, + 5_:fixed_:1_ +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVaric +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:node +],,,goto_error) + +genElStr5([ + 1_:fixed_:node, + 2_:assign_:var_:pos_:arcVaric, + 3_:assign_:var_:oneMoreNode, + 4_:assign_:var_:arcVar, + 5_:fixed_:2_ +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVaric +],,,goto_error) + +genElStr3([ + 1_:fixed_:node, + 2_:assign_:var_:pos_:arcVar, + 3_:fixed_:"������� ������������������*" +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],,,goto_error) + +genElStr3([ + 1_:fixed_:node, + 2_:assign_:var_:pos_:arcVar, + 3_:fixed_:stype_sheaf +],,,goto_error) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:arcVar +],,,goto_error) +//////////////////////////////////////////// + +searchElStr3([ + 1_: fixed_: viewedNode, + 2_: assign_: var_:neg_: arcVar, + 3_: assign_: updateAfterUse +],,genAnswer) + + +varAssign([1_:viewedNode,2_:updateAfterUse],generetionOneMore) + +label(genAnswer) +printNl([ 1_: /"genAnswer"/ ]) + +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:"������� ������������������*" +],,,goto_error) +genElStr3([ + 1_:fixed_:myresult, + 2_:assign_:const_:pos_:arc, + 3_:fixed_:stype_sheaf +],,,goto_error) + +printEl([ 1_: myresult]) ///////////////////////////////////////////////////// // Call of the answer making procedure @@ -343,7 +744,7 @@ genElStr3([ 1_: fixed_: answer_make, 2_: fixed_: {[ 1_: questionLink, - 2_: result + 2_: myresult ]} ] ) From 776ecea8d2e277d77ead81ab98e91b1251737ff5 Mon Sep 17 00:00:00 2001 From: dmitry Date: Sat, 22 Dec 2012 13:27:37 +0300 Subject: [PATCH 3/3] upd var to const upd --- .../operation/get_my_command.m4scp | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/repo/fs_repo_src/operation/get_my_command.m4scp b/repo/fs_repo_src/operation/get_my_command.m4scp index e6282a9..8f96248 100644 --- a/repo/fs_repo_src/operation/get_my_command.m4scp +++ b/repo/fs_repo_src/operation/get_my_command.m4scp @@ -232,7 +232,7 @@ searchElStr3([ ]) varAssign([1_:upper_menu,2_:object]) genEl([ - 1_: assign_: var_: node_: node + 1_: assign_: const_: node_: node ]) genElStr3([ @@ -242,7 +242,7 @@ genElStr3([ ]) genElStr3([ 1_:fixed_:ui_user_command, - 2_:assign_:var_:pos_:arcVar, + 2_:assign_:const_:pos_:arcVar, 3_:fixed_:node ]) genElStr3([ @@ -257,8 +257,8 @@ genElStr3([ ]) genElStr3([ 1_:fixed_:node, - 2_:assign_:var_:pos_:arcVar, - 3_:assign_:var_:oneMoreNode + 2_:assign_:const_:pos_:arcVar, + 3_:assign_:const_:oneMoreNode ]) genElStr3([ 1_:fixed_:myresult, @@ -321,7 +321,7 @@ label(secondSegment) genElStr3([ 1_:fixed_:viewedNode, - 2_:assign_:var_:neg_:arcVar, + 2_:assign_:const_:neg_:arcVar, 3_:fixed_:old_upper_menu ]) @@ -347,7 +347,7 @@ varAssign([1_:upper_menu,2_:"/ui/menu/main_menu"]) genElStr3([ 1_:fixed_:upper_menu, - 2_:assign_:var_:neg_:arc_:arcVar, + 2_:assign_:const_:neg_:arc_:arcVar, 3_:fixed_:old_upper_menu ]) @@ -377,7 +377,7 @@ genElStr3([ genElStr3([ 1_:fixed_:ui_cmd_mouse_move_obj, - 2_:assign_:var_:pos_:arcVar, + 2_:assign_:const_:pos_:arcVar, 3_:fixed_:oneMoreNode ],,,goto_error) @@ -397,7 +397,7 @@ genElStr3([ genElStr3([ 1_:fixed_:"������������ ���������������� �������", - 2_:assign_:var_:pos_:arcVar, + 2_:assign_:const_:pos_:arcVar, 3_:fixed_:oneMoreNode ],,,goto_error) genElStr3([ @@ -413,7 +413,7 @@ genElStr3([ genElStr3([ 1_:fixed_:oneMoreNode, - 2_:assign_:var_:pos_:arcVar, + 2_:assign_:const_:pos_:arcVar, 3_:fixed_:viewedNode ],,,goto_error) genElStr3([ @@ -429,9 +429,9 @@ genElStr3([ genElStr5([ 1_:fixed_:oneMoreNode, - 2_:assign_:var_:pos_:arcVar, - 3_:assign_:var_:node, - 4_:assign_:var_:arcVaric, + 2_:assign_:const_:pos_:arcVar, + 3_:assign_:const_:node, + 4_:assign_:const_:arcVaric, 5_:fixed_:1_ ],,,goto_error) genElStr3([ @@ -453,9 +453,9 @@ genElStr3([ genElStr5([ 1_:fixed_:node, - 2_:assign_:var_:pos_:arcVar, - 3_:assign_:var_:oneMoreNode, - 4_:assign_:var_:arcVaric, + 2_:assign_:const_:pos_:arcVar, + 3_:assign_:const_:oneMoreNode, + 4_:assign_:const_:arcVaric, 5_:fixed_:2_ ],,,goto_error) genElStr3([ @@ -477,7 +477,7 @@ genElStr3([ genElStr3([ 1_:fixed_:node, - 2_:assign_:var_:pos_:arcVar, + 2_:assign_:const_:pos_:arcVar, 3_:fixed_:"������� ������������������*" ],,,goto_error) @@ -489,7 +489,7 @@ genElStr3([ genElStr3([ 1_:fixed_:node, - 2_:assign_:var_:pos_:arcVar, + 2_:assign_:const_:pos_:arcVar, 3_:fixed_:stype_sheaf ],,,goto_error) @@ -503,7 +503,7 @@ genElStr3([ genElStr3([ 1_:fixed_:ui_cmd_mouse_button_press, - 2_:assign_:var_:pos_:arcVar, + 2_:assign_:const_:pos_:arcVar, 3_:fixed_:oneMoreNode ],,,goto_error) genElStr3([ @@ -520,7 +520,7 @@ genElStr3([ genElStr3([ 1_:fixed_:"������������ ���������������� �������", - 2_:assign_:var_:pos_:arcVar, + 2_:assign_:const_:pos_:arcVar, 3_:fixed_:oneMoreNode ],,,goto_error) genElStr3([ @@ -536,7 +536,7 @@ genElStr3([ genElStr3([ 1_:fixed_:oneMoreNode, - 2_:assign_:var_:pos_:arcVar, + 2_:assign_:const_:pos_:arcVar, 3_:fixed_:mouse_button_left ],,,goto_error) @@ -553,9 +553,9 @@ genElStr3([ genElStr5([ 1_:fixed_:oneMoreNode, - 2_:assign_:var_:pos_:arcVar, - 3_:assign_:var_:node, - 4_:assign_:var_:arcVaric, + 2_:assign_:const_:pos_:arcVar, + 3_:assign_:const_:node, + 4_:assign_:const_:arcVaric, 5_:fixed_:1_ ],,,goto_error) genElStr3([ @@ -577,9 +577,9 @@ genElStr3([ genElStr5([ 1_:fixed_:node, - 2_:assign_:var_:pos_:arcVar, - 3_:assign_:var_:oneMoreNode, - 4_:assign_:var_:arcVaric, + 2_:assign_:const_:pos_:arcVar, + 3_:assign_:const_:oneMoreNode, + 4_:assign_:const_:arcVaric, 5_:fixed_:2_ ],,,goto_error) genElStr3([ @@ -601,7 +601,7 @@ genElStr3([ genElStr3([ 1_:fixed_:node, - 2_:assign_:var_:pos_:arcVar, + 2_:assign_:const_:pos_:arcVar, 3_:fixed_:"������� ������������������*" ],,,goto_error) @@ -613,7 +613,7 @@ genElStr3([ genElStr3([ 1_:fixed_:node, - 2_:assign_:var_:pos_:arcVar, + 2_:assign_:const_:pos_:arcVar, 3_:fixed_:stype_sheaf ],,,goto_error) @@ -626,27 +626,27 @@ genElStr3([ genElStr3([ 1_:fixed_:ui_cmd_mouse_button_release, - 2_:assign_:var_:pos_:arc, + 2_:assign_:const_:pos_:arc, 3_:fixed_:oneMoreNode ],,,goto_error) genElStr3([ 1_:fixed_:"������������ ���������������� �������", - 2_:assign_:var_:pos_:arc, + 2_:assign_:const_:pos_:arc, 3_:fixed_:oneMoreNode ],,,goto_error) genElStr3([ 1_:fixed_:oneMoreNode, - 2_:assign_:var_:pos_:arc, + 2_:assign_:const_:pos_:arc, 3_:fixed_:mouse_button_left ],,,goto_error) genElStr5([ 1_:fixed_:oneMoreNode, - 2_:assign_:var_:pos_:arcVar, - 3_:assign_:var_:node, - 4_:assign_:var_:arcVaric, + 2_:assign_:const_:pos_:arcVar, + 3_:assign_:const_:node, + 4_:assign_:const_:arcVaric, 5_:fixed_:1_ ],,,goto_error) @@ -670,9 +670,9 @@ genElStr3([ genElStr5([ 1_:fixed_:node, - 2_:assign_:var_:pos_:arcVaric, - 3_:assign_:var_:oneMoreNode, - 4_:assign_:var_:arcVar, + 2_:assign_:const_:pos_:arcVaric, + 3_:assign_:const_:oneMoreNode, + 4_:assign_:const_:arcVar, 5_:fixed_:2_ ],,,goto_error) @@ -690,7 +690,7 @@ genElStr3([ genElStr3([ 1_:fixed_:node, - 2_:assign_:var_:pos_:arcVar, + 2_:assign_:const_:pos_:arcVar, 3_:fixed_:"������� ������������������*" ],,,goto_error) @@ -702,7 +702,7 @@ genElStr3([ genElStr3([ 1_:fixed_:node, - 2_:assign_:var_:pos_:arcVar, + 2_:assign_:const_:pos_:arcVar, 3_:fixed_:stype_sheaf ],,,goto_error) @@ -715,7 +715,7 @@ genElStr3([ searchElStr3([ 1_: fixed_: viewedNode, - 2_: assign_: var_:neg_: arcVar, + 2_: assign_: const_:neg_: arcVar, 3_: assign_: updateAfterUse ],,genAnswer)