• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

haiiliin / abqpy / 8433139069

26 Mar 2024 08:44AM UTC coverage: 73.951% (+0.1%) from 73.831%
8433139069

push

github

haiiliin
pre-commit update

40 of 67 new or added lines in 57 files covered. (59.7%)

5 existing lines in 5 files now uncovered.

24153 of 32661 relevant lines covered (73.95%)

0.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/abaqus/PlugInRegistration/GUIPlugInCommands.py
1
"""GUI plug-in commands register GUI plug-ins either in the **Plug-ins** menu or in a toolbox."""
2

UNCOV
3
from typing import Sequence
×
4

5
from ..UtilityAndView.abaqusConstants import ALL, SymbolicConstant
×
6
from .AFXMode import AFXMode
×
7
from .FXIcon import FXIcon
×
8
from .FXObject import FXObject
×
9
from .PluginToolsetBase import PluginToolsetBase
×
10

11

12
class GUIPluginToolset(PluginToolsetBase):
×
13
    def registerGuiMenuButton(
×
14
        self,
15
        object: FXObject,
16
        buttonText: str = "",
17
        messageId: int = AFXMode.ID_ACTIVATE,
18
        icon: FXIcon | None = None,
19
        kernelInitString: str = "",
20
        applicableModules: SymbolicConstant | Sequence[str] = ALL,
21
        version: str = "N/A",
22
        author: str = "N/A",
23
        description: str = "N/A",
24
        helpUrl: str = "N/A",
25
    ):
26
        """Registers a GUI plug-in in the **Plug-ins** menu.
27

28
        Parameters
29
        ----------
30
        object : FXObject
31
            The GUI object to which a (messageId, SEL_COMMAND) message will be sent. The object must have been inherited
32
            from FXObject.
33
        buttonText : str, optional
34
            A String specifying the text to be displayed in the **Plug-ins** menu. Use a pipe ( | ) between words to specify
35
            submenus. The default value is the empty string.
36
        messageId : int, optional
37
            An Int specifying the ID to be used when sending a command to the GUI object. The default value is
38
            _AFXMode.ID_ACTIVATE_.
39
        icon : FXIcon, optional
40
            A FXIcon object specifying an icon to be displayed to the left of the text in the menu. For more information,
41
            see [afxCreateIcon](pt01ch01gob125.htm?contextscope=all#gui-auxiliary-afxcreateicon) in the
42
            “Auxiliary functions” section of this guide. The default value is None.
43
        kernelInitString : str, optional
44
            A String specifying the string sent to the kernel the first time this plug-in is invoked. The string is intended
45
            to initialize the kernel (typically by importing modules) in preparation for commands that will be sent by this
46
            plug-in’s GUI. The default value is the empty string.
47
        applicableModules : SymbolicConstant | Sequence[str], optional
48
            The SymbolicConstant ALL or a sequence of one or more Strings specifying the list of modules to which this
49
            plug-in applies. If a plug-in is not applicable to a module, it will be hidden when the user switches into that
50
            module. Possible values of the Strings in the sequence are “Part”, “Property”, “Assembly”, “Step”,
51
            “Interaction”, “Load”, “Mesh”, “Job”, “Visualization”, and “Sketch”. The default value is ALL.
52
        version : str, optional
53
            A String specifying the version of the plug-in. The version is displayed in the **About Plug-ins** dialog box.
54
            The default value is “N/A”.
55
        author : str, optional
56
            A String specifying the author of the plug-in. The author is displayed in the **About Plug-ins** dialog box.
57
            The default value is “N/A”.
58
        description : str, optional
59
            A String specifying the description of the plug-in. The description is displayed in the **About Plug-ins**
60
            dialog box. The default value is “N/A”.
61
        helpUrl : str, optional
62
            A String specifying the universal resource locator (URL) that points to the help for this plug-in. This URL can
63
            be loaded in a web browser from the **View** button in the **About Plug-ins** dialog box. The default value is
64
            “N/A”.
65
        """
66

67
    def registerGuiToolButton(
×
68
        self,
69
        toolboxName: str,
70
        object: FXObject,
71
        messageId: int = AFXMode.ID_ACTIVATE,
72
        buttonText: str = "",
73
        icon: FXIcon | None = None,
74
        kernelInitString: str = "",
75
        applicableModules: SymbolicConstant | Sequence[str] = ALL,
76
        version: str = "N/A",
77
        author: str = "N/A",
78
        description: str = "N/A",
79
        helpUrl: str = "N/A",
80
    ):
81
        """Registers a GUI plug-in in a toolbox.
82

83
        Parameters
84
        ----------
85
        toolboxName : str
86
            A String specifying the name of the toolbox in which the button will be shown. The name appears in the toolbox
87
            title bar.
88
        object : FXObject
89
            The GUI object to which a (messageId, SEL_COMMAND) message will be sent. The object must have been inherited
90
            from FXObject.
91
        messageId : int, optional
92
            An Int specifying the ID to be used when sending a command to the GUI object. The default value is
93
            _AFXMode.ID_ACTIVATE_.
94
        buttonText : str, optional
95
            A String specifying the text to be displayed in the **Plug-ins** menu. The default value is the empty string.
96
        icon : FXIcon, optional
97
            A FXIcon object specifying an icon to be displayed to the left of the text in the menu. For more information,
98
            see [afxCreateIcon](pt01ch01gob125.htm?contextscope=all#gui-auxiliary-afxcreateicon) in the
99
            “Auxiliary functions” section of this guide. The default value is None.
100
        kernelInitString : str, optional
101
            A String specifying the string sent to the kernel the first time this plug-in is invoked. The string is intended
102
            to initialize the kernel (typically by importing modules) in preparation for commands that will be sent by this
103
            plug-in’s GUI. The default value is the empty string.
104
        applicableModules : SymbolicConstant | Sequence[str], optional
105
            The SymbolicConstant ALL or a sequence of one or more Strings specifying the list of modules to which this
106
            plug-in applies. If a plug-in is not applicable to a module, it will be hidden when the user switches into that
107
            module. Possible values of the Strings in the sequence are “Part”, “Property”, “Assembly”, “Step”,
108
            “Interaction”, “Load”, “Mesh”, “Job”, “Visualization”, and “Sketch”. The default value is ALL.
109
        version : str, optional
110
            A String specifying the version of the plug-in. The version is displayed in the **About Plug-ins** dialog box.
111
            The default value is “N/A”.
112
        author : str, optional
113
            A String specifying the author of the plug-in. The author is displayed in the **About Plug-ins** dialog box.
114
            The default value is “N/A”.
115
        description : str, optional
116
            A String specifying the description of the plug-in. The description is displayed in the **About Plug-ins**
117
            dialog box. The default value is “N/A”.
118
        helpUrl : str, optional
119
            A String specifying the universal resource locator (URL) that points to the help for this plug-in. This URL can
120
            be loaded in a web browser from the **View** button in the **About Plug-ins** dialog box. The default value is
121
            “N/A”.
122
        """
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc