Wide Studio Object Reference

Wide Studio Home
Up to


Class Name

WSCoption

Methods

  • char getAlignment()   :WSCvlabel
  • void setBlinkFore(WSCbool)   :WSCnwbase
  • void setOutSideMousePress(WSCbool)   :WSCnwbase
  • void setOutSideMouseMove(WSCbool)   :WSCnwbase
  • void setOutSideMouseRelease(WSCbool)   :WSCnwbase
  • void setMouseGrabed(WSCbool)   :WSCnwbase
  • WSCbool getOutSideMousePress()   :WSCnwbase
  • WSCbool getOutSideMouseMove()   :WSCnwbase
  • WSCbool getOutSideMouseRelease()   :WSCnwbase
  • WSCbool getMouseGrabed()   :WSCnwbase
  • long initialize()   :WSCbase
  • WSCbool getInitialized()   :WSCbase
  • char* getInstanceName()   :WSCbase
  • char* getClassName()   :WSCbase
  • void* cast(char*)   :WSCbase
  • void setInstanceName(char*)   :WSCbase
  • WSCbool setProperty(char*,const WSCvariant &)   :WSCbase
  • WSCvariant getProperty(char*)   :WSCbase
  • void setVisible(WSCbool)   :WSCbase
  • WSCbool getVisible()   :WSCbase
  • void setSensitive(WSCbool)   :WSCbase
  • WSCbool getSensitive()   :WSCbase
  • long draw()   :WSCbase
  • long redraw()   :WSCbase
  • long update()   :WSCbase
  • WSClistData & getChildren()   :WSCbase
  • long getAllChildren(WSClistData &)   :WSCbase
  • void execProcedure(long trigger)   :WSCbase
  • void execProcedure(char* procedure_name)   :WSCbase
  • long setFocus(WSCbool fl = True)   :WSCbase
  • WSCbool getFocus()   :WSCbase
  • virutal void onMouseIn(WSCpoint*)   :WSCbase
  • virutal void onMouseOut()   :WSCbase
  • virutal void onMouseMove(WSCpoint*)   :WSCbase
  • virutal void onMousePress(WSCpoint*)   :WSCbase
  • virutal void onMouseRelease(WSCpoint*)   :WSCbase
  • virutal void onExpose(WSCrect*)   :WSCbase
  • virutal void onResize(WSCrect*)   :WSCbase
  • virutal void onVisibleChange(WSCbool)   :WSCbase
  • virutal void onParentVisibleChange(WSCbool)   :WSCbase
  • virutal void onSensitiveChange(WSCbool)   :WSCbase
  • virutal void onParentSensitiveChange(WSCbool)   :WSCbase
  • virutal void onChildAdded(WSCbase*)   :WSCbase
  • long setSelectValue(long value,WSCbool flag)   :WSCoption
  • long setItemSensitive(long no,WSCbool flag)   :WSCoption
  • long getValue()   :WSCoption
  • WSCbool* getSelectStatus()   :WSCoption


Specification of methods



getAlignment method

Form
char getAlignment()
Function
Returns the alignment of the text.
Description
The return value is a mixed value of the property: WSNalignmentH,WSNalignmentV.
Parameters
Nothing.
Return value
Returns the alignment of the text
WS_TOP The top
WS_LEFT_TOP The top and left
WS_RIGHT_TOP The top and right
WS_CENTER The center
WS_LEFT The left
WS_RIGHT The right
WS_BOTTOM The bottom
WS_LEFT_BOTTOM The left and bottom
WS_RIGHT_BOTTOM The right and bottom
Notice
Nothing.



setBlinkFore method

Form
void setBlinkFore(WSCbool fl)
Function
Set the fore state(drawn by fore color) or the opposite state(disappeared or drawn by blink color) of the blink.
Description
True: the fore state, False: the opposite state
Parameters
(in)WSCbase fl the state
Return value
Nothing.
Notice



setOutSideMousePress method

Form
void setOutSideMousePress(WSCbool fl)
Function
Sets the flag whether it receives the mouse pressed event of the parent instance which is out of the own area.
Description
Parameters
(in)WSCbase fl True:receive ,False:discard
Return value
Nothing.
Notice



setOutSideMouseMove method

Form
void setOutSideMouseMove(WSCbool fl)
Function
Sets the flag whether it receives the mouse moved event of the parent instance which is out of the own area.
Description
Parameters
(in)WSCbase fl True:receive ,False:discard
Return value
Noting.
Notice



setOutSideMouseRelease method

Form
void setOutSideMouseRelease(WSCbool fl)
Function
Sets the flag whether it receives the mouse released event of the parent instance which is out of the own area.
Description
Parameters
(in)WSCbase fl True:receive ,False:discard
Return value
Noting.
Notice



getOutSideMousePress method

Form
WSCbool getOutSideMousePress()
Function
Returns the flag whether it receives the mouse pressed event of the parent instance which is out of the own area.
Description
Parameters
Noting.
Return value
True:receive, False:discard.
Notice



getOutSideMouseMove method

Form
WSCbool getOutSideMouseMove()
Function
Returns the flag whether it receives the mouse moved event of the parent instance which is out of the own area.
Description
Parameters
Nothing.
Return value
True:receive, False:discard.
Notice



getOutSideMouseRelease method

Form
WSCbool getOutSideMouseMove()
Function
Returns the flag whether it receives the mouse released event of the parent instance which is out of the own area.
Description
Parameters
Nothing.
Return value
True:receive, False:discard.
Notice



initialize method

Form
long initialize()
Function
Initializes the instance.
Description
Parameters
Nothing.
Return value
Returns WS_NO_ERR if it succeeds; returns the other if it fails.
Notice
It requires calling this initilize method once, before calling the others.



getInitialized method

Form
WSCbool getInitialized()
Function
Returns the status of initializing.
Description
Acquires whether the instance is initialized.
Parameters
Nothing.
Return value
Returns True if initialized; returns False if not.
Notice



getInstanceName method

Form
char* getInstanceName()
Function
Returns the instance name.
Description
Parameters
Nothing.
Return value
Returns the instance name.
Notice
Do not delete the return value, and it will become invalid by calling setInstanceName().



setInstanceName method

Form
void setInstanceName(char*)
Function
Specifies the instance name.
Description
Parameters
(in)char* pname instance name
Return value
Nothing.
Notice



getClassName method

Form
char* getClassName()
Function
Returns the class name of the instance.
Description
Parameters
Nothing.
Return value
Returns the class name.
Notice
Do not delete the return value.



cast method

Form
void* cast(char* class_name)
Function
Supplies the function of down cast. Usually C++ language does not allow to cast a abstract pointer to a pointer of child class. So the instance has all child class pointer, cast() method seek for a specified class pointer from contained all the pointer of child classes.
Description
Parameters
(in)char* class_name child class name
Return value
Returns the pointer. If specified class does not relate, returns NULL.
Notice
Please use the returned pointer as follows.
  extern WSCbase* object;
  // WSCvlabel* label = (WSCvlabel*)object; //C++ does not allow this..
  WSCvlabel* label = (WSCvlabel*)object->cast("WSCvlabel");
  if (label == NULL){
    //if this "object" does not relate to WSCvlabel class,
    //returns NULL.
  }else{
    //it is OK.
    //this "object" is the child class of WSCvlabel.
    //cast void* to WSCvlabel* ...
  }



setProperty method

Form
WSCbool setProperty(char* pname,const WSCvariant &)
Function
Sets the value into the property.
Description
Seeks for the specified property, and sets the value into it.
Parameters
(in)char* pname the property name
(in)WSCvariant & value the value
Return value
Returns True if it succeeds,False if it fails.
Notice
Second parameter requires any types which it can cast to WSCvariant.



getProperty method

Form
WSCvariant getProperty(char* pname)
Function
Returns the value of the specified property
Description
Seeks for the specified property, and returns the value of it.
Parameters
(in)char* pname the property name
Return value
Returns the value by WSCvariant type.
Notice



setVisible method

Form
void setVisible(WSCbool fl)
Function
Specifies the status of visibility.
Description
Parameters
(in)WSCbool fl visibility True=visible,False=invisible
Return value
Nothing.
Notice
This state is equal with the WSNvis property.



getVisible method

Form
WSCbool getVisible()
Function
Returns the status of visibility.
Description
Returns the status of visibility includes the parent instance.
Parameters
Nothing.
Return value
Returns the current visibility.
Notice
The return value is not always equal with the WSNvis property, because it includes the status of the parent instance. it returns False if the parent instance is invisible and the instance is visible.



setSensitive method

Form
void setSensitive(WSCbool fl)
Function
Specifies the state of sensibility.
Description
Parameters
(in)WSCbool fl True=sensitive,False=insensitive
Return value
Nothing.
Notice
if the parent instance is insensitive and the instance is sensitive,it becomes insensitive.



getVisible method

Form
WSCbool getVisible()
Function
Returns the sensibility
Description
Returns the sensibility includes the parent instance.
Parameters
Nothing.
Return value
Returns the current sensibility.
Notice
The return value is not always equal with the WSNdet property, because it includes the status of the parent instance. it returns False if the parent instance is insensitive and the instance is sensitive.



draw method

Form
long draw()
Function
Draws the instance.
Description
Parameters
Nothing
Return value
Returns WS_NO_ERR if it succeeds; returns the other if it fails.
Notice
It do not draw if the instance is drawed once, so if you want to draw it forcibly,execute the method: setAbsoluteDraw(True).



redraw method

Form
long redraw()
Function
Clears and draws the instance.
Description
Parameters
Nothing.
Return value
Returns WS_NO_ERR if it succeeds; returns the other if it fails.
Notice



update method

Form
long update()
Function
If needed, clears and draws the instance.
Description
A change of properties causes the necessity of updating.
Parameters
Nothing.
Return value
Returns WS_NO_ERR if it succeeds; returns the other if it fails.
Notice



getChildren method

Form
WSClistData & getChildren()
Function
Returns the list of child instances. It functions this method of the classes which have a management ability of child instances.
Description
Parameters
Nothing.
Return value
Returns the list of child instances.
Notice
The accessing of child instances is as follows. The "parent" is a management class like the WSCform,WSCwindow class which has child instances.
  WSClistData chidlren = parent->getChildren();
  int num = children.getNum();
  for(int i=0; i < num; i++){
    WSCbase* child = (WSCbase*)children[i];
    //do someting to child instance...
  }




execProcedure method

Form
void execProcedure(long trigger)
Function
Executes the event procedures by specified trigger.
Description
Parameters
(in)long trigger the trigger
Return value
Nothing.
Notice
This method does nothing,if there are no event procedures.



execProcedure method

Form
void execProcedure(char* pname)
Function
Executes the event procedures by specified procedure name.
Description
Parameters
(in)char* pname Event procedure name
Return value
Nothing.
Notice
This method does nothing,if there are no event procedures.



setFocus method

Form
long setFocus(WSCbool fl = True)
Function
Changes the state of the keyboard focus.
Description
Parameters
(in)WSCbool fl True = focused, False = lost focus
Return value
Returns WS_NO_ERR if it succeeds; returns the other if it fails.
Notice
By changing of the state,it executes the event method: onFocusChange().



getFocus method

Form
WSCbool getFocus()
Function
Returns the state of the keyboard focus.
Description
Parameters
Nothing.
Return value
Returns True if it is focused; returns False if not.
Notice



getAllChildren method

Form
long getAllChildren(WSClistData &list)
Function
Returns all of the children.
Description
getChildren() returns the children of the instance,but getAllChildren() returns all of the children of the instance and its children,... recursively.
Parameters
(out)WSClistData & list the list which contains the return value.
Return value
Returns WS_NO_ERR if it succeeds; returns the other if it fails.
Notice



getParentWindow method

Form
WSCbase* getParentWindow()
Function
Returns the parent application window of the instance.
Description
Follows the parents,and finds the top parent instance, then,returns it.
Parameters
Nothing.
Return value
Returns the application window.
Notice
Returns the instance, if the instance is the application window.



onMouseIn method

Form
virtual void onMouseIn(WSCpoint* pt)
Function
It executes this method when the mouse pointer moves into the area of the instance.
Description
Instead of the event procedure by the WSEV_MOUSE_IN trigger, the WSEV_MOUSE_IN event can be handled by overloading of this method.
Parameters
(out)WSCpoint* pt the coordinate of the mouse pointer
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onMouseOut method

Form
virtual void onMouseOut()
Function
It executes this method when the mouse pointer leaves the area of the instance.
Description
Instead of the event procedure by the WSEV_MOUSE_OUT trigger, the WSEV_MOUSE_OUT event can be handled by overloading of this method.
Parameters
Nothing.
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onMouseMove method

Form
virtual void onMouseMove(WSCpoint* pt)
Function
It executes this method when the mouse pointer moves in the area of the instance.
Description
Instead of the event procedure by the WSEV_MOUSE_MOVE trigger, the WSEV_MOUSE_MOVE event can be handled by overloading of this method.
Parameters
(out)WSCpoint* pt the coordinate of the mouse pointer
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onMousePress method

Form
virtual void onMousePress(WSCpoint* pt)
Function
It executes this method when the mouse pointer pressed in the area of the instance.
Description
Instead of the event procedure by the WSEV_MOUSE_PRESS trigger, the WSEV_MOUSE_PRESS event can be handled by overloading of this method.
Parameters
(out)WSCpoint* pt the coordinate of the mouse pointer
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onMouseRelease method

Form
virtual void onMouseRelease(WSCpoint* pt)
Function
It executes this method when the mouse pointer Released in the area of the instance.
Description
Instead of the event procedure by the WSEV_MOUSE_RELEASE trigger, the WSEV_MOUSE_RELEASE event can be handled by overloading of this method.
Parameters
(out)WSCpoint* pt the coordinate of the mouse pointer
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onExpose method

Form
virtual void onExpose(WSCrect* rect)
Function
It executes this method when the instance is exposed.
Description
Instead of the event procedure by the WSEV_EXPOSE trigger, the WSEV_EXPOSE event can be handled by overloading of this method.
Parameters
(out)WSCrect* rect the coordinate of the exposed area
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onResize method

Form
virtual void onResize(WSCrect* rect)
Function
It executes this method when the instance is resized.
Description
Instead of the event procedure by the WSEV_RESIZE trigger, the WSEV_RESIZE event can be handled by overloading of this method.
Parameters
(out)WSCrect* rect the coordinate, width, height of the instace
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onVisibleChange method

Form
virtual void onVisibleChange(WSCbool vis)
Function
It executes this method when the state of the visibility is changed.
Description
Instead of the event procedure by the WSEV_VISIBLE_CH trigger, the WSEV_VISIBLE_CH event can be handled by overloading of this method.
Parameters
(out)WSCbool vis the new state of the visibility
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onParentVisibleChange method

Form
virtual void onParentVisibleChange(WSCbool vis)
Function
It executes this method when the state of the parent's visibility is changed.
Description
Instead of the event procedure by the WSEV_PARENT_VISIBLE_CH trigger, the WSEV_PARENT_VISIBLE_CH event can be handled by overloading of this method.
Parameters
(out)WSCbool vis the new state of the parent's visibility
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onSensitiveChange method

Form
virtual void onSensitiveChange(WSCbool det)
Function
It executes this method when the state of the sensibility is changed.
Description
Instead of the event procedure by the WSEV_SENSITIVE_CH trigger, the WSEV_SENSITIVE_CH event can be handled by overloading of this method.
Parameters
(out)WSCbool det the new state of the sensibility
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onParentSensitiveChange method

Form
virtual void onParentSensitiveChange(WSCbool det)
Function
It executes this method when the state of the parent's sensibility is changed.
Description
Instead of the event procedure by the WSEV_PARENT_SENSITIVE_CH trigger, the WSEV_PARENT_SENSITIVE_CH event can be handled by overloading of this method.
Parameters
(out)WSCbool det the state of the parent's sensibility
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onChildAdded method

Form
virtual void onChildAdded(WSCbase* child)
Function
It executes this method when the child is added to the instance.
Description
the added child instance event can be handled by overloading of this method.
Parameters
(out)WSCbase* child the added child instance
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



setSelectValue method

Form
long setSelectValue(long value,WSCbool flag)
Function
Sets the sensibility of the elemnt of the menu by the specified value.
Description
Seeks the element which has the specified value, and makes it sensitive if the flag is True, or makes it not,if False.
Parameters
(in)long value the value of the elment.
(in)WSCbool fl the sensibility
Return value
Returns WS_NO_ERR if it succeeds; returns WS_ERR if it fails.
Notice



setItemSensitive method

Form
long setItemSensitive(long no,WSCbool flag)
Function
Sets the sensibility of the element of the menu by the specified position.
Description
Makes it sensitive if the flag is True, or makes it not,if False.
Parameters
(in)long no the position (top:0,1,2,...)
(in)WSCbool fl the sensibility
Return value
Returns WS_NO_ERR if it succeeds; returns WS_ERR if it fails.
Notice



getValue method

Form
long getValue()
Function
Returns the value of the selected element.
Description
Parameters
Nothing.
Return value
Returns the value of the selected element.
Notice



getSelectStatus method

Form
WSCbool* getSelectStatus()
Function
Returns the array of the states whether the elements are sensitive. (True: sensitive,False: insensitive).
Description
Parameters
Nothing.
Return value
Returns the array of the states whether the elements are sensitive.
Notice


Document Release 1.0

For Use with Wide Studio Release 1.0, Summer 2000


Wide Stuido Home | Up to

Copyright(C) T. Hirabayashi, 2000 Last modified: July 01, 2000