IDAPython 8.4
|
Classes | |
class | ButtonInput |
class | ChkGroupControl |
class | ChkGroupItemControl |
class | ColorInput |
class | Control |
class | DirInput |
class | DropdownListControl |
class | EmbeddedChooserControl |
class | FileInput |
class | FormChangeCb |
class | GroupControl |
class | GroupItemControl |
class | InputControl |
class | LabelControl |
class | MultiLineTextControl |
class | NumericArgument |
class | NumericInput |
class | NumericLabel |
class | RadGroupControl |
class | RadGroupItemControl |
class | StringArgument |
class | StringInput |
class | StringLabel |
Public Member Functions | |
__init__ (self, form, controls) | |
Contruct a Form class. | |
Free (self) | |
Frees all resources associated with a compiled form. | |
__getitem__ (self, name) | |
Returns a control object by name. | |
Add (self, name, ctrl, mkattr=True) | |
Low level function. | |
FindControlById (self, id) | |
Finds a control instance given its id. | |
AddControls (self, controls, mkattr=True) | |
Adds controls from a dictionary. | |
CompileEx (self, form) | |
Low level function. | |
Compile (self) | |
Compiles a form and returns the form object (self) and the argument list. | |
Compiled (self) | |
Checks if the form has already been compiled. | |
Execute (self) | |
Displays a modal dialog containing the compiled form. | |
Open (self) | |
Opens a widget containing the compiled form. | |
EnableField (self, ctrl, enable) | |
Enable or disable an input field. | |
ShowField (self, ctrl, show) | |
Show or hide an input field. | |
MoveField (self, ctrl, x, y, w, h) | |
Move/resize an input field. | |
GetFocusedField (self) | |
Get currently focused input field. | |
SetFocusedField (self, ctrl) | |
Set currently focused input field. | |
RefreshField (self, ctrl) | |
Refresh a field. | |
Close (self, close_normally) | |
Close the form. | |
GetControlValue (self, ctrl) | |
Returns the control's value depending on its type. | |
SetControlValue (self, ctrl, value) | |
Set the control's value depending on its type. | |
Static Public Member Functions | |
create_string_buffer (value, size=None) | |
fieldtype_to_ctype (tp, i64=False) | |
Factory method returning a ctype class corresponding to the field type string. | |
ControlToFieldTypeIdAndSize (ctrl) | |
Converts a control object to a tuple containing the field id and the associated buffer size. | |
Public Attributes | |
form = form | |
controls = controls | |
title = None | |
bool | modal = True |
int | openform_flags = 0 |
int | modal = 1 |
p_fa | |
Static Public Attributes | |
str | FT_ASCII = 'A' |
str | FT_SEG = 'S' |
str | FT_HEX = 'N' |
str | FT_SHEX = 'n' |
str | FT_COLOR = 'K' |
str | FT_ADDR = '$' |
str | FT_UINT64 = 'L' |
str | FT_INT64 = 'l' |
str | FT_RAWHEX = 'M' |
str | FT_FILE = 'f' |
str | FT_DEC = 'D' |
str | FT_OCT = 'O' |
str | FT_BIN = 'Y' |
str | FT_CHAR = 'H' |
str | FT_IDENT = 'I' |
str | FT_BUTTON = 'B' |
str | FT_DIR = 'F' |
str | FT_TYPE = 'T' |
str | FT_FORMCHG = '%/' |
str | FT_ECHOOSER = 'E' |
str | FT_MULTI_LINE_TEXT = 't' |
str | FT_DROPDOWN_LIST = 'b' |
str | FT_HTML_LABEL = 'h' |
str | FT_CHKGRP = 'C' |
str | FT_CHKGRP2 = 'c' |
str | FT_RADGRP = 'R' |
str | FT_RADGRP2 = 'r' |
DefI64 | |
argtypes | |
Protected Member Functions | |
_reset (self) | |
_AddGroup (self, Group, mkattr=True) | |
_ChkCompiled (self) | |
Static Protected Member Functions | |
_ParseFormTitle (form) | |
Static Protected Attributes | |
str | _FT_USHORT = '_US' |
__init__ | ( | self, | |
form, | |||
controls ) |
This class wraps around ask_form() or open_form() and provides an easier / alternative syntax for describing forms. The form control names are wrapped inside the opening and closing curly braces and the control themselves are defined and instantiated via various form controls (subclasses of Form).
form | The form string |
controls | A dictionary containing the control name as a key and control object as value |
__getitem__ | ( | self, | |
name ) |
|
protected |
Internal function. This function expands the group item names and creates individual group item controls @param Group: The group class (checkbox or radio group class)
|
protected |
|
staticprotected |
Parses the form's title from the form text
|
protected |
Resets the Form class state variables
Add | ( | self, | |
name, | |||
ctrl, | |||
mkattr = True ) |
Prefer AddControls() to this function. This function adds one control to the form.
AddControls | ( | self, | |
controls, | |||
mkattr = True ) |
The dictionary key is the control name and the value is a Form.Control object
controls | The control dictionary |
Close | ( | self, | |
close_normally ) |
close_normally | 1: form is closed normally as if the user pressed Enter 0: form is closed abnormally as if the user pressed Esc |
Compile | ( | self | ) |
The form object will contain object names corresponding to the form elements
Compiled | ( | self | ) |
CompileEx | ( | self, | |
form ) |
Compiles (parses the form syntax and adds the control) the form string and returns the argument list to be passed the argument list to ask_form().
The form controls are wrapped inside curly braces: {ControlName}.
A special operator can be used to return the index of a given control by its name: {id:ControlName}. This is useful when you use the STARTITEM form keyword to set the initially focused control. (note that, technically, the index is not the same as the ID; that's because STARTITEM uses raw, 0-based indexes rather than control IDs to determine the focused widget.)
form | Compiles the form and returns the arguments needed to be passed to ask_form() |
|
static |
|
static |
EnableField | ( | self, | |
ctrl, | |||
enable ) |
Execute | ( | self | ) |
|
static |
FindControlById | ( | self, | |
id ) |
Free | ( | self | ) |
Make sure you call this function when you finish using the form.
GetControlValue | ( | self, | |
ctrl ) |
ctrl | Form control instance |
GetFocusedField | ( | self | ) |
MoveField | ( | self, | |
ctrl, | |||
x, | |||
y, | |||
w, | |||
h ) |
Open | ( | self | ) |
RefreshField | ( | self, | |
ctrl ) |
SetControlValue | ( | self, | |
ctrl, | |||
value ) |
ctrl | Form control instance |
value |
|
SetFocusedField | ( | self, | |
ctrl ) |
ShowField | ( | self, | |
ctrl, | |||
show ) |
|
staticprotected |
|
static |
controls = controls |
|
static |
form = form |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
int modal = True |
int modal = 1 |
int openform_flags = 0 |
p_fa |
title = None |