kick
/Users/morten/Programmering/cpp/kick/src/kick/context/nativedialog.h
00001 //
00002 // Created by Morten Nobel-Jørgensen on 18/04/15.
00003 //
00004 
00005 
00006 #pragma once
00007 
00008 #include <string>
00009 #include <vector>
00010 #include <cassert>
00011 #include "glm/glm.hpp"
00012 
00013 namespace kick {
00014     // Cpp interface to tinyfiledialogs
00015     class NativeDialog {
00016     public:
00017         enum class DialogType {
00018             ok, okcancel, yesno
00019         };
00020         enum class IconType {
00021             info, warning, error, question
00022         };
00023 
00024         static bool message(std::string aTitle , /* "" */
00025                         std::string aMessage , /* "" may contain \n and \t */
00026                         DialogType dialogType = DialogType::ok ,
00027                         IconType infoIcon = IconType::info,
00028                         int const aDefaultButton = 0);
00029 
00030         static std::unique_ptr<std::string> input(std::string title, std::string message, std::string defaultInput = "");
00031 
00032         static std::unique_ptr<std::string> inputPassword(std::string title, std::string message);
00033 
00034         static std::unique_ptr<std::string> saveFile(std::string title, std::string aDefaultPathAndFile, std::vector<std::string> filters);
00035 
00036         static std::vector<std::string> openFile(std::string title, std::string aDefaultPathAndFile, std::vector<std::string> filters, bool allowMultipleSelects = false);
00037 
00038         static std::unique_ptr<std::string> selectFolder(std::string title, std::string aDefaultPathAndFile);
00039 
00040         // static std::unique_ptr<glm::vec3> colorChooser(std::string title, glm::vec3 defaultRGB);
00041     };
00042 }
00043 
00044 
 All Classes Functions Variables