Table of Contents

Class GraphFrame

GraphFrame is a special GraphElement that can be used to organize other GraphElements inside a GraphEdit.

Inheritance
GraphFrame

Remarks

GraphFrame is a special GraphElement to which other GraphElements can be attached. It can be configured to automatically resize to enclose all attached GraphElements. If the frame is moved, all the attached GraphElements inside it will be moved as well.

A GraphFrame is always kept behind the connection layer and other GraphElements inside a GraphEdit.

Properties

autoshrink_enabled

If true, the frame's rect will be adjusted automatically to enclose all attached GraphElements.

var autoshrink_enabled : bool = true

Property Value

bool

Remarks

  • void set_autoshrink_enabled(bool value)
  • bool is_autoshrink_enabled

autoshrink_margin

The margin around the attached nodes that is used to calculate the size of the frame when autoshrink_enabled is true.

var autoshrink_margin : int = 40

Property Value

int

Remarks

  • void set_autoshrink_margin(int value)
  • int get_autoshrink_margin

drag_margin

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

var drag_margin : int = 16

Property Value

int

Remarks

  • void set_drag_margin(int value)
  • int get_drag_margin

tint_color

The color of the frame when tint_color_enabled is true.

var tint_color : Color = Color(0.3, 0.3, 0.3, 0.75)

Property Value

Color

Remarks

  • void set_tint_color(Color value)
  • Color get_tint_color

tint_color_enabled

If true, the tint color will be used to tint the frame.

var tint_color_enabled : bool = false

Property Value

bool

Remarks

  • void set_tint_color_enabled(bool value)
  • bool is_tint_color_enabled

title

Title of the frame.

var title : String = ""

Property Value

String

Remarks

resizer_color

Theme Property

The color modulation applied to the resizer icon.

 = ``Color(0.875, 0.875, 0.875, 1)``

Property Value

Color

panel

Theme Property

The default StyleBox used for the background of the GraphFrame.

StyleBox panel

Property Value

StyleBox

panel_selected

Theme Property

The StyleBox used for the background of the GraphFrame when it is selected.

StyleBox panel_selected

Property Value

StyleBox

titlebar

Theme Property

The StyleBox used for the title bar of the GraphFrame.

StyleBox titlebar

Property Value

StyleBox

titlebar_selected

Theme Property

The StyleBox used for the title bar of the GraphFrame when it is selected.

StyleBox titlebar_selected

Property Value

StyleBox

Methods

get_titlebar_hbox

Returns the HBoxContainer used for the title bar, only containing a Label for displaying the title by default.

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

HBoxContainer get_titlebar_hbox

Events

autoshrink_changed

Emitted when autoshrink_enabled or autoshrink_margin changes.

signal autoshrink_changed