SatDump 2.0.0-alpha-76a915210
Loading...
Searching...
No Matches
satdump::handlers::TrashHandler Class Reference

A trash handler. More...

#include <trash_handler.h>

Inheritance diagram for satdump::handlers::TrashHandler:
satdump::handlers::Handler

Public Member Functions

void drawMenu ()
 Render explorer menu left sidebar.
void drawContents (ImVec2 win_size)
 Render explorer contents (center/left)
void drawMenuBar ()
 Render explorer menu bar (in the left sidebar)
void setConfig (nlohmann::json p)
 Optional, allows setting a configuration/state from JSON.
nlohmann::json getConfig ()
 Optional, allows getting a configuration/state as JSON.
void addSubHandler (std::shared_ptr< Handler > handler, bool ontop=false)
 Add a new subhandler.
std::string getName ()
 Get this handler's readable name.
std::string getID ()
Public Member Functions inherited from satdump::handlers::Handler
virtual bool drawTreeMenu (std::shared_ptr< Handler > &h)
 Render explorer menu bar (in the left sidebar)
std::string getTreeID ()
 Get this handler's ImGui ID for rendering in the tree.
bool hasSubhandlers ()
 Check if this handler contains any sub-handlers.
virtual void delSubHandler (std::shared_ptr< Handler > handler, bool now=false)
 Delete a subhandler.
virtual std::vector< std::shared_ptr< Handler > > getAllSubHandlers ()
 Get all current subhandlers.
void setCanBeSelected (bool v)
 Set if a handler can be select in the tree.
void setCanBeDragged (bool v)
 Set if a handler can be dragged around in the tree.
void setCanBeDraggedTo (bool v)
 Set if a handler can be dragged to in the tree.
void setSubHandlersCanBeDragged (bool v)
 Set if a handler's subhandlers can be dragged to in the tree.
void setCanSubBeReorgTo (bool v)
 Set if a handler's subhandlers can be reordered.
virtual void resetConfig ()
 Optional, allows resetting the handler's configuration.

Additional Inherited Members

Public Attributes inherited from satdump::handlers::Handler
std::string handler_tree_icon = "N"
Protected Attributes inherited from satdump::handlers::Handler
std::vector< std::shared_ptr< Handler > > subhandlers
std::mutex subhandlers_mtx

Detailed Description

A trash handler.

Does what it says. Dragging anything on here will simply discard it!

Member Function Documentation

◆ addSubHandler()

void satdump::handlers::TrashHandler::addSubHandler ( std::shared_ptr< Handler > handler,
bool ontop = false )
inlinevirtual

Add a new subhandler.

Parameters
handlerthe handler to add
ontopif true, adds the handler at the start of the list

Reimplemented from satdump::handlers::Handler.

◆ drawContents()

void satdump::handlers::TrashHandler::drawContents ( ImVec2 win_size)
virtual

Render explorer contents (center/left)

Implements satdump::handlers::Handler.

◆ drawMenu()

void satdump::handlers::TrashHandler::drawMenu ( )
virtual

Render explorer menu left sidebar.

Implements satdump::handlers::Handler.

◆ drawMenuBar()

void satdump::handlers::TrashHandler::drawMenuBar ( )
virtual

Render explorer menu bar (in the left sidebar)

Reimplemented from satdump::handlers::Handler.

◆ getConfig()

nlohmann::json satdump::handlers::TrashHandler::getConfig ( )
virtual

Optional, allows getting a configuration/state as JSON.

Returns
JSON object

Reimplemented from satdump::handlers::Handler.

◆ getID()

std::string satdump::handlers::TrashHandler::getID ( )
inlinevirtual

◆ getName()

std::string satdump::handlers::TrashHandler::getName ( )
inlinevirtual

Get this handler's readable name.

Returns
name as a string

Reimplemented from satdump::handlers::Handler.

◆ setConfig()

void satdump::handlers::TrashHandler::setConfig ( nlohmann::json p)
virtual

Optional, allows setting a configuration/state from JSON.

Parameters
pJSON object

Reimplemented from satdump::handlers::Handler.


The documentation for this class was generated from the following files:
  • src-core/handlers/trash/trash_handler.h
  • src-core/handlers/trash/trash_handler.cpp