BVB Source Codes

Gource Show file.h Source code

Return Download Gource: download file.h Source code - Download Gource Source code - Type:.h
  1. /*
  2.     Copyright (C) 2009 Andrew Caudwell (acaudwell@gmail.com)
  3.  
  4.     This program is free software; you can redistribute it and/or
  5.     modify it under the terms of the GNU General Public License
  6.     as published by the Free Software Foundation; either version
  7.     3 of the License, or (at your option) any later version.
  8.  
  9.     This program is distributed in the hope that it will be useful,
  10.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.     GNU General Public License for more details.
  13.  
  14.     You should have received a copy of the GNU General Public License
  15.     along with this program.  If not, see <http://www.gnu.org/licenses/>.
  16. */
  17.  
  18. #ifndef RFILE_H
  19. #define RFILE_H
  20.  
  21. #include "pawn.h"
  22. #include "dirnode.h"
  23. #include "core/stringhash.h"
  24.  
  25. class RDirNode;
  26.  
  27. class RFile : public Pawn {
  28.     vec3 file_colour;
  29.     vec3 touch_colour;
  30.  
  31.     RDirNode* dir;
  32.  
  33.     bool forced_removal;
  34.     bool expired;
  35.  
  36.     float fade_start;
  37.    
  38.     float last_action;
  39.  
  40.     float radius;
  41.  
  42.     vec2 dest;
  43.     float distance;
  44.  
  45.    // FXLabel* label;
  46.  
  47.     //GLuint namelist;
  48.  
  49.     void setFilename(const std::string& abs_file_path);
  50.  
  51.     const vec3& getNameColour() const;
  52.     void drawNameText(float alpha);
  53. public:
  54.     std::string path;
  55.     std::string fullpath;
  56.     std::string ext;
  57.  
  58.     RFile(const std::string & name, const vec3 & colour, const vec2 & pos, int tagid);
  59.     ~RFile();
  60.  
  61.     bool overlaps(const vec2& pos) const;
  62.  
  63.     void setFileColour(const vec3 & colour);
  64.     const vec3 & getFileColour() const;
  65.     vec3 getColour() const;
  66.     void colourize();
  67.  
  68.     float getAlpha() const;
  69.  
  70.     void touch(const vec3 & colour);
  71.  
  72.     void setSelected(bool selected);
  73.  
  74.     void updateLabel();
  75.  
  76.     void setHidden(bool hidden);
  77.  
  78.     void setDest(const vec2 & dest){ this->dest = dest; }
  79.     void setDistance(float distance){ this->distance = distance; }
  80.  
  81.     void calcScreenPos(GLint* viewport, GLdouble* modelview, GLdouble* projection);
  82.  
  83.     void logic(float dt);
  84.     void draw(float dt);
  85.  
  86.     void remove(bool force=false);
  87.  
  88.     vec2 getAbsolutePos() const;
  89.  
  90.     RDirNode* getDir() const;
  91.     void setDir(RDirNode* dir);
  92. };
  93.  
  94. extern float gGourceFileDiameter;
  95.  
  96. extern std::vector<RFile*> gGourceRemovedFiles;
  97.  
  98. #endif
  99.  
downloadfile.h Source code - Download Gource Source code
Related Source Codes/Software:
FDFullscreenPopGesture - A UINavigationController's category to enable full... 2017-01-10
node-style-guide - A guide for styling your node.js / JavaScript code... 2017-01-09
ImageOptim - GUI image optimizer for Mac htt... 2017-01-09
falcon - Falcon is a low-level, high-performance Python fra... 2017-01-09
prerender - Node server that uses phantomjs to render a javasc... 2017-01-09
che - Eclipse Che: Next-generation Eclipse IDE. Open sou... 2017-01-10
notepad-plus-plus - Notepad++ official repository h... 2017-01-10
waterline - An adapter-based ORM for Node.js with support for ... 2017-01-10
Workerman - An asynchronous event driven PHP framework for eas... 2017-01-10
structor - An advanced visual editor for React components ... 2017-01-10
discover-flask - Full Stack Web Development with Flask. ... 2017-01-12
spring-mvc-showcase - Demonstrates the features of the Spring MVC web fr... 2017-01-12
tushare - TuShare is a utility for crawling historical data ... 2017-01-12
raml-spec - RAML Specification http://raml.... 2017-01-12
android-stackblur - Android StackBlur is a library that can perform a ... 2017-01-12
sound-redux - A Soundcloud client built with React / Redux ... 2017-01-12
httpstat - curl statistics made simple 2017-01-12
vim - Vim configuration file and plug-ins 2017-01-12
appframework - The definitive HTML5 mobile javascript framework ... 2017-01-12
BaiduExporter - Assistant for Baidu to export download links to ar... 2017-01-11

 Back to top