12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- #ifndef SNAPFILE_H
- #define SNAPFILE_H
- #include <iostream>
- #include <vector>
- #include <fstream>
- #include <SDL/SDL.h>
- #include <SDL/SDL_gfxPrimitives.h>
- struct SF_Graphic
- {
- unsigned int h;
- unsigned int w;
- Uint32 color_line;
- Uint32 color_back;
- Uint32 color_select;
- std::string name;
- };
- #define SF_STDGRPH {300, 400, 0xffff00ff, 0xff000000, 0xffffffff, "SnapFile"}
- void SF_makeList( const std::string & indexName, std::vector<std::string> & dirList );
- void SF_filter( std::vector<std::string> & dirList, std::string ext, bool autoRemove = false );
- void SF_choose( const std::string & indexName, std::string & fileChosen, SDL_Surface* tgt = nullptr, const SF_Graphic cfg = SF_STDGRPH );
- void SF_keyName( std::string & fileName, SDL_Surface* tgt = nullptr, const SF_Graphic cfg = SF_STDGRPH );
- void SF_addAskedFile( const std::string & indexName, std::string & fileName, SDL_Surface* tgt = nullptr, const SF_Graphic cfg = SF_STDGRPH );
- void SF_addFile( const std::string & indexName, const std::string & fileName );
- bool SF_fixWindow( SDL_Surface* & tgt, const SF_Graphic cfg = SF_STDGRPH );
- void SF_enhanceWindow( SDL_Surface* screen, const SF_Graphic & cfg );
- #endif
|