Gtk_Styled
[ class tree: Gtk_Styled ] [ index: Gtk_Styled ] [ all elements ]

Class: Gtk_Styled_Adjustment

Source Location: /Gtk_Styled-1.0.0/Adjustment.php

Class Overview


A styleable adjustment pseudo widget.


Author(s):

Version:

  • @VER@

Copyright:

  • Copyright © 2005 Scott Mattocks

Variables

Methods


Child classes:

Gtk_Styled_HAdjustment
A styleable adjustment pseudo widget.
Gtk_Styled_VAdjustment
A styleable adjustment pseudo widget.

Inherited Variables

Inherited Methods


Class Details

[line 40]
A styleable adjustment pseudo widget.

The interface for this should mimic a GtkAdjustment.

  • Copyright: Copyright © 2005 Scott Mattocks
  • License: PHP
  • Version: @VER@
  • Author: Scott Mattocks <scottmattocks@php.net>
  • Abstract:


[ Top ]


Class Variables

$bar =

[line 61]

The visual representation of the adjustment.

Type:   object


[ Top ]

$lower =

[line 77]

The lower limit of the value.

Type:   double


[ Top ]

$pageIncrement =

[line 92]

The amount that the value should change with one page.

Type:   double


[ Top ]

$pageSize =

[line 97]

The size of one page's worth of data.

Type:   double


[ Top ]

$postTrack =

[line 66]

The portion of the track after the bar.

Type:   object


[ Top ]

$preTrack =

[line 56]

The portion of the track before the bar.

Type:   object


[ Top ]

$stepIncrement =

[line 87]

The amount that the value should change with one step.

Type:   double


[ Top ]

$track =

[line 51]

The track that the bar sits in.

Type:   object


[ Top ]

$upper =

[line 82]

The upper limit of the value.

Type:   double


[ Top ]

$value =

[line 72]

The value that the adjustment represents.

Type:   double


[ Top ]

$widget =

[line 46]

The useable widget

Type:   object


[ Top ]

$width =  15

[line 102]

The widget width/height (depending on the orientation)

Type:   integer


[ Top ]



Method Detail

Gtk_Styled_Adjustment (Constructor)   [line 120]

void Gtk_Styled_Adjustment( double $value, double $lower, double $upper, double $step_inc, double $page_inc, double $page_size)

Constructor.

The constructor should set the basic properties of the pseudo widget and then create the more advanced properties. The advanced properties include the bar and the track that it moves in.

  • Access: public

Parameters:

double   $value     
double   $lower     
double   $upper     
double   $step_inc     
double   $page_inc     
double   $page_size     

[ Top ]

changed   [line 498]

void changed( none 0)

Notify the system that a change has been made.
  • Access: public

Parameters:

none   0     

[ Top ]

checkMouseBounds   [line 691]

boolean checkMouseBounds( none 0)

Check to see that the mouse is within the boundries of the bar.

Check the current mouse position to see if it is within the bounds of the adjustment bar. It is only necessary to check if the mouse is with in one direction of the bar's alloted space. For example, we only care if the mouse is within the y-range of a vertical adjustment.

  • Access: public
  • Abstract:

Overridden in child classes as:

Gtk_Styled_HAdjustment::checkMouseBounds()
Check to see that the mouse is within the boundries of the bar.
Gtk_Styled_VAdjustment::checkMouseBounds()
Check to see that the mouse is within the boundries of the bar.

Parameters:

none   0     

[ Top ]

clamp_page   [line 523]

void clamp_page( double $lower, double $upper)

Prevent the bound of the track from being exceeded by the bar.
  • Access: public

Parameters:

double   $lower     The lower boundry.
double   $upper     The upper boundry.

[ Top ]

getLower   [line 623]

double getLower( none 0)

Get the adjustments lower limit.
  • Access: public

Parameters:

none   0     

[ Top ]

getPageIncrement   [line 659]

double getPageIncrement( none 0)

Get the adjustments page increment.
  • Access: public

Parameters:

none   0     

[ Top ]

getPageSize   [line 671]

double getPageSize( none 0)

Get the adjustments page size.
  • Access: public

Parameters:

none   0     

[ Top ]

getStepIncrement   [line 647]

double getStepIncrement( none 0)

Get the adjustments step increment.
  • Access: public

Parameters:

none   0     

[ Top ]

getUpper   [line 635]

double getUpper( none 0)

Get the adjustments upper limit.
  • Access: public

Parameters:

none   0     

[ Top ]

getValue   [line 611]

double getValue( none 0)

Get the adjustments value.
  • Access: public

Parameters:

none   0     

[ Top ]

getWidget   [line 171]

&object &getWidget( none 0)

Get the final product that the user can use.

To make things easier for the user, and to keep some consistency with other PEAR Gtk classes, the final usable object is called widget and is returned from the getWidget method.

  • Access: public

Parameters:

none   0     

[ Top ]

setBarContents   [line 595]

widget &setBarContents( object &$widget)

Set the contents of the bar to the given widget.

This method makes it possible to put a label, pixmap, or any other widget into the bar in order to alter the bar's appearance. When combined with setBarMask(), this method makes the style an shape of the adjustment bar completely controllable by the programmer.

The previous contents of the bar are returned after the new contents have been added.

  • Return: The previous contents of the bar.
  • Access: public

Parameters:

object   &$widget     The new widget to put in the bar.

[ Top ]

setBarMask   [line 574]

void setBarMask( object &$mask, [ $x = 0], [ $y = 0])

Set the pix mask for the bar.

Make the bar appear to be something other than a rectangle. This lets you create images for the bar so that it can be anything you want. This is the ultimate in adjustment customizatioin.

NOTE: I don't know what will happen if you change the size of the bar when a mask is applied. Changing the page size and upper and lower values could have undesired effects.

  • Access: public

Parameters:

object   &$mask     The image to make the bar appear as.
   $x     
   $y     

[ Top ]

setLower   [line 381]

void setLower( double $lower)

Set the lower limit of the adjustment.

Sets the lower limit of the adjustment widget. The lower limit affects the bar size and position.

  • Access: public

Parameters:

double   $lower     The new lower limit value.

[ Top ]

setPageIncrement   [line 454]

void setPageIncrement( double $increment)

Set the size of one page movement.

Sets the size of one page. One page is the amount a scroll bar will move when the space around the bar of a scroll bar is pressed.

  • Access: public

Parameters:

double   $increment     The new size of one page

[ Top ]

setPageSize   [line 477]

void setPageSize( $pageSize, double $increment)

Set the size of one page.

Sets the size of one page. One page is the size of the display area. Changing the page size has an affect on the bar size and position.

  • Access: public

Parameters:

double   $increment     The new size of one page
   $pageSize     

[ Top ]

setStepIncrement   [line 431]

void setStepIncrement( double $increment)

Set the size of one step.

Sets the size of one step. One step is the amount a scroll bar will move when the arrow at the begining or end of the scroll bar is pressed.

  • Access: public

Parameters:

double   $increment     The new size of one step

[ Top ]

setStyle   [line 549]

void setStyle( string $portion, $style, widget &$style)

Set the style for a portion of the adjustment.

Each portion of the adjustment is styleable. The style that is passed will be applied to the portion of the adjustment.

  • Access: public

Parameters:

string   $portion     The portion to style.
widget   &$style     The style to apply.
   $style     

[ Top ]

setUpper   [line 405]

void setUpper( double $upper)

Set the upper limit of the adjustment.

Sets the upper limit of the adjustment widget. The upper limit affects the bar size and position.

  • Access: public

Parameters:

double   $upper     The new upper limit value.

[ Top ]

setValue   [line 349]

void setValue( double $value)

Set the current adjustment value.

Sets the value that the adjustment represents. The value has an impact on the bar position and size.

  • Access: public

Parameters:

double   $value     The new adjustment value.

[ Top ]

set_value   [line 533]

void set_value( $value)

Alias of setValue. Added for API consistency.

Parameters:

   $value     

[ Top ]

value_changed   [line 510]

void value_changed( none 0)

Notify the system that a value has changed.
  • Access: public

Parameters:

none   0     

[ Top ]


Documentation generated on Thu, 16 Nov 2006 10:00:17 -0500 by phpDocumentor 1.3.0. PEAR Logo Copyright © PHP Group 2004.