# PanelInfo

The PanelInfo structure contains information about a FAR panel. Use the Control function to populate this structure.

    struct PanelInfo
    {
      int PanelType;
      int Plugin;
      RECT PanelRect;
      struct PluginPanelItem *PanelItems;
      int ItemsNumber;
      struct PluginPanelItem *SelectedItems;
      int SelectedItemsNumber;
      int CurrentItem;
      int TopPanelItem;
      int Visible;
      int Focus;
      int ViewMode;
      char ColumnTypes[80];
      char ColumnWidths[80];
      char CurDir[NM];
      int ShortNames;
      int SortMode;
      DWORD Flags;
      DWORD Reserved;
    };

### Elements

PanelType
May be (the PANELINFOTYPE enumeration):

Type | Description
--- | ---
PTYPE_FILEPANEL | Regular file panel
PTYPE_TREEPANEL | Tree panel
PTYPE_QVIEWPANEL | Quick view panel
PTYPE_INFOPANEL | Information panel

Plugin
TRUE if panel is supported by a plugin.
PanelRect
Panel geometry, the RECT structure.
PanelItems
Pointer to an array of all panel items (see PluginPanelItem). Plugins shouldn't change items (except those marked with PPIF_SELECTED) or free memory allocated for this array. Data is valid until return from the plugin's exported function, which retrieved it via a call to the Control(FCTL_GET[ANOTHER]PANELINFO, ...) function, or until the next call to the Control function.
ItemsNumber
Number of items in the PanelItems array.
SelectedItems
Pointer to the array of selected panel items. (see PluginPanelItem). Plugin shouldn't change elements (except those marked with PPIF_SELECTED) or free memory allocated for this array. Data is valid until return from the plugin's exported function, which retrieved it via a call to the Control(FCTL_GET[ANOTHER]PANELINFO, ...) function, or until the next call to the Control function.
SelectedItemsNumber
Number of items in the SelectedItems array. When there is no selection, SelectedItemsNumber is equal to 1. When there is no selection and current element is ".." then SelectedItemsNumber is equal to 0.
CurrentItem
Index of the current item in the PanelItems array. Ensure that ItemsNumber > 0 before using CurrentItem.
TopPanelItem
Panel item which is at the first visible position in the panel.
Visible
If non-zero, panel is visible.
Focus
If non-zero, panel is active.
ViewMode
Number of panel view mode.
ColumnTypes
Null-terminated string, which describes column types. Column types are encoded with one or several letters, separated by commas, for example: `"N,SC,D,T"`.
ColumnWidths

Null-terminated string, which describes columns width.

CurDir
Current directory for panel. If Type = PTYPE_TREEPANEL, CurDir contains currently selected directory in panel.
ShortNames
Non-zero, if short file names mode is on.
SortMode
Panel sort mode. Can be SM_DEFAULT, SM_UNSORTED, SM_NAME, SM_EXT, SM_MTIME, SM_CTIME, SM_ATIME, SM_SIZE, SM_DESCR, SM_OWNER, SM_COMPRESSEDSIZE, SM_NUMLINKS.
Flags
Additional flags. Can be a combination of the following values (the PANELINFOFLAGS enumeration):

Flag | Description
--- | ---
PFLAGS_SHOWHIDDEN | Hidden and system files are displayed.
PFLAGS_HIGHLIGHT | File highlighting is used.
PFLAGS_REVERSESORTORDER | Descending sort is used.
PFLAGS_USESORTGROUPS | Sort groups are used.
PFLAGS_SELECTEDFIRST | Show selected files first.
PFLAGS_REALNAMES | Plugin panel items are shown with real file names (see also OPIF_REALNAMES).
PFLAGS_NUMERICSORT | Numeric sort is used.
PFLAGS_PANELLEFT | Left panel.

Reserved
Reserved for future use.

### Remarks

Additional information about panel can be retrieved using the AdvControl function (the ACTL_GETPANELSETTINGS command)
See also:
structures | TPanelInfo