RigsofRods
Soft-body Physics Simulation
Public Member Functions | Data Fields | Private Attributes
RoR::GUI::RepositorySelector Class Reference

#include <GUI_RepositorySelector.h>

+ Inheritance diagram for RoR::GUI::RepositorySelector:
+ Collaboration diagram for RoR::GUI::RepositorySelector:

Public Member Functions

 RepositorySelector ()
 
 ~RepositorySelector ()
 
void SetVisible (bool visible)
 
bool IsVisible () const
 
void Draw ()
 
void OpenResource (int resource_id)
 
void Download (int resource_id, std::string filename, int id)
 
void DownloadFinished ()
 
void Refresh ()
 
void UpdateResources (ResourcesCollection *data)
 
void UpdateFiles (ResourcesCollection *data)
 
void ShowError (CurlFailInfo *failinfo)
 
void DrawThumbnail (int resource_item_idx)
 
virtual Ogre::WorkQueue::Response * handleRequest (const Ogre::WorkQueue::Request *req, const Ogre::WorkQueue *srcQ) override
 Ogre::WorkQueue API. More...
 
virtual void handleResponse (const Ogre::WorkQueue::Response *req, const Ogre::WorkQueue *srcQ) override
 Processes task results on main thread. More...
 

Data Fields

const Ogre::uint16 WORKQUEUE_ROR_REPO_THUMBNAIL = 1
 

Private Attributes

bool m_is_visible = false
 
bool m_draw = false
 
ResourcesCollection m_data
 
Str< 500 > m_search_input
 
std::string m_current_category
 
int m_current_category_id = 1
 
std::string m_all_category_label
 
std::string m_current_category_label
 
bool m_update_cache = false
 
bool m_show_spinner = false
 
std::string m_current_sort = "Last Update"
 
std::string m_view_mode = "List"
 
bool m_resource_view = false
 
ResourceItem m_selected_item
 
Ogre::uint16 m_ogre_workqueue_channel = 0
 
Ogre::TexturePtr m_fallback_thumbnail
 
CURL * curl_th = curl_easy_init()
 
std::string m_repofiles_msg
 
std::string m_repolist_msg
 
ImVec4 m_repolist_msg_color
 
std::string m_repolist_curlmsg
 Displayed as dimmed text. More...
 
std::string m_repolist_httpmsg
 Displayed as dimmed text. More...
 

Detailed Description

Definition at line 86 of file GUI_RepositorySelector.h.

Constructor & Destructor Documentation

◆ RepositorySelector()

RepositorySelector::RepositorySelector ( )

Definition at line 374 of file GUI_RepositorySelector.cpp.

+ Here is the call graph for this function:

◆ ~RepositorySelector()

RepositorySelector::~RepositorySelector ( )

Definition at line 384 of file GUI_RepositorySelector.cpp.

Member Function Documentation

◆ Download()

void RepositorySelector::Download ( int  resource_id,
std::string  filename,
int  id 
)

Definition at line 1211 of file GUI_RepositorySelector.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DownloadFinished()

void RepositorySelector::DownloadFinished ( )

Definition at line 1221 of file GUI_RepositorySelector.cpp.

+ Here is the caller graph for this function:

◆ Draw()

void RepositorySelector::Draw ( )

Definition at line 387 of file GUI_RepositorySelector.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DrawThumbnail()

void RepositorySelector::DrawThumbnail ( int  resource_item_idx)

Definition at line 1260 of file GUI_RepositorySelector.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleRequest()

Ogre::WorkQueue::Response * RepositorySelector::handleRequest ( const Ogre::WorkQueue::Request *  req,
const Ogre::WorkQueue *  srcQ 
)
overridevirtual

Ogre::WorkQueue API.

Processes tasks on background thread

Definition at line 1326 of file GUI_RepositorySelector.cpp.

+ Here is the call graph for this function:

◆ handleResponse()

void RepositorySelector::handleResponse ( const Ogre::WorkQueue::Response *  req,
const Ogre::WorkQueue *  srcQ 
)
overridevirtual

Processes task results on main thread.

Definition at line 1382 of file GUI_RepositorySelector.cpp.

+ Here is the call graph for this function:

◆ IsVisible()

bool RoR::GUI::RepositorySelector::IsVisible ( ) const
inline

Definition at line 97 of file GUI_RepositorySelector.h.

+ Here is the caller graph for this function:

◆ OpenResource()

void RepositorySelector::OpenResource ( int  resource_id)

Definition at line 1201 of file GUI_RepositorySelector.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Refresh()

void RepositorySelector::Refresh ( )

Definition at line 1154 of file GUI_RepositorySelector.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetVisible()

void RepositorySelector::SetVisible ( bool  visible)

Definition at line 1238 of file GUI_RepositorySelector.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ShowError()

void RepositorySelector::ShowError ( CurlFailInfo failinfo)

Definition at line 1226 of file GUI_RepositorySelector.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateFiles()

void RepositorySelector::UpdateFiles ( ResourcesCollection data)

Definition at line 1187 of file GUI_RepositorySelector.cpp.

+ Here is the caller graph for this function:

◆ UpdateResources()

void RepositorySelector::UpdateResources ( ResourcesCollection data)

Definition at line 1166 of file GUI_RepositorySelector.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ curl_th

CURL* RoR::GUI::RepositorySelector::curl_th = curl_easy_init()
private

Definition at line 130 of file GUI_RepositorySelector.h.

◆ m_all_category_label

std::string RoR::GUI::RepositorySelector::m_all_category_label
private

Definition at line 119 of file GUI_RepositorySelector.h.

◆ m_current_category

std::string RoR::GUI::RepositorySelector::m_current_category
private

Definition at line 117 of file GUI_RepositorySelector.h.

◆ m_current_category_id

int RoR::GUI::RepositorySelector::m_current_category_id = 1
private

Definition at line 118 of file GUI_RepositorySelector.h.

◆ m_current_category_label

std::string RoR::GUI::RepositorySelector::m_current_category_label
private

Definition at line 120 of file GUI_RepositorySelector.h.

◆ m_current_sort

std::string RoR::GUI::RepositorySelector::m_current_sort = "Last Update"
private

Definition at line 123 of file GUI_RepositorySelector.h.

◆ m_data

ResourcesCollection RoR::GUI::RepositorySelector::m_data
private

Definition at line 115 of file GUI_RepositorySelector.h.

◆ m_draw

bool RoR::GUI::RepositorySelector::m_draw = false
private

Definition at line 114 of file GUI_RepositorySelector.h.

◆ m_fallback_thumbnail

Ogre::TexturePtr RoR::GUI::RepositorySelector::m_fallback_thumbnail
private

Definition at line 128 of file GUI_RepositorySelector.h.

◆ m_is_visible

bool RoR::GUI::RepositorySelector::m_is_visible = false
private

Definition at line 113 of file GUI_RepositorySelector.h.

◆ m_ogre_workqueue_channel

Ogre::uint16 RoR::GUI::RepositorySelector::m_ogre_workqueue_channel = 0
private

Definition at line 127 of file GUI_RepositorySelector.h.

◆ m_repofiles_msg

std::string RoR::GUI::RepositorySelector::m_repofiles_msg
private

Definition at line 134 of file GUI_RepositorySelector.h.

◆ m_repolist_curlmsg

std::string RoR::GUI::RepositorySelector::m_repolist_curlmsg
private

Displayed as dimmed text.

Definition at line 137 of file GUI_RepositorySelector.h.

◆ m_repolist_httpmsg

std::string RoR::GUI::RepositorySelector::m_repolist_httpmsg
private

Displayed as dimmed text.

Definition at line 138 of file GUI_RepositorySelector.h.

◆ m_repolist_msg

std::string RoR::GUI::RepositorySelector::m_repolist_msg
private

Definition at line 135 of file GUI_RepositorySelector.h.

◆ m_repolist_msg_color

ImVec4 RoR::GUI::RepositorySelector::m_repolist_msg_color
private

Definition at line 136 of file GUI_RepositorySelector.h.

◆ m_resource_view

bool RoR::GUI::RepositorySelector::m_resource_view = false
private

Definition at line 125 of file GUI_RepositorySelector.h.

◆ m_search_input

Str<500> RoR::GUI::RepositorySelector::m_search_input
private

Definition at line 116 of file GUI_RepositorySelector.h.

◆ m_selected_item

ResourceItem RoR::GUI::RepositorySelector::m_selected_item
private

Definition at line 126 of file GUI_RepositorySelector.h.

◆ m_show_spinner

bool RoR::GUI::RepositorySelector::m_show_spinner = false
private

Definition at line 122 of file GUI_RepositorySelector.h.

◆ m_update_cache

bool RoR::GUI::RepositorySelector::m_update_cache = false
private

Definition at line 121 of file GUI_RepositorySelector.h.

◆ m_view_mode

std::string RoR::GUI::RepositorySelector::m_view_mode = "List"
private

Definition at line 124 of file GUI_RepositorySelector.h.

◆ WORKQUEUE_ROR_REPO_THUMBNAIL

const Ogre::uint16 RoR::GUI::RepositorySelector::WORKQUEUE_ROR_REPO_THUMBNAIL = 1

Definition at line 91 of file GUI_RepositorySelector.h.


The documentation for this class was generated from the following files: