mirror of https://github.com/KLayout/klayout.git
WIP: args notation.
This commit is contained in:
parent
7913e7cf82
commit
4782450170
|
|
@ -122,46 +122,40 @@ Class<lay::AbstractMenu> decl_AbstractMenu ("lay", "AbstractMenu",
|
|||
"\n"
|
||||
"This method has been introduced in version 0.26."
|
||||
) +
|
||||
method ("action", (lay::Action *(lay::AbstractMenu::*) (const std::string &path)) &lay::AbstractMenu::action,
|
||||
method ("action", (lay::Action *(lay::AbstractMenu::*) (const std::string &path)) &lay::AbstractMenu::action, gsi::arg ("path"),
|
||||
"@brief Get the reference to a Action object associated with the given path\n"
|
||||
"@args path\n"
|
||||
"\n"
|
||||
"@param path The path to the item.\n"
|
||||
"@return A reference to a Action object associated with this path or nil if the path is not valid\n"
|
||||
) +
|
||||
method ("items", &lay::AbstractMenu::items,
|
||||
method ("items", &lay::AbstractMenu::items, gsi::arg ("path"),
|
||||
"@brief Get the subitems for a given submenu\n"
|
||||
"@args path\n"
|
||||
"\n"
|
||||
"@param path The path to the submenu\n"
|
||||
"@return A vector or path strings for the child items or an empty vector if the path is not valid or the item does not have children\n"
|
||||
) +
|
||||
method ("is_menu?", &lay::AbstractMenu::is_menu,
|
||||
method ("is_menu?", &lay::AbstractMenu::is_menu, gsi::arg ("path"),
|
||||
"@brief Query if an item is a menu\n"
|
||||
"@args path\n"
|
||||
"\n"
|
||||
"@param path The path to the item\n"
|
||||
"@return false if the path is not valid or is not a menu\n"
|
||||
) +
|
||||
method ("is_separator?", &lay::AbstractMenu::is_separator,
|
||||
method ("is_separator?", &lay::AbstractMenu::is_separator, gsi::arg ("path"),
|
||||
"@brief Query if an item is a separator\n"
|
||||
"@args path\n"
|
||||
"\n"
|
||||
"@param path The path to the item\n"
|
||||
"@return false if the path is not valid or is not a separator\n"
|
||||
"\n"
|
||||
"This method has been introduced in version 0.19.\n"
|
||||
) +
|
||||
method ("is_valid?", &lay::AbstractMenu::is_valid,
|
||||
method ("is_valid?", &lay::AbstractMenu::is_valid, gsi::arg ("path"),
|
||||
"@brief Query if a path is a valid one\n"
|
||||
"@args path\n"
|
||||
"\n"
|
||||
"@param path The path to check\n"
|
||||
"@return false if the path is not a valid path to an item\n"
|
||||
) +
|
||||
method ("insert_item", (void (lay::AbstractMenu::*) (const std::string &, const std::string &, const lay::Action &)) &lay::AbstractMenu::insert_item,
|
||||
method ("insert_item", (void (lay::AbstractMenu::*) (const std::string &, const std::string &, const lay::Action &)) &lay::AbstractMenu::insert_item, gsi::arg ("path"), gsi::arg ("name"), gsi::arg ("action"),
|
||||
"@brief Insert a new item before the one given by the path\n"
|
||||
"@args path, name, action\n"
|
||||
"\n"
|
||||
"The Action object passed as the third parameter references the handler which both implements the "
|
||||
"action to perform and the menu item's appearance such as title, icon and keyboard shortcut.\n"
|
||||
|
|
@ -170,16 +164,14 @@ Class<lay::AbstractMenu> decl_AbstractMenu ("lay", "AbstractMenu",
|
|||
"@param name The name of the item to insert \n"
|
||||
"@param action The Action object to insert\n"
|
||||
) +
|
||||
method ("insert_separator", &lay::AbstractMenu::insert_separator,
|
||||
method ("insert_separator", &lay::AbstractMenu::insert_separator, gsi::arg ("path"), gsi::arg ("name"),
|
||||
"@brief Insert a new separator before the item given by the path\n"
|
||||
"@args path, name\n"
|
||||
"\n"
|
||||
"@param path The path to the item before which to insert the separator\n"
|
||||
"@param name The name of the separator to insert \n"
|
||||
) +
|
||||
method ("insert_menu", (void (lay::AbstractMenu::*) (const std::string &, const std::string &, const std::string &)) &lay::AbstractMenu::insert_menu,
|
||||
method ("insert_menu", (void (lay::AbstractMenu::*) (const std::string &, const std::string &, const std::string &)) &lay::AbstractMenu::insert_menu, gsi::arg ("path"), gsi::arg ("name"), gsi::arg ("title"),
|
||||
"@brief Insert a new submenu before the item given by the path\n"
|
||||
"@args path, name, title\n"
|
||||
"\n"
|
||||
"The title string optionally encodes the key shortcut and icon resource\n"
|
||||
"in the form <text>[\"(\"<shortcut>\")\"][\"<\"<icon-resource>\">\"].\n"
|
||||
|
|
@ -188,15 +180,13 @@ Class<lay::AbstractMenu> decl_AbstractMenu ("lay", "AbstractMenu",
|
|||
"@param name The name of the submenu to insert \n"
|
||||
"@param title The title of the submenu to insert\n"
|
||||
) +
|
||||
method ("delete_item", &lay::AbstractMenu::delete_item,
|
||||
method ("delete_item", &lay::AbstractMenu::delete_item, gsi::arg ("path"),
|
||||
"@brief Delete the item given by the path\n"
|
||||
"@args path\n"
|
||||
"\n"
|
||||
"@param path The path to the item to delete\n"
|
||||
) +
|
||||
method ("group", &lay::AbstractMenu::group,
|
||||
method ("group", &lay::AbstractMenu::group, gsi::arg ("group"),
|
||||
"@brief Get the group members\n"
|
||||
"@args group\n"
|
||||
"\n"
|
||||
"@param group The group name\n"
|
||||
"@param A vector of all members (by path) of the group\n"
|
||||
|
|
@ -236,9 +226,8 @@ Class<lay::AbstractMenu> decl_AbstractMenu ("lay", "AbstractMenu",
|
|||
);
|
||||
|
||||
Class<lay::Action> decl_ActionBase ("lay", "ActionBase",
|
||||
method ("title=", &lay::Action::set_title,
|
||||
method ("title=", &lay::Action::set_title, gsi::arg ("title"),
|
||||
"@brief Sets the title\n"
|
||||
"@args title\n"
|
||||
"\n"
|
||||
"@param title The title string to set (just the title)\n"
|
||||
) +
|
||||
|
|
@ -247,9 +236,8 @@ Class<lay::Action> decl_ActionBase ("lay", "ActionBase",
|
|||
"\n"
|
||||
"@return The current title string\n"
|
||||
) +
|
||||
method ("shortcut=", (void (lay::Action::*)(const std::string &)) &lay::Action::set_shortcut,
|
||||
method ("shortcut=", (void (lay::Action::*)(const std::string &)) &lay::Action::set_shortcut, gsi::arg ("shortcut"),
|
||||
"@brief Sets the keyboard shortcut\n"
|
||||
"@args shortcut\n"
|
||||
"If the shortcut string is empty, the default shortcut will be used. If the string "
|
||||
"is equal to \\Action#NoKeyBound, no keyboard shortcut will be assigned.\n"
|
||||
"\n"
|
||||
|
|
@ -265,9 +253,8 @@ Class<lay::Action> decl_ActionBase ("lay", "ActionBase",
|
|||
"@brief Gets the keyboard shortcut\n"
|
||||
"@return The keyboard shortcut as a string\n"
|
||||
) +
|
||||
method ("default_shortcut=", (void (lay::Action::*)(const std::string &)) &lay::Action::set_default_shortcut,
|
||||
method ("default_shortcut=", (void (lay::Action::*)(const std::string &)) &lay::Action::set_default_shortcut, gsi::arg ("shortcut"),
|
||||
"@brief Sets the default keyboard shortcut\n"
|
||||
"@args shortcut\n"
|
||||
"\n"
|
||||
"The default shortcut is used, if \\shortcut is empty.\n"
|
||||
"\n"
|
||||
|
|
@ -316,55 +303,47 @@ Class<lay::Action> decl_ActionBase ("lay", "ActionBase",
|
|||
"\n"
|
||||
"This attribute has been introduced in version 0.25.\n"
|
||||
) +
|
||||
method ("separator=", &lay::Action::set_separator,
|
||||
method ("separator=", &lay::Action::set_separator, gsi::arg ("separator"),
|
||||
"@brief Makes an item a separator or not\n"
|
||||
"@args separator\n"
|
||||
"\n"
|
||||
"@param separator true to make the item a separator\n"
|
||||
"This method has been introduced in version 0.25.\n"
|
||||
) +
|
||||
method ("checkable=", &lay::Action::set_checkable,
|
||||
method ("checkable=", &lay::Action::set_checkable, gsi::arg ("checkable"),
|
||||
"@brief Make the item(s) checkable or not\n"
|
||||
"@args checkable\n"
|
||||
"\n"
|
||||
"@param checkable true to make the item checkable\n"
|
||||
) +
|
||||
method ("enabled=", &lay::Action::set_enabled,
|
||||
method ("enabled=", &lay::Action::set_enabled, gsi::arg ("enabled"),
|
||||
"@brief Enable or disable the action\n"
|
||||
"@args enabled \n"
|
||||
"\n"
|
||||
"@param enabled true to enable the item\n"
|
||||
) +
|
||||
method ("visible=", &lay::Action::set_visible,
|
||||
method ("visible=", &lay::Action::set_visible, gsi::arg ("visible"),
|
||||
"@brief Show or hide\n"
|
||||
"@args visible \n"
|
||||
"\n"
|
||||
"@param visible true to make the item visible\n"
|
||||
) +
|
||||
method ("hidden=", &lay::Action::set_hidden,
|
||||
method ("hidden=", &lay::Action::set_hidden, gsi::arg ("hidden"),
|
||||
"@brief Sets a value that makes the item hidden always\n"
|
||||
"@args hidden\n"
|
||||
"See \\is_hidden? for details.\n"
|
||||
"\n"
|
||||
"This attribute has been introduced in version 0.25\n"
|
||||
) +
|
||||
method ("checked=", &lay::Action::set_checked,
|
||||
method ("checked=", &lay::Action::set_checked, gsi::arg ("checked"),
|
||||
"@brief Check or uncheck\n"
|
||||
"@args checked \n"
|
||||
"\n"
|
||||
"@param checked true to make the item checked\n"
|
||||
) +
|
||||
method ("icon=", &lay::Action::set_icon,
|
||||
method ("icon=", &lay::Action::set_icon, gsi::arg ("file"),
|
||||
"@brief Set the icon to the given picture\n"
|
||||
"@args file\n"
|
||||
"\n"
|
||||
"@param file The image file to load for the icon\n"
|
||||
"\n"
|
||||
"Passing an empty string will reset the icon\n"
|
||||
) +
|
||||
method ("icon_text=", &lay::Action::set_icon_text,
|
||||
method ("icon_text=", &lay::Action::set_icon_text, gsi::arg ("icon_text"),
|
||||
"@brief Set the icon's text \n"
|
||||
"@args icon_text\n"
|
||||
"\n"
|
||||
"If an icon text is set, this will be used for the text below the icon.\n"
|
||||
"If no icon text is set, the normal text will be used for the icon.\n"
|
||||
|
|
@ -373,9 +352,8 @@ Class<lay::Action> decl_ActionBase ("lay", "ActionBase",
|
|||
method ("icon_text", &lay::Action::get_icon_text,
|
||||
"@brief Get the icon's text\n"
|
||||
) +
|
||||
method ("tool_tip=", &lay::Action::set_tool_tip,
|
||||
method ("tool_tip=", &lay::Action::set_tool_tip, gsi::arg ("text"),
|
||||
"@brief Set the tool tip text \n"
|
||||
"@args text\n"
|
||||
"\n"
|
||||
"The tool tip text is displayed in the tool tip window of the menu entry.\n"
|
||||
"This is in particular useful for entries in the tool bar."
|
||||
|
|
|
|||
Loading…
Reference in New Issue