MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / GetValue

Method GetValue

src/gui/filesystemmodel.cc:73–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71 }
72
73 void GetValue(wxVariant& value,
74 const wxDataViewItem& item,
75 unsigned column) const override
76 {
77 auto node = Find(item);
78 if (!node)
79 return;
80
81 if (node->stub)
82 {
83 switch (column)
84 {
85 case 0:
86 value << wxDataViewIconText("...loading...");
87 break;
88
89 case 1:
90 value = "";
91 break;
92
93 case 2:
94 value = "";
95 break;
96
97 default:
98 wxFAIL;
99 }
100 }
101 else
102 {
103
104 switch (column)
105 {
106 case 0:
107 value << wxDataViewIconText(node->dirent->filename,
108 (node->dirent->file_type == TYPE_DIRECTORY)
109 ? _folderClosedIcon
110 : _fileIcon);
111 break;
112
113 case 1:
114 value = std::to_string(node->dirent->length);
115 break;
116
117 case 2:
118 value = node->dirent->mode;
119 break;
120
121 default:
122 wxFAIL;
123 }
124 }
125 }
126
127 bool SetValue(const wxVariant& value,
128 const wxDataViewItem& item,

Callers 8

UpdateExplorerDataMethod · 0.80
OnSaveMethod · 0.80
UpdateSourcesMethod · 0.80
UpdateFormatOptionsMethod · 0.80
OnBrowserFormatButtonMethod · 0.80

Calls 1

to_stringFunction · 0.85

Tested by

no test coverage detected