36 files changed, 332 insertions, 176 deletions
diff --git a/src/controller/README_controller.txt b/src/controller/README_controller.txt new file mode 100644 index 0000000..c9e7f83 --- a/dev/null +++ b/src/controller/README_controller.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | The controller is split into two sections. The callbacks subdirectory | ||
2 | contains the functions that are used as callbacks from the GLUT event | ||
3 | loop. The actions subdirectory contains functions that operate on the | ||
4 | data and state. To the extent possible callbacks should be empty | ||
5 | shells that transform information from hardware and the event loop to | ||
6 | the calling parameters of actions. This design has the advantage of | ||
7 | facilitating the scripting of user actions in the future. A script | ||
8 | should be able to call action functions and generate equivalent | ||
9 | behaviors as if the user had initiated the sequences of actions using | ||
10 | the user interface. Another advantage is that multiple user interface | ||
11 | callbacks can share the same actions. A common example of this is the | ||
12 | execution of the same function through either a menu selection | ||
13 | callback or a toolbar callback. As per the "GNU Coding Standards" | ||
14 | section "5.4 Naming Variables, Functions, and Files | ||
15 | [http://www.gnu.org/prep/standards/html_node/Names.html#Names]" | ||
16 | underscores should be used to separate words in a name. | ||
17 | |||
18 | LocalWords: callbacks callback | ||