Blender V5.0
interface_region_hud.cc File Reference
#include <cstring>
#include "MEM_guardedalloc.h"
#include "DNA_screen_types.h"
#include "DNA_userdef_types.h"
#include "BLI_listbase.h"
#include "BLI_rect.h"
#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"
#include "BKE_context.hh"
#include "BKE_screen.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "UI_interface_layout.hh"
#include "UI_view2d.hh"
#include "BLT_translation.hh"
#include "ED_screen.hh"
#include "GPU_framebuffer.hh"
#include "interface_intern.hh"

Go to the source code of this file.

Classes

struct  HudRegionData

Functions

Utilities
static int area_calc_region_type_index (const ScrArea *area, const ARegion *region)
static ARegionarea_find_region_by_type_and_index_hint (const ScrArea *area, const short region_type, int index_hint)
static bool last_redo_poll (const bContext *C, short region_type, int region_index_hint)
static void hud_region_hide (ARegion *region)
Redo Panel
static bool hud_panel_operator_redo_poll (const bContext *C, PanelType *)
static void hud_panel_operator_redo_draw_header (const bContext *C, Panel *panel)
static void hud_panel_operator_redo_draw (const bContext *C, Panel *panel)
static void hud_panels_register (ARegionType *art, int space_type, int region_type)
Callbacks for Floating Region
static void hud_region_init (wmWindowManager *wm, ARegion *region)
static void hud_region_free (ARegion *region)
static void hud_region_layout (const bContext *C, ARegion *region)
static void hud_region_draw (const bContext *C, ARegion *region)
static void hud_region_listener (const wmRegionListenerParams *params)
ARegionTypeED_area_type_hud (int space_type)
static ARegionhud_region_add (ScrArea *area)
void ED_area_type_hud_clear (wmWindowManager *wm, ScrArea *area_keep)
void ED_area_type_hud_ensure (bContext *C, ScrArea *area)
ARegionED_area_type_hud_redo_region_find (const ScrArea *area, const ARegion *hud_region)

Detailed Description

Floating Persistent Region

Definition in file interface_region_hud.cc.

Function Documentation

◆ area_calc_region_type_index()

int area_calc_region_type_index ( const ScrArea * area,
const ARegion * region )
static

Return the index of region of other regions in the area (of the same type).

Definition at line 46 of file interface_region_hud.cc.

References BLI_assert_unreachable, LISTBASE_FOREACH, ScrArea::regionbase, and ARegion::regiontype.

Referenced by ED_area_type_hud_ensure().

◆ area_find_region_by_type_and_index_hint()

ARegion * area_find_region_by_type_and_index_hint ( const ScrArea * area,
const short region_type,
int index_hint )
static

Find the areas region by type and index, or just by type (if the index isn't found).

Definition at line 69 of file interface_region_hud.cc.

References LISTBASE_FOREACH, and ScrArea::regionbase.

Referenced by ED_area_type_hud_redo_region_find(), and last_redo_poll().

◆ ED_area_type_hud()

◆ ED_area_type_hud_clear()

◆ ED_area_type_hud_ensure()

◆ ED_area_type_hud_redo_region_find()

ARegion * ED_area_type_hud_redo_region_find ( const ScrArea * area,
const ARegion * hud_region )

Lookup the region the operation was executed in, and which should be used to redo the operation. The lookup is based on the region type, so it can return a different region when the same region type is present multiple times.

Definition at line 467 of file interface_region_hud.cc.

References area_find_region_by_type_and_index_hint(), BLI_assert, HudRegionData::region_index_hint, ARegion::regiondata, HudRegionData::regionid, ARegion::regiontype, and RGN_TYPE_HUD.

Referenced by ED_undo_operator_repeat().

◆ hud_panel_operator_redo_draw()

◆ hud_panel_operator_redo_draw_header()

void hud_panel_operator_redo_draw_header ( const bContext * C,
Panel * panel )
static

◆ hud_panel_operator_redo_poll()

bool hud_panel_operator_redo_poll ( const bContext * C,
PanelType *  )
static

◆ hud_panels_register()

◆ hud_region_add()

◆ hud_region_draw()

◆ hud_region_free()

void hud_region_free ( ARegion * region)
static

Definition at line 214 of file interface_region_hud.cc.

References MEM_SAFE_FREE, and ARegion::regiondata.

Referenced by ED_area_type_hud().

◆ hud_region_hide()

void hud_region_hide ( ARegion * region)
static

◆ hud_region_init()

◆ hud_region_layout()

◆ hud_region_listener()

void hud_region_listener ( const wmRegionListenerParams * params)
static

◆ last_redo_poll()