Update of /cvsroot/dynapi/dynapi/docs/config/data/dynapi/api
In directory usw-pr-cvs1:/tmp/cvs-serv19282/data/dynapi/api
Added Files:
events.js dynlayer.js dyndocument.js dragevent.js browser.js
Log Message:
Initial import of documentation configuration files
--- NEW FILE ---
/// Event Class
class DynEvent {
private:
string type;
object src;
object target;
public:
DynEvent(string type,object src,object target);
/// Returns the event type
string getType();
/// Returns the event source
object getSource();
/// Returns the event target
object getTarget();
};
/// Event Listener Class
class EventListener {
private:
object target;
void handleEvent(object target);
public:
EventListener(object target);
};
/// Mouse Event Class
class MouseEvent {
private:
string type;
object src;
object target;
void setEvent(object src,Event e);
void bubbleEvent();
public:
/// Returns the event type
/// \see DynEvent::getType
string getType();
/// Returns the event source
/// \see DynEvent::getSoure
object getSource();
/// Returns the event target
/// \see DynEvent::getTarget
object getTarget();
int getX();
int getY();
int getPageX();
int getPageY();
void setBubble(boolean bubble);
void cancelBrowserEvent();
};
class DynLayer {
private:
void EventMethod();
public:
/// Captures the mouse events for the layer
void captureMouseEvents();
void addEventListener(EventListener listener);
void removeEventListener(EventListener listener);
void removeAllEventListeners();
void invokeEvent(string type,Event e);
};
class DynDocument {
private:
MouseEvent _e;
void EventMethod();
public:
/// \see DynLayer::captureMouseEvents
void captureMouseEvents();
void releaseMouseEvents();
/// \see DynLayer::addEventListener
void addEventListener(EventListener listener);
/// \see DynLayer::removeEventListener
void removeEventListener(EventListener listener);
/// \see DynLayer::removeAllEventListeners
void removeAllEventListeners();
/// \see DynLayer::invokeEvent
void invokeEvent(string type,Event e);
};
--- NEW FILE ---
/// Layer Class
/**
* The DynLayer provides the basic functionality to control DHTML elements.
* Other higher-level objects use many DynLayers which interact with each other
* and control their events to create larger "widgets". The DynLayer is the
* single most important object in the DynAPI.
*/
class DynLayer
{
private:
/// Holds all unassigned DynLayer objects
static DynLayer unassigned[];
/// Internally used to create unique id's
static int nullCount;
/// Creates a "layer" object on the document given the DynLayer
static void createElement(DynLayer dlyr);
/// Deletes a "layer" object on the document given the DynLayer
static void deleteElement(DynLayer dlyr);
/// Assigns the page elements to the DynLayer
static void assignElement(DynLayer dlyr,object element);
/// Assigns the elements of the children of the given DynLayer
static void assignChildren(DynLayer dlyr);
/// Invokes the precreate event for the given DynLayer
static void flagPrecreate(DynLayer dlyr);
static void flagDeleteChildren(DynLayer dlyr);
/// Set to true for all DynLayer objects
const boolean isDynLayer;
// Returns DynLayer constructor object
object getClass();
// Returns a fully valid string reference to the DynLayer
string toString();
void addChildID(DynLayer child);
public:
/// Creates a new DynLayer object with the given parameters.
/**
* All parameters are optional. A unique layer id will be
* created if no id is given.
*/
DynLayer(string id,int x,int y,int w,int h,string bgColor,string visible,int
zIndex,string bgImage);
/// Adds the given DynLayer(s) to this DynLayer
void addChild(DynLayer dlyr);
/// Removes the given child
void removeChild(DynLayer child);
/// Removes this from the parent
void removeFromParent();
/// Deletes the child object permanently from the document
void deleteChild(DynLayer child);
/// Deletes all of the children from this
void deleteAllChildren();
/// Deletes this from its parent
void deleteFromParent();
string getOuterHTML();
/// Sets the DynLayer styles
/**
* Object properties that can be set are:
* style.id
* style.left
* style.width
* style.height
* style.backgroundImage
* style.backgroundColor
* style.visibility
* style.zIndex;
*/
void setStyle(object style);
/// Moves the DynLayer to x and y coordinates
void moveTo(int x,int y);
/// Moves the DynLayer by x and y coordinates relative to original position
void moveBy(int w,int h);
/// Sets the x position
void setX(int x);
/// Sets the y position
void setY(int y);
/// Returns x position
int getX();
/// Returns y position
int getY();
/// Retrieves the horizontal value of the DynLayer on the page.
int getPageX();
/// Retrieves the vertical value of the DynLayer on the page.
int getPageY();
/// Sets the horizontal value of the DynLayer
void setPageX(int x);
/// Sets the vertical value of the DynLayer
void setPageY(int y);
/// Sets the DynLayer visible
/**
* true shows the layer and false hides the layer
*/
void setVisible(boolean visible);
/// Returns the layer's visibility
/**
* true for visible and false for hidden
*/
boolean getVisible();
/// Sets the z-index
void setZIndex(int z);
/// Returns the z-index
int getZIndex();
/// Sets the background image with the given image path
void setBgImage(string path);
/// Returns the path to the background image
string getBgImage();
/// Sets the background color of the layer
void setBgColor(string color);
/// Returns the background color of the layer
string getBgColor();
/// Sets the DynLayer object's HTML
/**
* If noevt is false, then no event is fired
*/
void setHTML(string html,boolean noevt);
/// Returns the html
/**
* If the html is empty, then an empty string ('') is returned.
*/
string getHTML();
/// Sets the size of the DynLayer
/**
* If noevt is false, then no event is fired
*/
void setSize(int w,int h,boolean noevt);
/// Sets the width of the DynLayer
/**
* If noevt is false, then no event is fired
*/
void setWidth(int w,boolean noevt);
/// Sets the height of the DynLayer
/**
* If noevt is false, then no event is fired
*/
void setHeight(int h,boolean noevt);
/// Returns the width of the DynLayer
int getWidth();
/// Returns height of the DynLayer
int getHeight();
/// Returns width of the content
int getContentWidth();
/// Returns height of the content
int getContentHeight();
void setClip(int clip[]);
/// Returns a array of length 4 containing the clip values
[right,left,top,bottom]
int[] getClip();
void invokeEvent();
};
--- NEW FILE ---
/// Document Class
class DynDocument {
private:
/// Stores a reference to all DynDocument objects
static DynDocument dyndocs[];
/// Stores a id of all DynDocument objects
static string dyndocsID[];
/// Internally used to create unique id's
/// \see DynLayer::nullCount
static int nullCount;
object elm;
DynDocument dyndoc;
string fgColor;
string bgColor;
/// \see DynLayer::isChild
boolean isChild;
/// \see DynLayer::created
boolean created;
/// Set to true for all DynDocument objects
boolean isDynDocument;
void addChildID(DynDocument child);
/// Finds the document dimensions
void findDimensions();
public:
/// Initializes the elements of the document
DynDocument();
DynDocument doc;
string all[];
/// \see DynLayer::children
DynLayer children[];
/// Unique id for the DynDocument
string id;
/// Returns a valid, global reference to the DynDocument
string toString();
object getClass();
/// \see DynLayer::addChild
void addChild(DynDocument child);
/// \see DynLayer::removeChild
void removeChild(DynDocument child);
/// \see DynLayer::deleteChild
void deleteChild(DynDocument child);
/// \see DynLayer::deleteAllChildren
void deleteAllChildren();
/// Recreates all of the elements of the document
void recreateAll();
/// Retuns 0
/// \see DynLayer::getX
int getX();
/// Retuns 0
/// \see DynLayer::getY
int getY();
/// Retuns 0
/// \see DynLayer::getPageX
int getPageX();
/// Retuns 0
/// \see DynLayer::getPageY
int getPageY();
/// Returns the document width
int getWidth();
/// Returns the document height
int getHeight();
/// Returns the background color
string getBgColor();
/// Sets the background color
void setBgColor(string color);
/// Sets the foreground color
void setFgColor(string color);
/// Loads path into the document
void load(string path);
};
--- NEW FILE ---
/// Drag Event Class
class DragEvent {
private:
/// Event type
string type;
/// Event source
object src;
/// Determines whether dragging is enabled
boolean dragEnabled;
/// Determines if the event will bubble
boolean bubble;
static int dragPlay;
/// Event listener for the layer
static EventListener lyrListener;
/// Event listener fot the layer's document
static EventListener docListener;
public:
/// Initialize the DragEvent with the event type and src
DragEvent(string type, object src);
/// Returns the event type
/// \see DynEvent::getType
string getType();
/// Returns the event source
/// \see DynEvent::getSource
object getSource();
/// Returns the event target
/// \see DynEvent::getTarget
object getTarget();
/// \see DynLayer::getX
int getX();
/// \see DynLayer::getY
int getY();
/// \see DynLayer::getPageX
int getPageX();
/// \see DynLayer::getPageY
int getPageY();
/// \see MouseEvent::setBubble
void setBubble(boolean bubble);
/// Cancels the drag
voic cancelDrag();
/// Sets the drag boundaries
static void setDragBoundary(DynLayer lyr,int top,int right,int bottom,int
left);
/// Enables drag events
static void enableDragEvents(DynLayer lyr);
/// Disables drag events
static void disableDragEvents(DynLayer lyr);
};
--- NEW FILE ---
/// Browser-Dection Class
/**
* The Browser class is automatically initialized as DynAPI.browser and
* a global "is" Browser object. To test the clients' browser for Netscape,
* you would say:
* if (is.ns) {}
*/
class Browser {
private:
/// Stores the browser name
string b;
/// Stores the browser version as a string
string version;
/// Stores the top-level browser number as integer
int v;
/// Stores the user-agent string
string ua;
public:
/// Initializes all properties of the Browser class
Browser();
/// Boolean value for Netscape
boolean ns;
/// Boolean value for Netscape 4
boolean ns4;
/// Boolean value for Netscape 6
boolean ns5;
/// Boolean value for Internet Explorer
boolean ie;
/// Boolean value for Internet Explorer 4
boolean ie4;
/// Boolean value for Internet Explorer 5
boolean ie5;
/// Boolean value for Internet Explorer 5.5
boolean ie55;
/// Boolean value for Opera
boolean opera;
/// True if the browser supports the dom
boolean dom;
/// Stores the client platform
/**
* Possible values are: "win32", "mac", and "other".
*/
string platform;
};
_______________________________________________
Dynapi-CVS mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-cvs