diff --git a/direct/src/fsm/FSM.py b/direct/src/fsm/FSM.py index bae5dc094b..eb67f55c0a 100644 --- a/direct/src/fsm/FSM.py +++ b/direct/src/fsm/FSM.py @@ -117,7 +117,7 @@ class FSM(DirectObject): at construction time; it is simply in Off already by convention. If you need to call code in enterOff() to initialize your FSM properly, call it explicitly in the constructor. Similarly, when - cleanup() is called or the FSM is destructed, the FSM transitions + `cleanup()` is called or the FSM is destructed, the FSM transitions back to 'Off' by convention. (It does call enterOff() at this point, but does not call exitOff().) @@ -261,9 +261,9 @@ class FSM(DirectObject): def demand(self, request, *args): """Requests a state transition, by code that does not expect the request to be denied. If the request is denied, raises a - RequestDenied exception. + `RequestDenied` exception. - Unlike request(), this method allows a new request to be made + Unlike `request()`, this method allows a new request to be made while the FSM is currently in transition. In this case, the request is queued up and will be executed when the current transition finishes. Multiple requests will queue up in @@ -290,7 +290,7 @@ class FSM(DirectObject): """Requests a state transition (or other behavior). The request may be denied by the FSM's filter function. If it is denied, the filter function may either raise an exception - (RequestDenied), or it may simply return None, without + (`RequestDenied`), or it may simply return None, without changing the FSM's state. The request parameter should be a string. The request, along @@ -305,7 +305,7 @@ class FSM(DirectObject): If the FSM is currently in transition (i.e. in the middle of executing an enterState or exitState function), an - AlreadyInTransition exception is raised (but see demand(), + `AlreadyInTransition` exception is raised (but see `demand()`, which will queue these requests up and apply when the transition is complete).""" @@ -401,7 +401,6 @@ class FSM(DirectObject): return (request,) + args return self.defaultFilter(request, args) - def setStateArray(self, stateArray): """array of unique states to iterate through""" self.fsmLock.acquire() @@ -410,7 +409,6 @@ class FSM(DirectObject): finally: self.fsmLock.release() - def requestNext(self, *args): """Request the 'next' state in the predefined state array.""" self.fsmLock.acquire() diff --git a/direct/src/gui/DirectButton.py b/direct/src/gui/DirectButton.py index e6111af710..5cf8a91e9e 100644 --- a/direct/src/gui/DirectButton.py +++ b/direct/src/gui/DirectButton.py @@ -1,4 +1,8 @@ -"""This module contains the DirectButton class.""" +"""This module contains the DirectButton class. + +See the :ref:`directbutton` page in the programming manual for a more +in-depth explanation and an example of how to use this class. +""" __all__ = ['DirectButton'] diff --git a/direct/src/gui/DirectCheckButton.py b/direct/src/gui/DirectCheckButton.py index f353f3d989..ed74c3eef7 100644 --- a/direct/src/gui/DirectCheckButton.py +++ b/direct/src/gui/DirectCheckButton.py @@ -1,6 +1,10 @@ """A DirectCheckButton is a type of button that toggles between two states when clicked. It also has a separate indicator that can be modified -separately.""" +separately. + +See the :ref:`directcheckbutton` page in the programming manual for a more +in-depth explanation and an example of how to use this class. +""" __all__ = ['DirectCheckButton'] diff --git a/direct/src/gui/DirectDialog.py b/direct/src/gui/DirectDialog.py index 8dd4bc51af..b6401c7a7a 100644 --- a/direct/src/gui/DirectDialog.py +++ b/direct/src/gui/DirectDialog.py @@ -1,4 +1,8 @@ -"""This module defines various dialog windows for the DirectGUI system.""" +"""This module defines various dialog windows for the DirectGUI system. + +See the :ref:`directdialog` page in the programming manual for a more +in-depth explanation and an example of how to use this class. +""" __all__ = [ 'findDialog', 'cleanupDialog', 'DirectDialog', 'OkDialog', diff --git a/direct/src/gui/DirectEntry.py b/direct/src/gui/DirectEntry.py index d614a3825a..d870bf0c7e 100644 --- a/direct/src/gui/DirectEntry.py +++ b/direct/src/gui/DirectEntry.py @@ -1,5 +1,9 @@ """Contains the DirectEntry class, a type of DirectGUI widget that accepts -text entered using the keyboard.""" +text entered using the keyboard. + +See the :ref:`directentry` page in the programming manual for a more in-depth +explanation and an example of how to use this class. +""" __all__ = ['DirectEntry'] diff --git a/direct/src/gui/DirectFrame.py b/direct/src/gui/DirectFrame.py index 684fda005c..19e8717ba6 100644 --- a/direct/src/gui/DirectFrame.py +++ b/direct/src/gui/DirectFrame.py @@ -11,6 +11,9 @@ A DirectFrame can have: Each of these has 1 or more states. The same object can be used for all states or each state can have a different text/geom/image (for radio button and check button indicators, for example). + +See the :ref:`directframe` page in the programming manual for a more in-depth +explanation and an example of how to use this class. """ __all__ = ['DirectFrame'] diff --git a/direct/src/gui/DirectLabel.py b/direct/src/gui/DirectLabel.py index bc1328ded7..aa965bbe61 100644 --- a/direct/src/gui/DirectLabel.py +++ b/direct/src/gui/DirectLabel.py @@ -1,4 +1,8 @@ -"""Contains the DirectLabel class.""" +"""Contains the DirectLabel class. + +See the :ref:`directlabel` page in the programming manual for a more in-depth +explanation and an example of how to use this class. +""" __all__ = ['DirectLabel'] diff --git a/direct/src/gui/DirectOptionMenu.py b/direct/src/gui/DirectOptionMenu.py index cbf3a2974e..818cc3f896 100644 --- a/direct/src/gui/DirectOptionMenu.py +++ b/direct/src/gui/DirectOptionMenu.py @@ -1,4 +1,8 @@ -"""Implements a pop-up menu containing multiple clickable options.""" +"""Implements a pop-up menu containing multiple clickable options. + +See the :ref:`directoptionmenu` page in the programming manual for a more +in-depth explanation and an example of how to use this class. +""" __all__ = ['DirectOptionMenu'] diff --git a/direct/src/gui/DirectRadioButton.py b/direct/src/gui/DirectRadioButton.py index f6543d1e8f..c679eff334 100755 --- a/direct/src/gui/DirectRadioButton.py +++ b/direct/src/gui/DirectRadioButton.py @@ -1,7 +1,11 @@ """A DirectRadioButton is a type of button that, similar to a DirectCheckButton, has a separate indicator and can be toggled between two states. However, only one DirectRadioButton in a group can be enabled -at a particular time.""" +at a particular time. + +See the :ref:`directradiobutton` page in the programming manual for a more +in-depth explanation and an example of how to use this class. +""" __all__ = ['DirectRadioButton'] diff --git a/direct/src/gui/DirectScrollBar.py b/direct/src/gui/DirectScrollBar.py index d56385163b..a873924456 100644 --- a/direct/src/gui/DirectScrollBar.py +++ b/direct/src/gui/DirectScrollBar.py @@ -1,4 +1,8 @@ -"""Defines the DirectScrollBar class.""" +"""Defines the DirectScrollBar class. + +See the :ref:`directscrollbar` page in the programming manual for a more +in-depth explanation and an example of how to use this class. +""" __all__ = ['DirectScrollBar'] diff --git a/direct/src/gui/DirectScrolledFrame.py b/direct/src/gui/DirectScrolledFrame.py index 2c60ed950f..7b30ba499e 100644 --- a/direct/src/gui/DirectScrolledFrame.py +++ b/direct/src/gui/DirectScrolledFrame.py @@ -1,4 +1,8 @@ -"""Contains the DirectScrolledFrame class.""" +"""Contains the DirectScrolledFrame class. + +See the :ref:`directscrolledframe` page in the programming manual for a more +in-depth explanation and an example of how to use this class. +""" __all__ = ['DirectScrolledFrame'] @@ -82,6 +86,9 @@ class DirectScrolledFrame(DirectFrame): self.guiItem.setVirtualFrame(f[0], f[1], f[2], f[3]) def getCanvas(self): + """Returns the NodePath of the virtual canvas. Nodes parented to this + canvas will show inside the scrolled area. + """ return self.canvas def setManageScrollBars(self): diff --git a/direct/src/gui/DirectScrolledList.py b/direct/src/gui/DirectScrolledList.py index ca7551d2c9..5bade6caf9 100644 --- a/direct/src/gui/DirectScrolledList.py +++ b/direct/src/gui/DirectScrolledList.py @@ -1,4 +1,8 @@ -"""Contains the DirectScrolledList class.""" +"""Contains the DirectScrolledList class. + +See the :ref:`directscrolledlist` page in the programming manual for a more +in-depth explanation and an example of how to use this class. +""" __all__ = ['DirectScrolledListItem', 'DirectScrolledList'] diff --git a/direct/src/gui/DirectSlider.py b/direct/src/gui/DirectSlider.py index 507c13b5a8..ddcd35d05d 100644 --- a/direct/src/gui/DirectSlider.py +++ b/direct/src/gui/DirectSlider.py @@ -1,4 +1,8 @@ -"""Defines the DirectSlider class.""" +"""Defines the DirectSlider class. + +See the :ref:`directslider` page in the programming manual for a more +in-depth explanation and an example of how to use this class. +""" __all__ = ['DirectSlider'] diff --git a/direct/src/gui/DirectWaitBar.py b/direct/src/gui/DirectWaitBar.py index ff3f554fee..55785152cf 100644 --- a/direct/src/gui/DirectWaitBar.py +++ b/direct/src/gui/DirectWaitBar.py @@ -1,4 +1,8 @@ -"""Contains the DirectWaitBar class, a progress bar widget.""" +"""Contains the DirectWaitBar class, a progress bar widget. + +See the :ref:`directwaitbar` page in the programming manual for a more +in-depth explanation and an example of how to use this class. +""" __all__ = ['DirectWaitBar']