[Fxruby-commits] CVS: FXRuby/rdoc-sources FXAccelTable.rb,NONE,1.1 FXArrowButton.rb,NONE,1.1 FXBMPIc
Status: Inactive
Brought to you by:
lyle
Update of /cvsroot/fxruby/FXRuby/rdoc-sources
In directory usw-pr-cvs1:/tmp/cvs-serv20269
Added Files:
FXAccelTable.rb FXArrowButton.rb FXBMPIcon.rb FXBMPImage.rb
FXBitmap.rb FXCanvas.rb FXCheckButton.rb FXDC.rb
Log Message:
Updated RDoc documentation files.
--- NEW FILE: FXAccelTable.rb ---
module Fox
# The accelerator table sends a message to a specific
# target object when the indicated key and modifier combination
# is pressed.
class FXAccelTable < FXObject
# Handles the SEL_KEYPRESS event
def onKeyPress(sender, sel, event) ; end
# Handles the SEL_KEYRELEASE event
def onKeyRelease(sender, sel, event) ; end
# Construct empty accelerator table
def initialize() ; end
# Add an accelerator to the table
def addAccel(hotkey, target=nil, seldn=0, selup=0) ; end
# Return true if accelerator specified
def hasAccel?(hotkey) ; end
# Return target object of the given accelerator
def targetOfAccel(hotkey) ; end
# Remove mapping for specified hot key
def removeAccel(hotkey) ; end
end
end
--- NEW FILE: FXArrowButton.rb ---
module Fox
# Button with an arrow; the arrow can point in any direction.
# When clicked, the arrow button sends a SEL_COMMAND to its target.
# When ARROW_REPEAT is passed, the arrow button sends a SEL_COMMAND
# repeatedly while the button is pressed.
#
# = Arrow style options
#
# ARROW_NONE:: No arrow
# ARROW_UP:: Arrow points up
# ARROW_DOWN:: Arrow points down
# ARROW_LEFT:: Arrow points left
# ARROW_RIGHT:: Arrow points right
# ARROW_REPEAT:: Button repeats if held down
# ARROW_AUTOGRAY:: Automatically gray out when not updated
# ARROW_AUTOHIDE:: Automatically hide when not updated
# ARROW_TOOLBAR:: Button is toolbar-style
# ARROW_NORMAL:: FRAME_RAISED|FRAME_THICK|ARROW_UP
#
# = Message identifiers
#
# ID_REPEAT::
# ID_LAST::
#
class FXArrowButton < FXFrame
# Handles the SEL_PAINT message
def onPaint(sender, selector, event) ; end
# Handles the SEL_UPDATE message
def onUpdate(sender, selector, event) ; end
# Handles the SEL_ENTER message
def onEnter(sender, selector, event) ; end
# Handles the SEL_LEAVE message
def onLeave(sender, selector, event) ; end
# Handles the SEL_LEFTBUTTONPRESS message
def onLeftBtnPress(sender, selector, event) ; end
# Handles the SEL_LEFTBUTTONRELEASE message
def onLeftBtnRelease(sender, selector, event) ; end
# Handles the SEL_UNGRABBED message
def onUngrabbed(sender, selector, event) ; end
def onRepeat(sender, selector, event) ; end
# Handles the SEL_KEYPRESS message
def onKeyPress(sender, selector, event) ; end
# Handles the SEL_KEYRELEASE message
def onKeyRelease(sender, selector, event) ; end
def onHotKeyPress(sender, selector, event) ; end
def onHotKeyRelease(sender, selector, event) ; end
def onQueryHelp(sender, selector, event) ; end
def onQueryTip(sender, selector, event) ; end
# Construct arrow button
def initialize(p, tgt=nil, sel=0, opts=ARROW_NORMAL, x=0, y=0, w=0, h=0, pl=DEFAULT_PAD, pr=DEFAULT_PAD, pt=DEFAULT_PAD, pb=DEFAULT_PAD) ; end
# Set the button state (where +true+ means the button is down)
def state=(s) ; end
# Get the button state (where +true+ means the button is down)
def state() ; end
# Set status line help text for this arrow button
def helpText=(text) ; end
# Get status line help text for this arrow button
def helpText() ; end
# Set tool tip message for this arrow button
def tipText=(text) ; end
# Get tool tip message for this arrow button
def tipText() ; end
# Set the arrow style flags
def arrowStyle=(style) ; end
# Get the arrow style flags
def arrowStyle() ; end
# Set the default arrow size
def arrowSize=(size) ; end
# Get the default arrow size
def arrowSize() ; end
# Set the current justification mode.
def justify=(mode) ; end
# Get the current justification mode.
def justify() ; end
# Get the fill color for the arrow
def arrowColor() ; end
# Set the fill color for the arrow
def arrowColor=(clr) ; end
end
end
--- NEW FILE: FXBMPIcon.rb ---
module Fox
# Microsoft Bitmap icon
class FXBMPIcon < FXIcon
# Construct icon from memory stream formatted in Microsoft BMP format
def initialize(app, pix=nil, clr=FXRGB(192,192,192), opts=0, w=1, h=1) ; end
end
end
--- NEW FILE: FXBMPImage.rb ---
module Fox
# Microsoft Bitmap image
class FXBMPImage < FXImage
# Construct image from memory stream formatted in Microsoft BMP format
def initialize(app, pix=nil, opts=0, w=1, h=1) ; end
end
end
--- NEW FILE: FXBitmap.rb ---
module Fox
#
# Bitmap is a one bit/pixel image used for patterning and
# stippling operations.
#
# = Image rendering hints
#
# BITMAP_KEEP:: Keep pixel data in client
# BITMAP_OWNED:: Pixel data is owned by image
# BITMAP_SHMI:: Using shared memory image
# BITMAP_SHMP:: Using shared memory pixmap
#
class FXBitmap < FXDrawable
# Create an image
def initialize(app, pix=nil, opts=0, w=1, h=1) ; end
# Render pixels
def render() ; end
# Get pixel at x,y
def getPixel(x, y) ; end
# Change pixel at x,y
def setPixel(x, y, color) ; end
# Save pixel data only
def savePixels(store) ; end
# Load pixel data only
def loadPixels(store) ; end
end
end
--- NEW FILE: FXCanvas.rb ---
module Fox
# Canvas, an area drawn by another object
class FXCanvas < FXWindow
# Handles the SEL_PAINT message
def onPaint(sender, selector, event) ; end
# Handles the SEL_MOTION message
def onMotion(sender, selector, event) ; end
# Handles the SEL_KEYPRESS message
def onKeyPress(sender, selector, event) ; end
# Handles the SEL_KEYRELEASE message
def onKeyRelease(sender, selector, event) ; end
# Construct new drawing canvas widget
def initialize(p, tgt=nil, sel=0, opts=FRAME_NORMAL, x=0, y=0, w=0, h=0) ; end
end
end
--- NEW FILE: FXCheckButton.rb ---
module Fox
# A check button is a tri-state button. Normally, it is either
# TRUE or FALSE, and toggles between TRUE or FALSE whenever it is pressed.
# A third state MAYBE may be set to indicate that no selection has been made yet
# by the user, or that the state is ambiguous.
# When pressed, the check button sends a SEL_COMMAND to its target, and the
# message data represents the state of the check button.
#
# = CheckButton styles
#
# CHECKBUTTON_AUTOGRAY:: Automatically gray out when not updated
# CHECKBUTTON_AUTOHIDE:: Automatically hide when not updated
# CHECKBUTTON_NORMAL:: JUSTIFY_NORMAL|ICON_BEFORE_TEXT
class FXCheckButton < FXLabel
# Handles the SEL_PAINT message
def onPaint(sender, selector, event) ; end
# Handles the SEL_UPDATE message
def onUpdate(sender, selector, event) ; end
# Handles the SEL_ENTER message
def onEnter(sender, selector, event) ; end
# Handles the SEL_LEAVE message
def onLeave(sender, selector, event) ; end
def onFocusIn(sender, selector, event) ; end
def onFocusOut(sender, selector, event) ; end
def onUngrabbed(sender, selector, event) ; end
# Handles the SEL_LEFTBUTTONPRESS message
def onLeftBtnPress(sender, selector, event) ; end
# Handles the SEL_LEFTBUTTONRELEASE message
def onLeftBtnRelease(sender, selector, event) ; end
# Handles the SEL_KEYPRESS message
def onKeyPress(sender, selector, event) ; end
# Handles the SEL_KEYRELEASE message
def onKeyRelease(sender, selector, event) ; end
def onHotKeyPress(sender, selector, event) ; end
def onHotKeyRelease(sender, selector, event) ; end
def onCheck(sender, selector, event) ; end
def onUncheck(sender, selector, event) ; end
def onUnknown(sender, selector, event) ; end
def onCmdSetValue(sender, selector, event) ; end
def onCmdSetIntValue(sender, selector, event) ; end
def onCmdGetIntValue(sender, selector, event) ; end
# Construct new check button
def initialize(p, text, tgt=nil, sel=0, opts=CHECKBUTTON_NORMAL, x=0, y=0, w=0, h=0, pl=DEFAULT_PAD, pr=DEFAULT_PAD, pt=DEFAULT_PAD, pb=DEFAULT_PAD) ; end
# Set check button state (TRUE, FALSE or MAYBE)
def check=(state=TRUE) ; end
# Get check button state (TRUE, FALSE or MAYBE)
def check() ; end
# Change check button style
def checkButtonStyle=(style) ; end
# Return current check button style
def checkButtonStyle() ; end
# Get the box background color
def boxColor() ; end
# Set the box background color
def boxColor=(clr) ; end
end
end
--- NEW FILE: FXDC.rb ---
module Fox
# Line segment
class FXSegment
attr_accessor :x1, :y1, :x2, :y2
end
# Arc
class FXArc
attr_accessor :x, :y, :w, :h, :a, :b
end
# Abstract Device Context
#
# A Device Context is used to maintain the state of the graphics drawing system.
# Defining your drawing code in terms of the Abstract Device Context allows the
# drawing commands to be rendered on different types of surfaces, such as windows
# and images (FXDCWindow), or on paper (FXDCPrint).
# WYSYWYG may be obtained by using the same identical drawing code in your
# application regardless of the actual device surface being utilized.
#
# = Drawing (BITBLT) functions
# BLT_CLR, /// D := 0
# BLT_SRC_AND_DST, /// D := S & D
# BLT_SRC_AND_NOT_DST, /// D := S & ~D
# BLT_SRC, /// D := S
# BLT_NOT_SRC_AND_DST, /// D := ~S & D
# BLT_DST, /// D := D
# BLT_SRC_XOR_DST, /// D := S ^ D
# BLT_SRC_OR_DST, /// D := S | D
# BLT_NOT_SRC_AND_NOT_DST, /// D := ~S & ~D == D := ~(S | D)
# BLT_NOT_SRC_XOR_DST, /// D := ~S ^ D
# BLT_NOT_DST, /// D := ~D
# BLT_SRC_OR_NOT_DST, /// D := S | ~D
# BLT_NOT_SRC, /// D := ~S
# BLT_NOT_SRC_OR_DST, /// D := ~S | D
# BLT_NOT_SRC_OR_NOT_DST, /// D := ~S | ~D == ~(S & D)
# BLT_SET /// D := 1
#
# = Line Styles
#
# LINE_SOLID:: Solid lines
# LINE_ONOFF_DASH:: On-off dashed lines
# LINE_DOUBLE_DASH:: Double dashed lines
#
# = Line Cap Styles
#
# CAP_NOT_LAST:: Don't include last end cap
# CAP_BUTT:: Butting line end caps
# CAP_ROUND:: Round line end caps
# CAP_PROJECTING:: Projecting line end caps
#
# = Line Join Styles
#
# JOIN_MITER:: Mitered or pointy joints
# JOIN_ROUND:: Round line joints
# JOIN_BEVEL:: Beveled or flat joints
#
# = Fill Styles
#
# FILL_SOLID:: Fill with solid color
# FILL_TILED:: Fill with tiled bitmap
# FILL_STIPPLED:: Fill where stipple mask is 1
# FILL_OPAQUESTIPPLED:: Fill with foreground where mask is 1, background otherwise
#
# = Fill Rules
#
# RULE_EVEN_ODD:: Even odd polygon filling
# RULE_WINDING:: Winding rule polygon filling
#
# = Stipple/dither patterns
#
# STIPPLE_0::
# STIPPLE_NONE::
# STIPPLE_BLACK::All ones
# STIPPLE_1::
# STIPPLE_2::
# STIPPLE_3::
# STIPPLE_4::
# STIPPLE_5::
# STIPPLE_6::
# STIPPLE_7::
# STIPPLE_8::
# STIPPLE_GRAY::50% gray
# STIPPLE_9::
# STIPPLE_10::
# STIPPLE_11::
# STIPPLE_12::
# STIPPLE_13::
# STIPPLE_14::
# STIPPLE_15::
# STIPPLE_16::
# STIPPLE_WHITE::All zeroes
# STIPPLE_HORZ::Horizontal hatch pattern
# STIPPLE_VERT::Vertical hatch pattern
# STIPPLE_CROSS::Cross-hatch pattern
# STIPPLE_DIAG::Diagonal // hatch pattern
# STIPPLE_REVDIAG::Reverse diagonal \\ hatch pattern
# STIPPLE_CROSSDIAG::Cross-diagonal hatch pattern
class FXDC
# Construct dummy DC
def initialize(app) ; end
# Get application
def app() ; end
# Read back pixel
def readPixel(x, y) ; end
# Draw points
def drawPoint(x, y) ; end
# Draw multiple points. Here, _points_ is an array of FXPoint instances.
def drawPoints(points) ; end
# Draw multiple points. Here, _points_ is an array of FXPoint instances.
def drawPointsRel(points) ; end
# Draw line
def drawLine(x1, y1, x2, y2) ; end
# Draw lines (_points_ is an array of FXPoint instances)
def drawLines(points) ; end
# Draw lines (_points_ is an array of FXPoint instances)
def drawLinesRel(points) ; end
# Draw line segments (_segments_ is an array of FXSegment instances)
def drawLineSegments(segments) ; end
# Draw rectangle
def drawRectangle(x, y, w, h) ; end
# Draw multiple rectangles (_rectangles_ is an array of FXRectangle instances)
def drawRectangles(rectangles) ; end
# Draw arcs.
# The argument _ang1_ specifies the start of the arc relative to the
# three-o'clock position from the center, in units of degrees*64.
# The argument _ang2_ specifies the path and extent of the arc relative
# to the start of the arc, in units of degrees*64.
# The arguments _x_, _y_, _w_, and _h_ specify the bounding rectangle.
def drawArc(x, y, w, h, ang1, ang2) ; end
# Draw arcs (_arcs_ is an array of FXArc instances)
def drawArcs(arcs) ; end
# Draw filled rectangle
def fillRectangle(x, y, w, h) ; end
# Draw filled rectangles (_rectangles_ is an array of FXRectangle instances)
def fillRectangles(rectangles) ; end
# Draw filled arc
def fillArc(x, y, w, h, ang1, ang2) ; end
# Draw filled arcs (_arcs_ is an array of FXArc instances)
def fillArcs(arcs) ; end
# Filled polygon (_points_ is an array of FXPoint instances)
def fillPolygon(points) ; end
# Filled polygon (_points_ is an array of FXPoint instances)
def fillConcavePolygon(points) ; end
# Filled polygon (_points_ is an array of FXPoint instances)
def fillComplexPolygon(points) ; end
# Filled polygon with relative points (_points_ is an array of FXPoint instances)
def fillPolygonRel(points) ; end
# Filled polygon with relative points (_points_ is an array of FXPoint instances)
def fillConcavePolygonRel(points) ; end
# Filled polygon with relative points (_points_ is an array of FXPoint instances)
def fillComplexPolygonRel(points) ; end
# Draw hashed box
def drawHashBox(x, y, w, h, b=1) ; end
# Draw focus rectangle
def drawFocusRectangle(x, y, w, h) ; end
# Draw area from source
def drawArea(source, sx, sy, sw, sh, dx, dy) ; end
# Draw image
def drawImage(image, dx, dy) ; end
# Draw bitmap
def drawBitmap(bitmap, dx, dy) ; end
# Draw icon
def drawIcon(icon, dx, dy) ; end
# Draw icon shaded (used for disabled labels and buttons)
def drawIconShaded(icon, dx, dy) ; end
# Draw icon sunken
def drawIconSunken(icon, dx, dy) ; end
# Draw string
def drawText(x, y, string) ; end
# Draw string
def drawImageText(x, y, string) ; end
# Set foreground drawing color
def foreground=(clr) ; end
# Get foreground drawing color
def foreground() ; end
# Set background drawing color
def background=(clr) ; end
# Get background drawing color
def background() ; end
# Set dash pattern and dash offset.
# A dash pattern of [1 2 3 4] is a repeating pattern of 1 foreground pixel,
# 2 background pixels, 3 foreground pixels, and 4 background pixels.
# The offset is where in the pattern the system will start counting.
# The maximum length of the dash pattern is 32.
def setDashes(dashoffset, dashpattern, dashlength) ; end
# Get dash pattern (a string)
def dashPattern() ; end
# Get dash offset
def dashOffset() ; end
# Get dash length
def dashLength() ; end
# Set line width:- 0 means thinnest/fastest possible
def lineWidth=(linewidth) ; end
# Get line width
def lineWidth() ; end
# Set line cap style
def lineCap=(capstyle) ; end
# Get line cap style
def lineCap() ; end
# Set line join style
def lineJoin=(joinstyle) ; end
# Get line join style
def lineJoin() ; end
# Set line style
def lineStyle=(linestyle) ; end
# Get line style
def lineStyle() ; end
# Set fill style
def fillStyle=(fillstyle) ; end
# Get fill style
def fillStyle() ; end
# Set fill rule
def fillRule=(fillrule) ; end
# Get fill rule
def fillRule() ; end
# Set rasterop function
def function=(func) ; end
# Get rasterop function
def function() ; end
# Set the tile image
def setTile(image, dx=0, dy=0) ; end
# Get the tile image
def tile() ; end
# Set the stipple pattern
def setStipple(bitmap, dx=0, dy=0) ; end
# Get stipple bitmap
def stippleBitmap() ; end
# Set the stipple pattern
def setStipple(pat, dx=0, dy=0) ; end
# Get pattern
def stipplePattern() ; end
# Set clip region
def clipRegion=(region) ; end
# Set clip rectangle
def setClipRectangle(x, y, w, h) ; end
# Change clip rectangle
def setClipRectangle(rectangle) ; end
# Return clip rectangle
def clipRectangle() ; end
# Return clip x
def clipX() ; end
# Return clip y
def clipY() ; end
# Return clip width
def clipWidth() ; end
# Return clip height
def clipHeight() ; end
# Clear clipping
def clearClipRectangle() ; end
# Set clip mask
def setClipMask(bitmap, dx=0, dy=0) ; end
# Clear clip mask
def clearClipMask() ; end
# Set font to draw text with
def textFont=(font) ; end
# Get text font
def textFont() ; end
# Clip against child windows
def clipChildren(yes) ; end
end
end
|