[Fxruby-commits] CVS: FXRuby/rdoc-sources FXList.rb,NONE,1.1.2.1 FXScrollArea.rb,NONE,1.1.2.1 FXTogg
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <ly...@us...> - 2002-06-05 16:55:36
|
Update of /cvsroot/fxruby/FXRuby/rdoc-sources In directory usw-pr-cvs1:/tmp/cvs-serv16552/rdoc-sources Added Files: Tag: release10 FXList.rb FXScrollArea.rb FXToggleButton.rb Log Message: Added new documentation files for FXList, FXScrollArea and FXToggleButton. --- NEW FILE: FXList.rb --- module Fox # List item class FXListItem < FXObject # Initialize def initialize(text, ic=nil, ptr=nil) ; end # Set the list item's text def text=(txt) ; end # Get the list item's text def text() ; end # Set the list item's icon def icon=(icn) ; end # Get the list item's icon def icon() ; end # Set the list item's data def data=(obj) ; end # Get the list item's data def data() ; end # Give this item the focus (+true+ or +false+) def focus=(focus) ; end # Returns +true+ if this item has the focus def hasFocus?() ; end # Set this item selected (+true+ or +false+) def selected=(selected) ; end # Return +true+ if this item is selected def selected?() ; end # Set this item enabled (+true+) or disabled (+false+) def enabled=(enabled) ; end # Return +true+ if this item is enabled def enabled?() ; end # Set this item draggable (+true+) or not (+false+) def draggable=(draggable) ; end # Return +true+ if this item is draggable def draggable?() ; end # Set this icon as "owned" by this list item (+true+) or not (+false+) def iconOwned=(owned) ; end # Return +true+ if this icon is owned def iconOwned?() ; end # Return the width of this item for a specified list def getWidth(list) ; end # Return the height of this item for a specified list def getHeight(list) ; end # Create the item def create() ; end # Detach the item def detach() ; end # Destroy the item def destroy( ); end end # List # # = List styles # LIST_EXTENDEDSELECT:: Extended selection mode allows for drag-selection of ranges of items # LIST_SINGLESELECT:: Single selection mode allows up to one item to be selected # LIST_BROWSESELECT:: Browse selection mode enforces one single item to be selected at all times # LIST_MULTIPLESELECT:: Multiple selection mode is used for selection of individual items # LIST_AUTOSELECT:: Automatically select under cursor # LIST_NORMAL:: same as LIST_EXTENDEDSELECT # # = Message identifiers # # ID_TIPTIMER:: # ID_LOOKUPTIMER:: # class FXList < FXScrollArea # Construct a list with nvis visible items; the list is initially empty def initialize(p, nvis, tgt=nil, sel=0, opts=LIST_NORMAL, x=0, y=0, w=0, h=0) ; end # Return the number of items in the list def numItems() ; end # Return number of visible items def numVisible() ; end # Change the number of visible items def numVisible=(nvis) ; end # Return the item at the given index def retrieveItem(index) ; end # Replace the item with a [possibly subclassed] item def replaceItem(index, item, notify=false) ; end # Replace items text, icon, and user-data pointer def replaceItem(index, text, icon=nil, ptr=nil, notify=false) ; end # Insert a new [possibly subclassed] item at the give index def insertItem(index, item, notify=false) ; end # Insert item at index with given text, icon, and user-data pointer def insertItem(index, text, icon=nil, ptr=nil, notify=false) ; end # Append a [possibly subclassed] item to the list def appendItem(item, notify=false) ; end # Append new item with given text and optional icon, and user-data pointer def appendItem(text, icon=nil, obj=nil, notify=false) ; end # Prepend a [possibly subclassed] item to the list def prependItem(item, notify=false) ; end # Prepend new item with given text and optional icon, and user-data pointer def prependItem(text, icon=nil, obj=nil, notify=false) ; end # Remove item from list def removeItem(index, notify=false) ; end # Remove all items from list def clearItems(notify=false) ; end # Return item width def getItemWidth(index) ; end # Return item height def getItemHeight(index) ; end # Return index of item at x,y, if any def getItemAt(x, y) ; end # Return item hit code: 0 no hit; 1 hit the icon; 2 hit the text def hitItem(index, x, y) ; end # Search items for item by name, starting from start item; the # flags argument controls the search direction, and case sensitivity. def findItem(text, start=-1, flags=SEARCH_FORWARD|SEARCH_WRAP) ; end # Scroll to bring item into view def makeItemVisible(index) ; end # Change item text def setItemText(index, text) ; end # Return item text def getItemText(index) ; end # Change item icon def setItemIcon(index, icon) ; end # Return item icon, if any def getItemIcon(index) ; end # Change item user-data object def setItemData(index, obj) ; end # Return item user-data object def getItemData(index) ; end # Return +true+ if item is selected def itemSelected?(index) ; end # Return +true+ if item is current def itemCurrent?(index) ; end # Return +true+ if item is visible def itemVisible?(index) ; end # Return +true+ if item is enabled def itemEnabled?(index) ; end # Repaint item def updateItem(index) ; end # Enable item def enableItem(index) ; end # Disable item def disableItem(index) ; end # Select item def selectItem(index, notify=false) ; end # Deselect item def deselectItem(index, notify=false) ; end # Toggle item selection state def toggleItem(index, notify=false) ; end # Change current item def setCurrentItem(index, notify=false) ; end # Return current item, if any def currentItem() ; end # Change anchor item def anchorItem=(index) ; end # Return anchor item, if any def anchorItem() ; end # Get item under the cursor, if any def cursorItem() ; end # Extend selection from anchor item to index def extendSelection(index, notify=false) ; end # Deselect all items def killSelection(notify=false) ; end # Sort items using current sort function def sortItems() ; end # Change text font def font=(fnt) ; end # Return text font def font() ; end # Return normal text color def textColor() ; end # Change normal text color def textColor=(clr) ; end # Return selected text background def selBackColor() ; end # Change selected text background def selBackColor=(clr) ; end # Return selected text color def selTextColor() ; end # Change selected text color def selTextColor=(clr) ; end # Return list style def listStyle() ; end # Change list style def listStyle=(style) ; end # Set the status line help text for this list def helpText=(text) ; end # Get the status line help text for this list def helpText() ; end end end --- NEW FILE: FXScrollArea.rb --- module Fox # The scroll area widget manages a content area and a viewport # area through which the content is viewed. When the content area # becomes larger than the viewport area, scrollbars are placed to # permit viewing of the entire content by scrolling the content. # Depending on the mode, scrollbars may be displayed on an as-needed # basis, always, or never. # Normally, the scroll area's size and the content's size are independent; # however, it is possible to disable scrolling in the horizontal # (vertical) direction. In this case, the content width (height) # will influence the width (height) of the scroll area widget. # For content which is time-consuming to repaint, continuous # scrolling may be turned off. # # = Scrollbar options # # SCROLLERS_NORMAL:: Show the scrollbars when needed # HSCROLLER_ALWAYS:: Always show horizontal scrollers # HSCROLLER_NEVER:: Never show horizontal scrollers # VSCROLLER_ALWAYS:: Always show vertical scrollers # VSCROLLER_NEVER:: Never show vertical scrollers # HSCROLLING_ON:: Horizontal scrolling turned on (default) # HSCROLLING_OFF:: Horizontal scrolling turned off # VSCROLLING_ON:: Vertical scrolling turned on (default) # VSCROLLING_OFF:: Vertical scrolling turned off # SCROLLERS_TRACK:: Scrollers track continuously for smooth scrolling # SCROLLERS_DONT_TRACK:: Scrollers don't track continuously # class FXScrollArea < FXComposite # Return viewport width def viewportWidth() ; end # Return viewport height def viewportHeight() ; end # Return content width def contentWidth() ; end # Return content height def contentHeight() ; end # Change scroll style def scrollStyle=(style) ; end # Return scroll style def scrollStyle() ; end # Return +true+ if horizontally scrollable def horizontalScrollable?() ; end # Return +true+ if vertically scrollable def verticalScrollable?() ; end # Return a reference to the horizontal scrollbar def horizontalScrollbar() ; end # Return a reference to the vertical scrollbar def verticalScrollbar() ; end # Return the current x-position def xPosition() ; end # Return the current y-position def yPosition() ; end # Set the current position def setPosition(x, y) ; end # Get the current position as an array [x, y] def position() ; end # Move contents to the specified position def moveContents(x, y) ; end end end --- NEW FILE: FXToggleButton.rb --- module Fox # # The toggle button provides a two-state button, which toggles between the # on and the off state each time it is pressed. For each state, the toggle # button has a unique icon and text label. # When pressed, the button widget sends a SEL_COMMAND to its target, with the # message data set to the current state of the toggle button, of the type FXbool. # # = Toggle button flags # # TOGGLEBUTTON_AUTOGRAY:: Automatically gray out when not updated # TOGGLEBUTTON_AUTOHIDE:: Automatically hide toggle button when not updated # TOGGLEBUTTON_TOOLBAR:: Toolbar style toggle button [flat look] # TOGGLEBUTTON_NORMAL:: FRAME_RAISED|FRAME_THICK|JUSTIFY_NORMAL|ICON_BEFORE_TEXT # class FXToggleButton < FXLabel # Construct toggle button with two text labels, and two icons, one for each state def initialize(p, text1, text2, icon1=nil, icon2=nil, tgt=nil, sel=0, opts=TOGGLEBUTTON_NORMAL, x=0, y=0, w=0, h=0, pl=DEFAULT_PAD, pr=DEFAULT_PAD, pt=DEFAULT_PAD, pb=DEFAULT_PAD) ; end # Change alternate text shown when toggled def altText=(text) ; end # Return alternate text def altText() ; end # Change alternate icon shown when toggled def altIcon=(ic) ; end # Return alternate icon def altIcon() ; end # Change toggled state def state(s=true); # Return toggled state def state() ; end # Change alternate help text shown when toggled def altHelpText=(text) ; end # Return alternate help text def altHelpText() ; end # Change alternate tip text shown when toggled def altTipText=(text) ; end # Return alternate tip text def altTipText() ; end # Set the toggle button style flags def toggleStyle=(style) ; end # Get the toggle button style flags def toggleStyle() ; end end end |