GraphFrame

Experimental: This class may be changed or removed in future versions.

Inherits:GraphElement<Container<Control<CanvasItem<Node<Object

GraphFrame is a specialGraphElement that can be used to organize otherGraphElements inside aGraphEdit.

Description

GraphFrame is a specialGraphElement to which otherGraphElements can be attached. It can be configured to automatically resize to enclose all attachedGraphElements. If the frame is moved, all the attachedGraphElements inside it will be moved as well.

A GraphFrame is always kept behind the connection layer and otherGraphElements inside aGraphEdit.

Properties

bool

autoshrink_enabled

true

int

autoshrink_margin

40

int

drag_margin

16

MouseFilter

mouse_filter

0 (overridesControl)

Color

tint_color

Color(0.3,0.3,0.3,0.75)

bool

tint_color_enabled

false

String

title

""

Methods

HBoxContainer

get_titlebar_hbox()

Theme Properties

Color

resizer_color

Color(0.875,0.875,0.875,1)

StyleBox

panel

StyleBox

panel_selected

StyleBox

titlebar

StyleBox

titlebar_selected


Signals

autoshrink_changed()🔗

Emitted whenautoshrink_enabled orautoshrink_margin changes.


Property Descriptions

boolautoshrink_enabled =true🔗

Iftrue, the frame's rect will be adjusted automatically to enclose all attachedGraphElements.


intautoshrink_margin =40🔗

The margin around the attached nodes that is used to calculate the size of the frame whenautoshrink_enabled istrue.


intdrag_margin =16🔗

The margin inside the frame that can be used to drag the frame.


Colortint_color =Color(0.3,0.3,0.3,0.75)🔗

The color of the frame whentint_color_enabled istrue.


booltint_color_enabled =false🔗

Iftrue, the tint color will be used to tint the frame.


Stringtitle =""🔗

Title of the frame.


Method Descriptions

HBoxContainerget_titlebar_hbox()🔗

Returns theHBoxContainer used for the title bar, only containing aLabel for displaying the title by default.

This can be used to add custom controls to the title bar such as option or close buttons.


Theme Property Descriptions

Colorresizer_color =Color(0.875,0.875,0.875,1)🔗

The color modulation applied to the resizer icon.


StyleBoxpanel🔗

The defaultStyleBox used for the background of theGraphFrame.


StyleBoxpanel_selected🔗

TheStyleBox used for the background of theGraphFrame when it is selected.


StyleBoxtitlebar🔗

TheStyleBox used for the title bar of theGraphFrame.


StyleBoxtitlebar_selected🔗

TheStyleBox used for the title bar of theGraphFrame when it is selected.


User-contributed notes

Please read theUser-contributed notes policy before submitting a comment.