MCPcopy Create free account
hub / github.com/davisking/dlib / on_path_button_click

Method on_path_button_click

dlib/gui_widgets/widgets.cpp:3114–3140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3112 // ------------------------------------------------------------------------------------
3113
3114 void box_win::
3115 on_path_button_click (
3116 toggle_button& btn
3117 )
3118 {
3119 if (btn_root.is_checked())
3120 btn_root.set_unchecked();
3121 if (cur_dir != -1)
3122 sob[cur_dir]->set_unchecked();
3123 std::string new_path;
3124
3125 for (unsigned long i = 0; i < sob.size(); ++i)
3126 {
3127 new_path += sob[i]->name() + directory::get_separator();
3128 if (sob[i].get() == &btn)
3129 {
3130 cur_dir = i;
3131 sob[i]->set_checked();
3132 break;
3133 }
3134 }
3135 if (path != new_path)
3136 {
3137 path = new_path;
3138 set_dir(prefix+path);
3139 }
3140 }
3141
3142 // ------------------------------------------------------------------------------------
3143

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
nameMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected