Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class Main

    Object
       |
       +--Main

class Main

Defined in obj-main.js
Version: 1.0
Author: mpollack

Field Summary
`Chapter` | `chapter` Current Chapter Object reference
`Course` | `course` Course Object reference
`GlobalTools` | `globaltools` Global Tools Object reference
`Glossary` | `glossary` Glossary Object reference
`string` | `objname` Name given to identify object on debug
`Page` | `page` Current Page Object reference
`Section` | `section` Current Section Object reference
`Theme` | `theme` Theme Object reference
`Topic` | `topic` Current Topic Object reference

Constructor Summary
`Main()` The highest level object containing all data and methods for accessing data from a course or theme

Method Summary
`void` | `getCurrent()` sends the command to get the current page information
`void` | `gotoPage(<string> p)` Sends the go to page command passing the supplied LI number
`void` | `nextPage()` Sends the next page command
`void` | `previousPage()` Sends the previous page command
`void` | `setCurrentChapterByID(<string> i)` Sets the chapter from a supplied ID
`void` | `setCurrentPageByID(<string> i)` Sets the page from a supplied ID and if the page set does not have page text set, the call is made to get that text.
`void` | `setCurrentSectionByID(<string> i)` Sets the section from a supplied ID
`void` | `setCurrentTopicByID(<string> i)` Sets the topic from a supplied ID
`void` | `setData(<string> d)` Sets data on the object using a delimited string sent via the jshook api.
`void` | `toggle()` Toggles from the current language to the secondary language and refreshes the data and theme

Field Detail

### chapter

    Chapter chapter

Current Chapter Object reference

### course

    Course course

Course Object reference

### globaltools

    GlobalTools globaltools

Global Tools Object reference

### glossary

    Glossary glossary

Glossary Object reference

### objname

    string objname

Name given to identify object on debug

### page

    Page page

Current Page Object reference

### section

    Section section

Current Section Object reference

### theme

    Theme theme

Theme Object reference

### topic

    Topic topic

Current Topic Object reference

Constructor Detail

### Main

    Main()

The highest level object containing all data and methods for accessing data from a course or theme

Version: 1.0
Author: mpollack

Method Detail

### getCurrent

    void getCurrent()

sends the command to get the current page information

### gotoPage

    void gotoPage(<string> p)

Sends the go to page command passing the supplied LI number

Parameters:

`p` - "." delimited LI number for the page to be navigated to, ex "1.2.3.4"

See:

- previousPage()
- nextPage()

### nextPage

    void nextPage()

Sends the next page command

See:

- previousPage()
- gotoPage()

### previousPage

    void previousPage()

Sends the previous page command

See:

- nextPage()
- gotoPage()

### setCurrentChapterByID

    void setCurrentChapterByID(<string> i)

Sets the chapter from a supplied ID

Parameters:

`i` - chapter id

### setCurrentPageByID

    void setCurrentPageByID(<string> i)

Sets the page from a supplied ID and if the page set does not have page text set, the call is made to get that text.

Parameters:

`i` - page id

### setCurrentSectionByID

    void setCurrentSectionByID(<string> i)

Sets the section from a supplied ID

Parameters:

`i` - section id

### setCurrentTopicByID

    void setCurrentTopicByID(<string> i)

Sets the topic from a supplied ID

Parameters:

`i` - topic id

### setData

    void setData(<string> d)

Sets data on the object using a delimited string sent via the jshook api. The string is split and each entry is run through eval() to execute.

Parameters:

`d` - delimited string with js commands

### toggle

    void toggle()

Toggles from the current language to the secondary language and refreshes the data and theme

Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Tue Mar 4 12:01:48 2008