GraphFrame

实验性: This class may be changed or removed in future versions.

继承: GraphElement < Container < Control < CanvasItem < Node < Object

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

描述

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

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

属性

方法

主题属性


信号

autoshrink_changed ( )

Emitted when autoshrink_enabled or autoshrink_margin changes.


属性说明

bool autoshrink_enabled = true

  • void set_autoshrink_enabled ( value: bool )
  • bool is_autoshrink_enabled ( )

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


int autoshrink_margin = 40

  • void set_autoshrink_margin ( value: int )
  • int get_autoshrink_margin ( )

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


int drag_margin = 16

  • void set_drag_margin ( value: int )
  • int get_drag_margin ( )

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


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

  • void set_tint_color ( value: Color )
  • Color get_tint_color ( )

The color of the frame when tint_color_enabled is true.


bool tint_color_enabled = false

  • void set_tint_color_enabled ( value: bool )
  • bool is_tint_color_enabled ( )

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


String title = ""

Title of the frame.


方法说明

HBoxContainer 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.


主题属性说明

Color resizer_color = Color(0.875, 0.875, 0.875, 1)

The color modulation applied to the resizer icon.


StyleBox panel

The default StyleBox used for the background of the GraphFrame.


StyleBox panel_selected

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


StyleBox titlebar

The StyleBox used for the title bar of the GraphFrame.


StyleBox titlebar_selected

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

1

本方法通常需要用户覆盖才能生效。

2

本方法无副作用,不会修改该实例的任何成员变量。

3

本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。

4

本方法用于构造某个类型。

5

调用本方法无需实例,可直接使用类名进行调用。

6

本方法描述的是使用本类型作为左操作数的有效运算符。

7

这个值是由下列位标志构成位掩码的整数。

8

无返回值。