PGScrollFrame

from panda3d.core import PGScrollFrame
class PGScrollFrame

Bases: PGVirtualFrame

This is a special kind of frame that pretends to be much larger than it actually is. You can scroll through the frame, as if you’re looking through a window at the larger frame beneath. All children of this frame node are scrolled and clipped as if they were children of the larger, virtual frame.

This is implemented as a specialization of PGVirtualFrame, which handles the meat of the virtual canvas. This class adds automatic support for scroll bars, and restricts the virtual transform to translate only (no scale or rotate).

Inheritance diagram

Inheritance diagram of PGScrollFrame

__init__(*args, **kwargs)
auto_hide
clearHorizontalSlider()

C++ Interface: clear_horizontal_slider(const PGScrollFrame self)

/**
  • Removes the horizontal scroll bar from control of the frame. It is your

  • responsibility to actually remove or hide the object itself.

*/

clearVerticalSlider()

C++ Interface: clear_vertical_slider(const PGScrollFrame self)

/**
  • Removes the vertical scroll bar from control of the frame. It is your

  • responsibility to actually remove or hide the object itself.

*/

clearVirtualFrame()

C++ Interface: clear_virtual_frame(const PGScrollFrame self)

/**
  • Removes the virtual frame from the item. This effectively sets the virtual

  • frame to the same size as the clip frame. Scrolling will no longer be

  • possible.

*/

clear_horizontal_slider()

C++ Interface: clear_horizontal_slider(const PGScrollFrame self)

/**
  • Removes the horizontal scroll bar from control of the frame. It is your

  • responsibility to actually remove or hide the object itself.

*/

clear_vertical_slider()

C++ Interface: clear_vertical_slider(const PGScrollFrame self)

/**
  • Removes the vertical scroll bar from control of the frame. It is your

  • responsibility to actually remove or hide the object itself.

*/

clear_virtual_frame()

C++ Interface: clear_virtual_frame(const PGScrollFrame self)

/**
  • Removes the virtual frame from the item. This effectively sets the virtual

  • frame to the same size as the clip frame. Scrolling will no longer be

  • possible.

*/

getAutoHide()

C++ Interface: get_auto_hide(PGScrollFrame self)

/**
  • Returns the auto_hide flag. See set_auto_hide().

*/

getClassType()

C++ Interface: get_class_type()

getHorizontalSlider()

C++ Interface: get_horizontal_slider(PGScrollFrame self)

/**
  • Returns the PGSliderBar that serves as the horizontal scroll bar for this

  • frame, if any, or NULL if it is not set.

*/

getManagePieces()

C++ Interface: get_manage_pieces(PGScrollFrame self)

/**
  • Returns the manage_pieces flag. See set_manage_pieces().

*/

getVerticalSlider()

C++ Interface: get_vertical_slider(PGScrollFrame self)

/**
  • Returns the PGSliderBar that serves as the vertical scroll bar for this

  • frame, if any, or NULL if it is not set.

*/

getVirtualFrame()

C++ Interface: get_virtual_frame(PGScrollFrame self)

/**
  • Returns the bounding rectangle of the virtual frame. See

  • set_virtual_frame(). If has_virtual_frame() is false, this returns the

  • item’s clip frame.

*/

get_auto_hide()

C++ Interface: get_auto_hide(PGScrollFrame self)

/**
  • Returns the auto_hide flag. See set_auto_hide().

*/

get_class_type()

C++ Interface: get_class_type()

get_horizontal_slider()

C++ Interface: get_horizontal_slider(PGScrollFrame self)

/**
  • Returns the PGSliderBar that serves as the horizontal scroll bar for this

  • frame, if any, or NULL if it is not set.

*/

get_manage_pieces()

C++ Interface: get_manage_pieces(PGScrollFrame self)

/**
  • Returns the manage_pieces flag. See set_manage_pieces().

*/

get_vertical_slider()

C++ Interface: get_vertical_slider(PGScrollFrame self)

/**
  • Returns the PGSliderBar that serves as the vertical scroll bar for this

  • frame, if any, or NULL if it is not set.

*/

get_virtual_frame()

C++ Interface: get_virtual_frame(PGScrollFrame self)

/**
  • Returns the bounding rectangle of the virtual frame. See

  • set_virtual_frame(). If has_virtual_frame() is false, this returns the

  • item’s clip frame.

*/

hasVirtualFrame()

C++ Interface: has_virtual_frame(PGScrollFrame self)

/**
  • Returns true if the virtual frame has a bounding rectangle; see

  • set_virtual_frame(). Most PGScrollFrame objects will have a virtual frame.

*/

has_virtual_frame()

C++ Interface: has_virtual_frame(PGScrollFrame self)

/**
  • Returns true if the virtual frame has a bounding rectangle; see

  • set_virtual_frame(). Most PGScrollFrame objects will have a virtual frame.

*/

horizontal_slider
manage_pieces
recompute()

C++ Interface: recompute(const PGScrollFrame self)

/**
  • Forces the PGScrollFrame to recompute itself right now. Normally this

  • should not be required.

*/

remanage()

C++ Interface: remanage(const PGScrollFrame self)

/**
  • Manages the position and size of the scroll bars. Normally this should not

  • need to be called directly.

*/

setAutoHide()

C++ Interface: set_auto_hide(const PGScrollFrame self, bool auto_hide)

/**
  • Sets the auto_hide flag. When this is true, the two scroll bars are

  • automatically hidden if they are not needed (that is, if the virtual frame

  • would fit within the clip frame without them), and they are automatically

  • shown when they are needed.

  • Setting this flag true forces the manage_pieces flag to also be set true.

*/

setHorizontalSlider()

C++ Interface: set_horizontal_slider(const PGScrollFrame self, PGSliderBar horizontal_slider)

/**
  • Sets the PGSliderBar object that will serve as the horizontal scroll bar

  • for this frame. It is your responsibility to parent this slider bar to the

  • frame and move it to the appropriate place.

*/

setManagePieces()

C++ Interface: set_manage_pieces(const PGScrollFrame self, bool manage_pieces)

/**
  • Sets the manage_pieces flag. When this is true, the sub-pieces of the

  • scroll frame–that is, the two scroll bars–are automatically positioned

  • and/or resized when the scroll frame’s overall frame is changed. They are

  • also automatically resized to fill in the gap when one or the other is

  • hidden.

*/

setVerticalSlider()

C++ Interface: set_vertical_slider(const PGScrollFrame self, PGSliderBar vertical_slider)

/**
  • Sets the PGSliderBar object that will serve as the vertical scroll bar for

  • this frame. It is your responsibility to parent this slider bar to the

  • frame and move it to the appropriate place.

*/

setVirtualFrame()

C++ Interface: set_virtual_frame(const PGScrollFrame self, const LVecBase4f virtual_frame) set_virtual_frame(const PGScrollFrame self, float left, float right, float bottom, float top)

/**
  • Sets the bounding rectangle of the virtual frame. This is the size of the

  • large, virtual canvas which we can see only a portion of at any given time.

*/

/**
  • Sets the bounding rectangle of the virtual frame. This is the size of the

  • large, virtual canvas which we can see only a portion of at any given time.

*/

set_auto_hide()

C++ Interface: set_auto_hide(const PGScrollFrame self, bool auto_hide)

/**
  • Sets the auto_hide flag. When this is true, the two scroll bars are

  • automatically hidden if they are not needed (that is, if the virtual frame

  • would fit within the clip frame without them), and they are automatically

  • shown when they are needed.

  • Setting this flag true forces the manage_pieces flag to also be set true.

*/

set_horizontal_slider()

C++ Interface: set_horizontal_slider(const PGScrollFrame self, PGSliderBar horizontal_slider)

/**
  • Sets the PGSliderBar object that will serve as the horizontal scroll bar

  • for this frame. It is your responsibility to parent this slider bar to the

  • frame and move it to the appropriate place.

*/

set_manage_pieces()

C++ Interface: set_manage_pieces(const PGScrollFrame self, bool manage_pieces)

/**
  • Sets the manage_pieces flag. When this is true, the sub-pieces of the

  • scroll frame–that is, the two scroll bars–are automatically positioned

  • and/or resized when the scroll frame’s overall frame is changed. They are

  • also automatically resized to fill in the gap when one or the other is

  • hidden.

*/

set_vertical_slider()

C++ Interface: set_vertical_slider(const PGScrollFrame self, PGSliderBar vertical_slider)

/**
  • Sets the PGSliderBar object that will serve as the vertical scroll bar for

  • this frame. It is your responsibility to parent this slider bar to the

  • frame and move it to the appropriate place.

*/

set_virtual_frame()

C++ Interface: set_virtual_frame(const PGScrollFrame self, const LVecBase4f virtual_frame) set_virtual_frame(const PGScrollFrame self, float left, float right, float bottom, float top)

/**
  • Sets the bounding rectangle of the virtual frame. This is the size of the

  • large, virtual canvas which we can see only a portion of at any given time.

*/

/**
  • Sets the bounding rectangle of the virtual frame. This is the size of the

  • large, virtual canvas which we can see only a portion of at any given time.

*/

setup()

C++ Interface: setup(const PGScrollFrame self, float width, float height, float left, float right, float bottom, float top, float slider_width, float bevel)

/**
  • Creates a PGScrollFrame with the indicated dimensions, and the indicated

  • virtual frame.

*/

upcastToPGVirtualFrame()

C++ Interface: upcast_to_PGVirtualFrame(const PGScrollFrame self)

upcast from PGScrollFrame to PGVirtualFrame

upcast_to_PGVirtualFrame()

C++ Interface: upcast_to_PGVirtualFrame(const PGScrollFrame self)

upcast from PGScrollFrame to PGVirtualFrame

vertical_slider
virtual_frame