Lines Matching defs:doc

4075     static void DisplayContents(MyDocument* doc)
4077 ImGui::PushID(doc);
4078 ImGui::Text("Document \"%s\"", doc->Name);
4079 ImGui::PushStyleColor(ImGuiCol_Text, doc->Color);
4083 doc->Dirty = true;
4086 doc->DoSave();
4087 ImGui::ColorEdit3("color", &doc->Color.x); // Useful to test drag and drop and hold-dragged-to-open-tab behavior.
4092 static void DisplayContextMenu(MyDocument* doc)
4098 sprintf(buf, "Save %s", doc->Name);
4099 if (ImGui::MenuItem(buf, "CTRL+S", false, doc->Open))
4100 doc->DoSave();
4101 if (ImGui::MenuItem("Close", "CTRL+W", false, doc->Open))
4102 doc->DoQueueClose();
4133 MyDocument* doc = &app.Documents[doc_n];
4134 if (!doc->Open && doc->OpenPrev)
4135 ImGui::SetTabItemClosed(doc->Name);
4136 doc->OpenPrev = doc->Open;
4167 MyDocument* doc = &app.Documents[doc_n];
4168 if (!doc->Open)
4169 if (ImGui::MenuItem(doc->Name))
4170 doc->DoOpen();
4186 MyDocument* doc = &app.Documents[doc_n];
4189 ImGui::PushID(doc);
4190 if (ImGui::Checkbox(doc->Name, &doc->Open))
4191 if (!doc->Open)
4192 doc->DoForceClose();
4213 MyDocument* doc = &app.Documents[doc_n];
4214 if (!doc->Open)
4217 ImGuiTabItemFlags tab_flags = (doc->Dirty ? ImGuiTabItemFlags_UnsavedDocument : 0);
4218 bool visible = ImGui::BeginTabItem(doc->Name, &doc->Open, tab_flags);
4221 if (!doc->Open && doc->Dirty)
4223 doc->Open = true;
4224 doc->DoQueueClose();
4227 MyDocument::DisplayContextMenu(doc);
4230 MyDocument::DisplayContents(doc);
4246 MyDocument* doc = &app.Documents[doc_n];
4247 if (doc->WantClose)
4249 doc->WantClose = false;
4250 close_queue.push_back(doc);