Generated with ROBODoc v4.99.6 on Mon Nov 15 21:51:28 2004

TABLE OF CONTENTS


Widget/createWidgetMask

[top]

SYNOPSIS

long createWidgetMask(widget, mask)

DESCRIPTION

This function doesn't work currently due to a bug in KDE. Please use MASK= in your .theme file for the time being.

ARGUMENTS

RETURN VALUE

1 if successful


Widget/getWidgetPosition

[top]

SYNOPSIS

tuple getWidgetPosition(widget)

DESCRIPTION

Returns a Python Tuple containing the x and y position of you widget. widget is a reference to the current widget.

ARGUMENTS

RETURN VALUE

position of the widget


Widget/moveWidget

[top]

SYNOPSIS

long moveWidget(widget, x, y)

DESCRIPTION

Moves your karamba widget to a new screen location

ARGUMENTS

RETURN VALUE

1 if successful


Widget/redrawWidget

[top]

SYNOPSIS

long redrawWidget(widget)

DESCRIPTION

This is THE most important function. After you do a bunch of other calls (moving images, adding images or text, etc), you call this to update the widget display area. You will not see your changes until you call this. Redraws widget background.

ARGUMENTS

RETURN VALUE

1 if successful


Widget/redrawWidgetBackground

[top]

SYNOPSIS

long redrawWidgetBackground(widget)

DESCRIPTION

Redraws widget background.

ARGUMENTS

RETURN VALUE

1 if successful


Widget/resizeWidget

[top]

SYNOPSIS

long resizeWidget(widget, w, h)

DESCRIPTION

Resizes your karamba widget to width=w, height=h

ARGUMENTS

RETURN VALUE

1 if successful


Widget/toggleWidgetRedraw

[top]

SYNOPSIS

long toggleWidgetRedraw(widget, b)

DESCRIPTION

Toggles widget redraw.

ARGUMENTS

RETURN VALUE

1 if successful


Text/changeText

[top]

SYNOPSIS

long changeText(widget, text, value)

DESCRIPTION

This will change the contents of a text widget.

ARGUMENTS

RETURN VALUE

1 if successful


Text/changeTextColor

[top]

SYNOPSIS

long changeTextColor(widget, text, r, g, b)

DESCRIPTION

This will change the color of a text widget (only ones you created through python currently). textToChange is the reference to the text object to change that you saved from the createText() call. r, g, b are ints from 0 to 255 that represent red, green, and blue.

ARGUMENTS

RETURN VALUE

1 if successful


Text/changeTextFont

[top]

SYNOPSIS

long changeTextFont(widget, text, font)

DESCRIPTION

This will change the font of a text widget (only ones you created through python currently). textToChange is the reference to the text object to change that you saved from the createText() call. newFont is a string the the name of the font to use.

ARGUMENTS

RETURN VALUE

1 if successful


Text/changeTextShadow

[top]

SYNOPSIS

long changeTextShadow(widget, text, shadow)

DESCRIPTION

This will change the shadow size of a text widget (only ones you created through python currently). textToChange is the reference to the text object to change that you saved from the createText() call. size is the offset of the shadow in pixels. 1 or 2 is a good value in most cases. Get current sensor string

ARGUMENTS

RETURN VALUE

1 if successful


Text/changeTextSize

[top]

SYNOPSIS

long changeTextSize(widget, text, size)

DESCRIPTION

This will change the font size of a text widget (only ones you created through python currently). textToChange is the reference to the text object to change that you saved from the createText() call. size is the new font point size.

ARGUMENTS

RETURN VALUE

1 if successful


Text/createText

[top]

SYNOPSIS

long createText(widget, x, y, w, h, text)

DESCRIPTION

This creates a text at x,y with width and height w,h. You need to save the return value of this function to call other functions on your text field, such as changeText()

ARGUMENTS

RETURN VALUE

Pointer to new text meter


Text/deleteText

[top]

SYNOPSIS

long deleteText(widget, text)

DESCRIPTION

This removes a text object from memory. Please do not call functions on "text" after calling deleteText, as it does not exist anymore and that could cause crashes in some cases.

ARGUMENTS

RETURN VALUE

1 if successful


Text/getTextAlign

[top]

SYNOPSIS

string getTextAlign(widget, text)

DESCRIPTION

Get current text align.

ARGUMENTS

RETURN VALUE

LEFT, CENTER or RIGHT


Text/getTextColor

[top]

SYNOPSIS

tuple getTextColor(widget, text)

DESCRIPTION

Get current text color

ARGUMENTS

RETURN VALUE

(red, green, blue)


Text/getTextFont

[top]

SYNOPSIS

string getTextFont(widget, text)

DESCRIPTION

Get current text font name

ARGUMENTS

RETURN VALUE

font name


Text/getTextFontSize

[top]

SYNOPSIS

long getTextFontSize(widget, text)

DESCRIPTION

Get current text font size

ARGUMENTS

RETURN VALUE

text font size


Text/getTextPos

[top]

SYNOPSIS

tuple getTextPos(widget, text)

DESCRIPTION

Given a reference to a text object, this will return a tuple containing the x and y coordinate of a text object.

ARGUMENTS

RETURN VALUE

pos


Text/getTextSensor

[top]

SYNOPSIS

string getTextSensor(widget, text)

DESCRIPTION

Get current sensor string

ARGUMENTS

RETURN VALUE

sensor string


Text/getTextShadow

[top]

SYNOPSIS

long getTextShadow(widget, text)

DESCRIPTION

Get current shadow offset

ARGUMENTS

RETURN VALUE

shadow offset


Text/getTextSize

[top]

SYNOPSIS

tuple getTextSize(widget, text)

DESCRIPTION

Given a reference to a text object, this will return a tuple containing the height and width of a text object.

ARGUMENTS

RETURN VALUE

size


Text/getTextValue

[top]

SYNOPSIS

string getTextValue(widget, text)

DESCRIPTION

Returns current text value.

ARGUMENTS

RETURN VALUE

value


Text/getThemeText

[top]

SYNOPSIS

long getThemeText(widget, name)

DESCRIPTION

You can reference text in your python code that was created in the theme file. Basically, you just add a NAME= value to the TEXT line in the .theme file. Then if you want to use that object, instead of calling createText, you can call this function.

The name you pass to the function is the same one that you gave it for the NAME= parameter in the .theme file.

ARGUMENTS

RETURN VALUE

Pointer to text


Text/hideText

[top]

SYNOPSIS

long hideText(widget, text)

DESCRIPTION

Hides text that is visible. You need to call redrawWidget() afterwords to actually hide the text on screen.

ARGUMENTS

RETURN VALUE

1 if successful


Text/moveText

[top]

SYNOPSIS

long moveText(widget, text, x, y)

DESCRIPTION

This moves a text object to a new x, y relative to your widget. In other words, (0,0) is the top corner of your widget, not the screen.

ARGUMENTS

RETURN VALUE

1 if successful


Text/resizeText

[top]

SYNOPSIS

long resizeText(widget, text, w, h)

DESCRIPTION

This will resize text to new height and width.

ARGUMENTS

RETURN VALUE

1 if successful


Text/setTextAlign

[top]

SYNOPSIS

long setTextAlign(widget, text, align)

DESCRIPTION

Sets text label align.

ARGUMENTS

RETURN VALUE

1 if successful


Text/setTextSensor

[top]

SYNOPSIS

long setTextSensor(widget, text, sensor)

DESCRIPTION

Get current sensor string

ARGUMENTS

RETURN VALUE

1 if successful


Text/showText

[top]

SYNOPSIS

long showText(widget, text)

DESCRIPTION

Shows text that has been hidden with hideText()

ARGUMENTS

RETURN VALUE

1 if successful


Task/getStartupInfo

[top]

SYNOPSIS

list getStartupInfo(widget, task)

DESCRIPTION

This returns all of the info about a certain starting task in the form of a Python List. widget is a reference to the current widget. task is a reference to the window you want info about which you obtain by calling getStartupList().

ARGUMENTS

RETURN VALUE

Here is the format of the returned list by index value:


Task/getStartupList

[top]

SYNOPSIS

list getTaskList(widget)

DESCRIPTION

This returns a Python List object with references to all the current windows that are in the process of loading on this system. You can then call getStartupInfo() on any of the entries in the list.

ARGUMENTS

RETURN VALUE

startup list


Task/getTaskInfo

[top]

SYNOPSIS

list getTaskInfo(widget, task)

DESCRIPTION

This returns all of the info about a certain task in the form of a Python List. widget is a reference to the current widget. task is a reference to the window you want info about which you obtain by calling getTaskList().

ARGUMENTS

RETURN VALUE

Here is the format of the returned list by index value:


Task/getTaskList

[top]

SYNOPSIS

list getTaskList(widget)

DESCRIPTION

This returns a Python List object with references to all the current windows open on this system. You can then call performTaskAction() or getTaskInfo() on any of the entries in the list.

ARGUMENTS

RETURN VALUE

Task list


Task/getTaskNames

[top]

SYNOPSIS

list getTaskNames(widget)

DESCRIPTION

This returns a Python List containing the String names of all open windows on the system. This is for convience if you want to list open windows or see if a window by a certain name exists. Anything else requires the reference to the window you would obtain from getTaskList()

ARGUMENTS

RETURN VALUE

Task list


Task/performTaskAction

[top]

SYNOPSIS

long performTaskAction(widget, task, action)

DESCRIPTION

This peforms the given action on a task object. widget is a reference to the current widget. task is a reference to a task object you got from getTaskList(). Action is a number from 1 to 10. See the list below.

Possible actions:

ARGUMENTS

RETURN VALUE

1 if successful


Systray/createSystray

[top]

SYNOPSIS

long createSystray(widget, x, y, w, h)

DESCRIPTION

??

ARGUMENTS

RETURN VALUE

1 if successful


Systray/getCurrentWindowCount

[top]

SYNOPSIS

long getCurrentWindowCount(widget)

DESCRIPTION

??

ARGUMENTS

RETURN VALUE

window count


Systray/hideSystray

[top]

SYNOPSIS

long hideSystray(widget)

DESCRIPTION

??

ARGUMENTS

RETURN VALUE

1 if successful


Systray/moveSystray

[top]

SYNOPSIS

long moveSystray(widget, x, y, w, h)

DESCRIPTION

??

ARGUMENTS

RETURN VALUE

1 if successful


Systray/showSystray

[top]

SYNOPSIS

long showSystray(widget)

DESCRIPTION

??

ARGUMENTS

RETURN VALUE

1 if successful


Systray/updateSystrayLayout

[top]

SYNOPSIS

long getCurrentWindowCount(widget)

DESCRIPTION

??

ARGUMENTS

RETURN VALUE

1 if successful


RichText/changeRichText

[top]

SYNOPSIS

long changeRichText(widget, richtext, value)

DESCRIPTION

This will change the contents of a rich text widget. richText is the reference to the text object to change that you saved from the createRichText() call. text is a string containing the new value for the rich text object.

The differance between Rich Text and a regular text field is that rich text fields can display HTML code embedded in your text.

In a <a href="command"> ... </a> tag command is executed if the link is click with the left mouse button.

Except if command starts with an '#' (ie: href="#value" ) the callback meterClicked is called with value (without the #) as the meter argument.

Also inline images work. Unfortunatly currently only when using absolute paths.

ARGUMENTS

RETURN VALUE

1 if successful


RichText/changeRichTextFont

[top]

SYNOPSIS

long changeRichTextFont(widget, richtext, font)

DESCRIPTION

This will change the font of a richtext widget.

ARGUMENTS

RETURN VALUE

1 if successful


RichText/changeRichTextSize

[top]

SYNOPSIS

long changeRichTextSize(widget, richtext, size)

DESCRIPTION

This will change the font size of a richtext widget.

ARGUMENTS

RETURN VALUE

1 if successful


RichText/createRichText

[top]

SYNOPSIS

long createRichText(widget, text, underlineLinks)

DESCRIPTION

This creates creates a rich text string. underlineLinks is a boolean that determines if html links will be automatically underlined so that the user knows that the links can be clicked on. You need to save the return value of this function to call other functions on your rich text field, such as changeRichText().

The differance between Rich Text and a regular text field is that rich text fields can display HTML code embedded in your text.

In a <a href="command"> ... </a> tag command is executed if the link is click with the left mouse button.

Except if command starts with an '#' (ie: href="#value" ) the callback meterClicked is called with value (without the #) as the meter argument.

Also inline images work. Unfortunatly currently only when using absolute paths.

ARGUMENTS

RETURN VALUE

Pointer to new richtext meter


RichText/deleteRichText

[top]

SYNOPSIS

long deleteRichText(widget, richtext)

DESCRIPTION

This removes a richt text object from memory. Please do not call functions on "text" after calling deleteRichText, as it does not exist anymore and that could cause crashes in some cases.

ARGUMENTS

RETURN VALUE

1 if successful


RichText/getRichTextFont

[top]

SYNOPSIS

string getRichTextFont(widget, richtext)

DESCRIPTION

This will get the font of a richtext widget.

ARGUMENTS

RETURN VALUE

font name


RichText/getRichTextFontSize

[top]

SYNOPSIS

long getRichTextFontSize(widget, richtext)

DESCRIPTION

This will get the font size of a richtext widget.

ARGUMENTS

RETURN VALUE

font point size


RichText/getRichTextPos

[top]

SYNOPSIS

tuple getRichTextPos(widget, richtext)

DESCRIPTION

Given a reference to a richtext object, this will return a tuple containing the x and y coordinate of a richtext object.

ARGUMENTS

RETURN VALUE

pos


RichText/getRichTextSensor

[top]

SYNOPSIS

string getRichTextSensor(widget, richtext)

DESCRIPTION

Get current sensor string

ARGUMENTS

RETURN VALUE

sensor string


RichText/getRichTextSize

[top]

SYNOPSIS

tuple getRichTextSize(widget, richtext)

DESCRIPTION

Given a reference to a richtext object, this will return a tuple containing the height and width of a richtext object.

ARGUMENTS

RETURN VALUE

size


RichText/getRichTextValue

[top]

SYNOPSIS

string getRichTextValue(widget, richtext)

DESCRIPTION

Returns current richtext value.

ARGUMENTS

RETURN VALUE

value


RichText/getThemeRichText

[top]

SYNOPSIS

long getThemeRichText(widget, name)

DESCRIPTION

You can reference richtext in your python code that was created in the theme file. Basically, you just add a NAME= value to the GRAPH line in the .theme file. Then if you want to use that object, instead of calling createRichText, you can call this function.

The name you pass to the function is the same one that you gave it for the NAME= parameter in the .theme file.

ARGUMENTS

RETURN VALUE

Pointer to richtext


RichText/hideRichText

[top]

SYNOPSIS

long hideRichText(widget, richtext)

DESCRIPTION

This hides an richtext. In other words, during subsequent calls to widgetUpdate(), this richtext will not be drawn.

ARGUMENTS

RETURN VALUE

1 if successful


RichText/moveRichText

[top]

SYNOPSIS

long moveRichText(widget, richtext, x, y)

DESCRIPTION

This moves a text object to a new x, y relative to your widget. In other words, (0,0) is the top corner of your widget, not the screen.

ARGUMENTS

RETURN VALUE

1 if successful


RichText/resizeRichText

[top]

SYNOPSIS

long resizeRichText(widget, richtext, w, h)

DESCRIPTION

This will resize richtext to new height and width.

ARGUMENTS

RETURN VALUE

1 if successful


RichText/setRichTextSensor

[top]

SYNOPSIS

long setRichTextSensor(widget, richtext, sensor)

DESCRIPTION

Get current sensor string

ARGUMENTS

RETURN VALUE

1 if successful


RichText/setRichTextWidth

[top]

SYNOPSIS

long setRichTextWidth(widget, richtext, width)

DESCRIPTION

Given a reference to a rich text object, this function changes it's width to the specified value in pixels.

The height adjusts automatically as the contents are changed with changeRichText.

ARGUMENTS

RETURN VALUE

1 if successful


RichText/showRichText

[top]

SYNOPSIS

long showRichText(widget, richtext)

DESCRIPTION

This shows an richtext. In other words, during subsequent calls to widgetUpdate(), this richtext will be drawn.

ARGUMENTS

RETURN VALUE

1 if successful


Misc/acceptDrops

[top]

SYNOPSIS

long acceptDrops(widget)

DESCRIPTION

Calling this enables your widget to receive Drop events. In other words, the user will be able to drag icons from her desktop and drop them on your widget. The "itemDropped" callback is called as a result with the data about the icon that was dropped on your widget. This allows, for example, icon bars where items are added to the icon bar by Drag and Drop.

ARGUMENTS

RETURN VALUE

1 if successful


Misc/attachClickArea

[top]

SYNOPSIS

long attachClickArea(widget, meter, lB, mB, rB)

DESCRIPTION

It is possible to attach a clickarea to a meter (image or text field), which is moved and resized correctly if the meter is moved or resized.

There is also a callback meterClicked(widget, meter, button) which is called whenever a meter is clicked (if something is attached to it). Given an Image or a TextLabel, this call makes it clickable. When a mouse click is detected, the callback meterClicked is called.

lB, mB, and rB are strings that specify what command is executed when this meter is clicked with the left mouse button, middle mouse button, and right mouse button respectively. If given, the appropriate command is executed when the mouse click is received.

The keyword arguments are all optional. If command is an empty string nothing is executed.

For now the command given to RightButton has obviosly no effect (because that brings up the SuperKaramba menu).

ARGUMENTS

RETURN VALUE

1 if successful


Misc/createClickArea

[top]

SYNOPSIS

long createClickArea(widget, x, y, w, h, cmd_to_run)

DESCRIPTION

This creates a clickable area at x,y with width and height w,h. When this area is clicked, cmd_to_run will be executed. The mouse will change to the clickable icon when over this area.

ARGUMENTS

RETURN VALUE

1 if successful


Misc/execute

[top]

SYNOPSIS

long execute(widget, command)

DESCRIPTION

This command simply executes a program or command on the system. This is just for convience (IE you could accomplish this directly through python, but sometimes threading problems crop up that way). The only option is a string containing the command to execute.

ARGUMENTS

RETURN VALUE

1 if successful


Misc/executeInteractive

[top]

SYNOPSIS

long executeInteractive(widget, command)

DESCRIPTION

This command executes a program or command on the system. But it allows you to get any text that the program outputs. Futhermore, it won't freeze up your widget while the command executes.

To use it, call executeInteractive with the reference to your widget and a list of command options. The array is simply a list that contains the command as the first entry, and each option as a seperate list entry. Output from the command is returned via the commandOutput callback.

The command returns the process number of the command. This is useful if you want to run more than one program at a time. The number will allow you to figure out which program is outputting in the commandOutput callback.

Example: Run the command "ls -la *.zip"

myCommand = ["ls", "-la", "*.zip"] karamba.executeInteractive(widget, myCommand)

ARGUMENTS

RETURN VALUE

1 if successful


Misc/getIp

[top]

SYNOPSIS

string getIp(widget, interface_name)

DESCRIPTION

get current IP address of the interface_name interface.

ARGUMENTS

RETURN VALUE

ip address


Misc/getNumberOfDesktop

[top]

SYNOPSIS

long getNumberOfDesktop(widget)

DESCRIPTION

Returns number fo desktops

ARGUMENTS

RETURN VALUE

number of desktops


Misc/getThemePath

[top]

SYNOPSIS

string getThemePath(widget)

DESCRIPTION

Returns a string containing the directory where your theme was loaded from.

ARGUMENTS

RETURN VALUE

path to theme


Misc/hide

[top]

SYNOPSIS

string hide(widget)

DESCRIPTION

hide theme

ARGUMENTS

RETURN VALUE

1 if successful


Misc/openTheme

[top]

SYNOPSIS

long openTheme(theme)

DESCRIPTION

Opens new theme.

ARGUMENTS

RETURN VALUE

1 if successful


Misc/show

[top]

SYNOPSIS

string show(widget)

DESCRIPTION

show theme

ARGUMENTS

RETURN VALUE

1 if successful


Misc/toggleShowDesktop

[top]

SYNOPSIS

long toggleShowDesktop(widget)

DESCRIPTION

This shows/hides the current desktop just like the Show Desktop button on kicker. Basically, it minimizes all the windows on the current desktop. Call it once to show the desktop and again to hide it.

ARGUMENTS

RETURN VALUE

1 if successful


Misc/translateAll

[top]

SYNOPSIS

long translateAll(widget, relative_x, relative_y)

DESCRIPTION

Moves all widgets within a theme in a particular direction relative from the previous spot without moving the parent theme widget.

ARGUMENTS

RETURN VALUE

1 if successful


Menu/addMenuItem

[top]

SYNOPSIS

long addMenuItem(widget, menu, text, icon)

DESCRIPTION

This adds an entry to the given menu with label text and with given icon. icon can be just an application name in which case the user's current icon set is used, or can be a path to a 16x16 png file.

The function returns the id of the menu item, which identifies that popup menu item uniquely among popupmenu items application-wide or returns 0 if the given menu doesn't exist.

ARGUMENTS

RETURN VALUE

menu item id


Menu/addMenuSeparator

[top]

SYNOPSIS

long addMenuSeparator(widget, menu)

DESCRIPTION

This adds an menu separator to the given menu.

ARGUMENTS

RETURN VALUE

menu item id


Menu/createMenu

[top]

SYNOPSIS

long createMenu(widget)

DESCRIPTION

This creates an empty popup menu and returns a pointer to the menu.

ARGUMENTS

RETURN VALUE

pointer to menu


Menu/deleteMenu

[top]

SYNOPSIS

long deleteMenu(widget, menu)

DESCRIPTION

This deletes the referenced menu if that menu exists.

ARGUMENTS

RETURN VALUE

1 if menu existed and was deleted, returns 0 otherwise.


Menu/popupMenu

[top]

SYNOPSIS

long popupMenu(widget, menu, x, y)

DESCRIPTION

This pops up the given menu at the given co-ordinates. The co-ordinates are relative to the widget, not the screen. You can use negative co-ordinates to make a menu appear to the right of or above your theme.

ARGUMENTS

RETURN VALUE

1 if the menu existed and was popped up, returns 0 otherwise.


Menu/removeMenuItem

[top]

SYNOPSIS

long removeMenuItem(widget, menu, id)

DESCRIPTION

This removes the item with given id from given menu if that menu exists.

ARGUMENTS

RETURN VALUE

1 if the menu item existed and was removed or returns zero otherwise.


Image/addImageTooltip

[top]

SYNOPSIS

long addImageTooltip(widget, image, text)

DESCRIPTION

This creats a tooltip for image with tooltip_text.

Note:

ARGUMENTS

RETURN VALUE

1 if successful


Image/changeImageChannelIntensity

[top]

SYNOPSIS

long changeImageChannelIntensity(widget, image, ratio, channel, millisec)

DESCRIPTION

Changes the "intensity" of the image color channel, which is similar to it's brightness.

ARGUMENTS

RETURN VALUE

1 if successful


Image/changeImageIntensity

[top]

SYNOPSIS

long changeImageIntensity(widget, image, ratio, millisec)

DESCRIPTION

Changes the "intensity" of the image, which is similar to it's brightness. ratio is a floating point number from -1.0 to 1.0 that determines how much to brighten or darken the image. Millisec specifies how long in milliseconds before the image is restored to it's original form. This is useful for "mouse over" type animations. Using 0 for millisec disables this feature and leaves the image permanently affected.

ARGUMENTS

RETURN VALUE

1 if successful


Image/changeImageToGray

[top]

SYNOPSIS

long changeImageToGray(widget, image, millisec)

DESCRIPTION

Turns the given image into a grayscale image. Millisec specifies how long in milliseconds before the image is restored to it's original form. This is useful for "mouse over" type animations. Using 0 for millisec disables this feature and leaves the image permanently affected.

ARGUMENTS

RETURN VALUE

1 if successful


Image/createBackgroundImage

[top]

SYNOPSIS

long createBackgroundImage(widget, x, y, w, h, image)

DESCRIPTION

This creates an background image on your widget at x, y. The filename should be given as the path parameter. In theory the image could be local or could be a url. It works just like adding an image in your theme file. You will need to save the return value to be able to call other functions on your image, such as moveImage()

ARGUMENTS

RETURN VALUE

Pointer to new image meter


Image/createImage

[top]

SYNOPSIS

long createImage(widget, x, y, image)

DESCRIPTION

This creates an image on your widget at x, y. The filename should be given as the path parameter. In theory the image could be local or could be a url. It works just like adding an image in your theme file. You will need to save the return value to be able to call other functions on your image, such as moveImage()

ARGUMENTS

RETURN VALUE

Pointer to new image meter


Image/createTaskIcon

[top]

SYNOPSIS

long createTaskIcon(widget, x, y, ctask)

DESCRIPTION

This creates a task image at x,y.

ARGUMENTS

RETURN VALUE

Pointer to new image meter


Image/deleteImage

[top]

SYNOPSIS

long deleteImage(widget, image)

DESCRIPTION

This removes image from memory. Please do not call functions on "image" after calling deleteImage, as it does not exist anymore and that could cause crashes in some cases.

ARGUMENTS

RETURN VALUE

1 if successful


Image/getImageHeight

[top]

SYNOPSIS

long getImageSize(widget, image)

DESCRIPTION

This returns the height of an image. This is useful if you have rotated an image and its size changed, so you do not know how big it is anymore.

ARGUMENTS

RETURN VALUE

height


Image/getImagePath

[top]

SYNOPSIS

string getImagePath(widget, image)

DESCRIPTION

Returns current image path.

ARGUMENTS

RETURN VALUE

path


Image/getImagePos

[top]

SYNOPSIS

tuple getImagePos(widget, image)

DESCRIPTION

Given a reference to a image object, this will return a tuple containing the x and y coordinate of a image object.

ARGUMENTS

RETURN VALUE

pos


Image/getImageSensor

[top]

SYNOPSIS

string getImageSensor(widget, image)

DESCRIPTION

Get current sensor string

ARGUMENTS

RETURN VALUE

sensor string


Image/getImageSize

[top]

SYNOPSIS

tuple getImageSize(widget, image)

DESCRIPTION

Given a reference to a image object, this will return a tuple containing the height and width of a image object.

ARGUMENTS

RETURN VALUE

size


Image/getImageWidth

[top]

SYNOPSIS

long getImageSize(widget, image)

DESCRIPTION

This returns the width of an image. This is useful if you have rotated an image and its size changed, so you do not know how big it is anymore. // ARGUMENTS * long widget -- karamba * long image -- pointer to image

RETURN VALUE

width


Image/getThemeImage

[top]

SYNOPSIS

long getThemeImage(widget, name)

DESCRIPTION

You can reference an image in your python code that was created in the .theme file. Basically, you just add a NAME= value to the IMAGE line in the .theme file. Then if you want to use that object, instead of calling createImage, you can call this function.

The name you pass to the function is the same one that you gave it for the NAME= parameter in the .theme file.

ARGUMENTS

RETURN VALUE

Pointer to image


Image/hideImage

[top]

SYNOPSIS

long hideImage(widget, image)

DESCRIPTION

This hides an image. In other words, during subsequent calls to widgetUpdate(), this image will not be drawn.

ARGUMENTS

RETURN VALUE

1 if successful


Image/moveImage

[top]

SYNOPSIS

long moveImage(widget, image, x, y)

DESCRIPTION

This moves an image to a new x, y relative to your widget. In other words, (0,0) is the top corner of your widget, not the screen. The imageToMove parameter is a reference to the image to move that you saved as the return value from createImage()

ARGUMENTS

RETURN VALUE

1 if successful


Image/removeImageEffects

[top]

SYNOPSIS

long removeImageEffects(widget, image)

DESCRIPTION

If you have called image effect commands on your image (ex: changeImageIntensity), you can call this to restore your image to it's original form.

ARGUMENTS

RETURN VALUE

1 if successful


Image/removeImageTransformations

[top]

SYNOPSIS

long removeImageTransformations(widget, image)

DESCRIPTION

If you have rotated or resized your image, you can call this to restore your image to it's original form.

ARGUMENTS

RETURN VALUE

1 if successful


Image/resizeImage

[top]

SYNOPSIS

long resizeImage(widget, image, w, h)

DESCRIPTION

This resizes your image to width, height. The imageToResize parameter is a reference to an image that you saved as the return value from createImage()

ARGUMENTS

RETURN VALUE

1 if successful


Image/resizeImageSmooth

[top]

SYNOPSIS

long resizeImageSmooth(widget, image, w, h)

DESCRIPTION

DEPRECATED: resizeImage now allows the user to pick whether to use fast or smooth resizing from the SuperKaramba menu - This resizes your image to width, height. The imageToResize parameter is a reference to an image that you saved as the return value from createImage()

ARGUMENTS

RETURN VALUE

1 if successful


Image/rotateImage

[top]

SYNOPSIS

long rotateImage(widget, image, deg)

DESCRIPTION

This rotates your image to by the specified amount of degrees. The imageToRotate parameter is a reference to an image that you saved as the return value from createImage()

ARGUMENTS

RETURN VALUE

1 if successful


Image/setImagePath

[top]

SYNOPSIS

long setImagePath(widget, image, path)

DESCRIPTION

This will change image of a image widget.

ARGUMENTS

RETURN VALUE

1 if successful


Image/setImageSensor

[top]

SYNOPSIS

long setImageSensor(widget, image, sensor)

DESCRIPTION

Get current sensor string

ARGUMENTS

RETURN VALUE

1 if successful


Image/showImage

[top]

SYNOPSIS

long showImage(widget, image)

DESCRIPTION

This shows a previously hidden image. It does not actually refresh the image on screen. That is what redrawWidget() does.

ARGUMENTS

RETURN VALUE

1 if successful


Graph/createGraph

[top]

SYNOPSIS

long createGraph(widget, x, y, w, h, points)

DESCRIPTION

This creates a graph at x,y with width and height w,h.

ARGUMENTS

RETURN VALUE

Pointer to new graph meter


Graph/deleteGraph

[top]

SYNOPSIS

long deleteGraph(widget, graph)

DESCRIPTION

This deletes graph.

ARGUMENTS

RETURN VALUE

1 if successful


Graph/getGraphColor

[top]

SYNOPSIS

tuple getGraphColor(widget, graph)

DESCRIPTION

Get current graph color

ARGUMENTS

RETURN VALUE

(red, green, blue)


Graph/getGraphMinMax

[top]

SYNOPSIS

tuple getGraphMinMax(widget, graph)

DESCRIPTION

Returns current graph value.

ARGUMENTS

RETURN VALUE

min & max


Graph/getGraphPos

[top]

SYNOPSIS

tuple getGraphPos(widget, graph)

DESCRIPTION

Given a reference to a graph object, this will return a tuple containing the x and y coordinate of a graph object.

ARGUMENTS

RETURN VALUE

pos


Graph/getGraphSensor

[top]

SYNOPSIS

string getGraphSensor(widget, graph)

DESCRIPTION

Get current sensor string

ARGUMENTS

RETURN VALUE

sensor string


Graph/getGraphSize

[top]

SYNOPSIS

tuple getGraphSize(widget, graph)

DESCRIPTION

Given a reference to a graph object, this will return a tuple containing the height and width of a graph object.

ARGUMENTS

RETURN VALUE

size


Graph/getGraphValue

[top]

SYNOPSIS

long getGraphValue(widget, graph)

DESCRIPTION

Returns current graph value.

ARGUMENTS

RETURN VALUE

value


Graph/getThemeGraph

[top]

SYNOPSIS

long getThemeGraph(widget, name)

DESCRIPTION

You can reference graph in your python code that was created in the theme file. Basically, you just add a NAME= value to the GRAPH line in the .theme file. Then if you want to use that object, instead of calling createGraph, you can call this function.

The name you pass to the function is the same one that you gave it for the NAME= parameter in the .theme file.

ARGUMENTS

RETURN VALUE

Pointer to graph


Graph/hideGraph

[top]

SYNOPSIS

long hideGraph(widget, graph)

DESCRIPTION

This hides an graph. In other words, during subsequent calls to widgetUpdate(), this graph will not be drawn.

ARGUMENTS

RETURN VALUE

1 if successful


Graph/moveGraph

[top]

SYNOPSIS

long moveGraph(widget, graph, x, y)

DESCRIPTION

This will move graph to new x and y coordinates.

ARGUMENTS

RETURN VALUE

1 if successful


Graph/resizeGraph

[top]

SYNOPSIS

long resizeGraph(widget, graph, w, h)

DESCRIPTION

This will resize graph to new height and width.

ARGUMENTS

RETURN VALUE

1 if successful


Graph/setGraphColor

[top]

SYNOPSIS

tuple setGraphColor(widget, graph, red, green, blue)

DESCRIPTION

Set current graph color

ARGUMENTS

RETURN VALUE

1 if successful


Graph/setGraphMinMax

[top]

SYNOPSIS

long setGraphMinMax(widget, graph, min, max)

DESCRIPTION

Returns current graph value.

ARGUMENTS

RETURN VALUE

1 if successful


Graph/setGraphSensor

[top]

SYNOPSIS

long setGraphSensor(widget, graph, sensor)

DESCRIPTION

Get current sensor string

ARGUMENTS

RETURN VALUE

1 if successful


Graph/setGraphValue

[top]

SYNOPSIS

long setGraphValue(widget, graph, value)

DESCRIPTION

Sets current graph value.

ARGUMENTS

RETURN VALUE

1 if successful


Graph/showGraph

[top]

SYNOPSIS

long showGraph(widget, graph)

DESCRIPTION

This shows an graph. In other words, during subsequent calls to widgetUpdate(), this graph will be drawn.

ARGUMENTS

RETURN VALUE

1 if successful


Config/addMenuConfigOption

[top]

SYNOPSIS

long addMenuConfigOption(widget, key, name)

DESCRIPTION

SuperKaramba supports a simplistic configuration pop-up menu. This menu appears when you right-click on a widget and choose Configure Theme. Basically, it allows you to have check-able entrys in the menu to allow the user to enable or disable features in your theme.

Before you use any configuration menu stuff, you NEED to add a new callback to your script:

def menuOptionChanged(widget, key, value):

This will get called whenever a config menu option is changed. Now you can add items to the config menu:

addMenuConfigOption(widget, String key, String name)

Key is the name of a key value where the value will be saved automatically into the widget's config file. Name is the actual text that will show up in the config menu.

For example, I could allow the user to enable or disable a clock showing up in my theme:

karamba.addMenuConfigOption(widget, "showclock", "Display a clock")

ARGUMENTS

RETURN VALUE

1 if successful


Config/readConfigEntry

[top]

SYNOPSIS

string|long readConfigEntry(widget, key, value)

DESCRIPTION

This function reads an entry from the config file with the given key.

ARGUMENTS

RETURN VALUE

config value for key


Config/readMenuConfigOption

[top]

SYNOPSIS

long readMenuConfigOption(widget, key)

DESCRIPTION

This returns whether or not the given option is checked in the theme's Configure Theme menu.

See addMenuConfigOption for a more detailed explanation.

ARGUMENTS

RETURN VALUE

0 is returned if it is not checked and 1 is returned if it is.


Config/setMenuConfigOption

[top]

SYNOPSIS

long setMenuConfigOption(widget, key, value)

DESCRIPTION

This sets whether or not the given option is checked in the theme's Configure Theme menu. Value should be 0 if key should not be checked and 1 if key should be checked.

See addMenuConfigOption for a more detailed explanation.

ARGUMENTS

RETURN VALUE

1 if successful


Config/writeConfigEntry

[top]

SYNOPSIS

long writeConfigEntry(widget, key, value)

DESCRIPTION

SuperKaramba automatically supports configuration files for each theme. These files will be saved in /your/home/dir/.superkaramba/ and will be named themenamerc where themename is the name of the theme.

This function writes an entry into the config file with the given key and value.

For example, to save my favorite color, I would do karamba.writeConfigEntry(widget, "FavColor", "Red")

ARGUMENTS

RETURN VALUE

1 if successful


Bar/createBar

[top]

SYNOPSIS

long createBar(widget, x, y, w, h, image)

DESCRIPTION

This creates a bar at x,y with width and height w,h.

ARGUMENTS

RETURN VALUE

Pointer to new bar meter


Bar/deleteBar

[top]

SYNOPSIS

long deleteBar(widget, bar)

DESCRIPTION

This deletes bar.

ARGUMENTS

RETURN VALUE

1 if successful


Bar/getBarImage

[top]

SYNOPSIS

string getBarImage(widget, bar)

DESCRIPTION

Get bar image

ARGUMENTS

RETURN VALUE

path to bar image


Bar/getBarMinMax

[top]

SYNOPSIS

tuple getBarMinMax(widget, bar)

DESCRIPTION

Returns current bar value.

ARGUMENTS

RETURN VALUE

min & max


Bar/getBarPos

[top]

SYNOPSIS

tuple getBarPos(widget, bar)

DESCRIPTION

Given a reference to a bar object, this will return a tuple containing the x and y coordinate of a bar object.

ARGUMENTS

RETURN VALUE

pos


Bar/getBarSensor

[top]

SYNOPSIS

string getBarSensor(widget, bar)

DESCRIPTION

Get current sensor string

ARGUMENTS

RETURN VALUE

sensor string


Bar/getBarSize

[top]

SYNOPSIS

tuple getBarSize(widget, bar)

DESCRIPTION

Given a reference to a bar object, this will return a tuple containing the height and width of a bar object.

ARGUMENTS

RETURN VALUE

size


Bar/getBarValue

[top]

SYNOPSIS

long getBarValue(widget, bar)

DESCRIPTION

Returns current bar value.

ARGUMENTS

RETURN VALUE

value


Bar/getBarVertical

[top]

SYNOPSIS

string getBarVertical(widget, bar)

DESCRIPTION

Check if bar is vertical bar

ARGUMENTS

RETURN VALUE

1 if vertical


Bar/getThemeBar

[top]

SYNOPSIS

long getThemeBar(widget, name)

DESCRIPTION

You can reference bar in your python code that was created in the theme file. Basically, you just add a NAME= value to the BAR line in the .theme file. Then if you want to use that object, instead of calling createBar, you can call this function.

The name you pass to the function is the same one that you gave it for the NAME= parameter in the .theme file.

ARGUMENTS

RETURN VALUE

Pointer to bar


Bar/hideBar

[top]

SYNOPSIS

long hideBar(widget, bar)

DESCRIPTION

This hides an bar. In other words, during subsequent calls to widgetUpdate(), this bar will not be drawn.

ARGUMENTS

RETURN VALUE

1 if successful


Bar/moveBar

[top]

SYNOPSIS

long moveBar(widget, bar, x, y)

DESCRIPTION

This will move bar to new x and y coordinates.

ARGUMENTS

RETURN VALUE

1 if successful


Bar/resizeBar

[top]

SYNOPSIS

long resizeBar(widget, bar, w, h)

DESCRIPTION

This will resize bar to new height and width.

ARGUMENTS

RETURN VALUE

1 if successful


Bar/setBarImage

[top]

SYNOPSIS

long setBarImage(widget, bar, image)

DESCRIPTION

Get bar image

ARGUMENTS

RETURN VALUE

1 if successful


Bar/setBarMinMax

[top]

SYNOPSIS

long setBarMinMax(widget, bar, min, max)

DESCRIPTION

Returns current bar value.

ARGUMENTS

RETURN VALUE

1 if successful


Bar/setBarSensor

[top]

SYNOPSIS

long setBarSensor(widget, bar, sensor)

DESCRIPTION

Get current sensor string

ARGUMENTS

RETURN VALUE

1 if successful


Bar/setBarValue

[top]

SYNOPSIS

long setBarValue(widget, bar, value)

DESCRIPTION

Sets current bar value.

ARGUMENTS

RETURN VALUE

1 if successful


Bar/setBarVertical

[top]

SYNOPSIS

long setBarVertical(widget, bar)

DESCRIPTION

Set bar vertical

ARGUMENTS

RETURN VALUE

1 if successful


Bar/showBar

[top]

SYNOPSIS

long showBar(widget, bar)

DESCRIPTION

This shows an bar. In other words, during subsequent calls to widgetUpdate(), this bar will be drawn.

ARGUMENTS

RETURN VALUE

1 if successful