Tulip  4.7.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
TulipFontAwesome.h
1 /*
2  *
3  * This file is part of Tulip (www.tulip-software.org)
4  *
5  * Authors: David Auber and the Tulip development Team
6  * from LaBRI, University of Bordeaux
7  *
8  * Tulip is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation, either version 3
11  * of the License, or (at your option) any later version.
12  *
13  * Tulip is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU General Public License for more details.
17  *
18  */
19 
20 #ifndef TULIPFONTAWESOME_H
21 #define TULIPFONTAWESOME_H
22 
23 #include <tulip/tulipconf.h>
24 
25 #include <vector>
26 
27 namespace tlp {
28 
29 /**
30  * @brief Helper class for the configuration of a Font Awesome glyph.
31  *
32  * Font Awesome is a free iconic font by Dave Gandy (see http://fontawesome.io)
33  * offering more than 500 customizable scalable vector icons.
34  *
35  * A glyph has been added to Tulip enabling to use these great icons
36  * as nodes and edges extremities shapes.
37  *
38  * That class offers utility functions and supported icons names constants.
39  *
40  * To set a node glyph as a Font Awesome icon, the Font Awesome glyph must be associated
41  * to the node through the modification of the "viewShape" integer property attached to the graph.
42  * The name of the icon to use must then be set in the "viewFontAwesomeIcon" string property.
43  * As an example, the following code snippet activates the Font Awesome glyph for all nodes
44  * and sets the "user" icon.
45  *
46  * @code
47  * // graph is a pointer to a tlp::Graph object
48  * tlp::IntegerProperty *viewShape = graph->getProperty<tlp::IntegerProperty>("viewShape");
49  * tlp::StringProperty *viewFontAwesomeIcon = graph->getProperty<tlp::StringProperty>("viewFontAwesomeIcon");
50  *
51  * // sets the Font Awesome glyph on all nodes
52  * viewShape->setAllNodeValue(tlp::NodeShape::FontAwesomeIcon);
53  * // sets the "user" glyph for all nodes
54  * viewFontAwesomeIcon->setAllNodeValue(tlp::TulipFontAwesome::User);
55  * @endcode
56  **/
57 
58 class TLP_SCOPE TulipFontAwesome {
59 
60 public:
61 
62  /**
63  * Returns the location of the Font Awesome ttf file bundled with Tulip
64  */
65  static std::string getFontAwesomeTrueTypeFileLocation();
66 
67  /**
68  * Returns the list of supported Font Awesome icons names
69  */
70  static const std::vector<std::string> &getSupportedFontAwesomeIcons();
71 
72  /**
73  * Checks if the provided Font Awesome icon name is supported
74  * @param iconName the name of the icon to check support
75  */
76  static bool isFontAwesomeIconSupported(const std::string& iconName);
77 
78  /**
79  * Returns the Unicode code point associated to an icon name
80  * @param iconName the name of the icon to get the codepoint
81  */
82  static unsigned int getFontAwesomeIconCodePoint(const std::string& iconName);
83 
84  /**
85  * Returns an UTF-8 encoded string of a Font Awesome icon
86  * @param iconName a Font Awesome icon name
87  * @return
88  */
89  static std::string getFontAwesomeIconUtf8String(const std::string& iconName);
90 
91  // static constants for the Font Awesome icons names
92  static const char* Adjust;
93  static const char* Adn;
94  static const char* AlignCenter;
95  static const char* AlignJustify;
96  static const char* AlignLeft;
97  static const char* AlignRight;
98  static const char* Ambulance;
99  static const char* Anchor;
100  static const char* Android;
101  static const char* Angellist;
102  static const char* AngleDoubleDown;
103  static const char* AngleDoubleLeft;
104  static const char* AngleDoubleRight;
105  static const char* AngleDoubleUp;
106  static const char* AngleDown;
107  static const char* AngleLeft;
108  static const char* AngleRight;
109  static const char* AngleUp;
110  static const char* Apple;
111  static const char* Archive;
112  static const char* AreaChart;
113  static const char* ArrowCircleDown;
114  static const char* ArrowCircleLeft;
115  static const char* ArrowCircleODown;
116  static const char* ArrowCircleOLeft;
117  static const char* ArrowCircleORight;
118  static const char* ArrowCircleOUp;
119  static const char* ArrowCircleRight;
120  static const char* ArrowCircleUp;
121  static const char* ArrowDown;
122  static const char* ArrowLeft;
123  static const char* ArrowRight;
124  static const char* ArrowUp;
125  static const char* Arrows;
126  static const char* ArrowsAlt;
127  static const char* ArrowsH;
128  static const char* ArrowsV;
129  static const char* Asterisk;
130  static const char* At;
131  static const char* Automobile;
132  static const char* Backward;
133  static const char* Ban;
134  static const char* Bank;
135  static const char* BarChart;
136  static const char* BarChartO;
137  static const char* Barcode;
138  static const char* Bars;
139  static const char* Bed;
140  static const char* Beer;
141  static const char* Behance;
142  static const char* BehanceSquare;
143  static const char* Bell;
144  static const char* BellO;
145  static const char* BellSlash;
146  static const char* BellSlashO;
147  static const char* Bicycle;
148  static const char* Binoculars;
149  static const char* BirthdayCake;
150  static const char* Bitbucket;
151  static const char* BitbucketSquare;
152  static const char* Bitcoin;
153  static const char* Bold;
154  static const char* Bolt;
155  static const char* Bomb;
156  static const char* Book;
157  static const char* Bookmark;
158  static const char* BookmarkO;
159  static const char* Briefcase;
160  static const char* Btc;
161  static const char* Bug;
162  static const char* Building;
163  static const char* BuildingO;
164  static const char* Bullhorn;
165  static const char* Bullseye;
166  static const char* Bus;
167  static const char* Buysellads;
168  static const char* Cab;
169  static const char* Calculator;
170  static const char* Calendar;
171  static const char* CalendarO;
172  static const char* Camera;
173  static const char* CameraRetro;
174  static const char* Car;
175  static const char* CaretDown;
176  static const char* CaretLeft;
177  static const char* CaretRight;
178  static const char* CaretSquareODown;
179  static const char* CaretSquareOLeft;
180  static const char* CaretSquareORight;
181  static const char* CaretSquareOUp;
182  static const char* CaretUp;
183  static const char* CartArrowDown;
184  static const char* CartPlus;
185  static const char* Cc;
186  static const char* CcAmex;
187  static const char* CcDiscover;
188  static const char* CcMastercard;
189  static const char* CcPaypal;
190  static const char* CcStripe;
191  static const char* CcVisa;
192  static const char* Certificate;
193  static const char* Chain;
194  static const char* ChainBroken;
195  static const char* Check;
196  static const char* CheckCircle;
197  static const char* CheckCircleO;
198  static const char* CheckSquare;
199  static const char* CheckSquareO;
200  static const char* ChevronCircleDown;
201  static const char* ChevronCircleLeft;
202  static const char* ChevronCircleRight;
203  static const char* ChevronCircleUp;
204  static const char* ChevronDown;
205  static const char* ChevronLeft;
206  static const char* ChevronRight;
207  static const char* ChevronUp;
208  static const char* Child;
209  static const char* Circle;
210  static const char* CircleO;
211  static const char* CircleONotch;
212  static const char* CircleThin;
213  static const char* Clipboard;
214  static const char* ClockO;
215  static const char* Close;
216  static const char* Cloud;
217  static const char* CloudDownload;
218  static const char* CloudUpload;
219  static const char* Cny;
220  static const char* Code;
221  static const char* CodeFork;
222  static const char* Codepen;
223  static const char* Coffee;
224  static const char* Cog;
225  static const char* Cogs;
226  static const char* Columns;
227  static const char* Comment;
228  static const char* CommentO;
229  static const char* Comments;
230  static const char* CommentsO;
231  static const char* Compass;
232  static const char* Compress;
233  static const char* Connectdevelop;
234  static const char* Copy;
235  static const char* Copyright;
236  static const char* CreditCard;
237  static const char* Crop;
238  static const char* Crosshairs;
239  static const char* Css3;
240  static const char* Cube;
241  static const char* Cubes;
242  static const char* Cut;
243  static const char* Cutlery;
244  static const char* Dashboard;
245  static const char* Dashcube;
246  static const char* Database;
247  static const char* Dedent;
248  static const char* Delicious;
249  static const char* Desktop;
250  static const char* Deviantart;
251  static const char* Diamond;
252  static const char* Digg;
253  static const char* Dollar;
254  static const char* DotCircleO;
255  static const char* Download;
256  static const char* Dribbble;
257  static const char* Dropbox;
258  static const char* Drupal;
259  static const char* Edit;
260  static const char* Eject;
261  static const char* EllipsisH;
262  static const char* EllipsisV;
263  static const char* Empire;
264  static const char* Envelope;
265  static const char* EnvelopeO;
266  static const char* EnvelopeSquare;
267  static const char* Eraser;
268  static const char* Eur;
269  static const char* Euro;
270  static const char* Exchange;
271  static const char* Exclamation;
272  static const char* ExclamationCircle;
273  static const char* ExclamationTriangle;
274  static const char* Expand;
275  static const char* ExternalLink;
276  static const char* ExternalLinkSquare;
277  static const char* Eye;
278  static const char* EyeSlash;
279  static const char* Eyedropper;
280  static const char* Facebook;
281  static const char* FacebookF;
282  static const char* FacebookOfficial;
283  static const char* FacebookSquare;
284  static const char* FastBackward;
285  static const char* FastForward;
286  static const char* Fax;
287  static const char* Female;
288  static const char* FighterJet;
289  static const char* File;
290  static const char* FileArchiveO;
291  static const char* FileAudioO;
292  static const char* FileCodeO;
293  static const char* FileExcelO;
294  static const char* FileImageO;
295  static const char* FileMovieO;
296  static const char* FileO;
297  static const char* FilePdfO;
298  static const char* FilePhotoO;
299  static const char* FilePictureO;
300  static const char* FilePowerpointO;
301  static const char* FileSoundO;
302  static const char* FileText;
303  static const char* FileTextO;
304  static const char* FileVideoO;
305  static const char* FileWordO;
306  static const char* FileZipO;
307  static const char* FilesO;
308  static const char* Film;
309  static const char* Filter;
310  static const char* Fire;
311  static const char* FireExtinguisher;
312  static const char* Flag;
313  static const char* FlagCheckered;
314  static const char* FlagO;
315  static const char* Flash;
316  static const char* Flask;
317  static const char* Flickr;
318  static const char* FloppyO;
319  static const char* Folder;
320  static const char* FolderO;
321  static const char* FolderOpen;
322  static const char* FolderOpenO;
323  static const char* Font;
324  static const char* Forumbee;
325  static const char* Forward;
326  static const char* Foursquare;
327  static const char* FrownO;
328  static const char* FutbolO;
329  static const char* Gamepad;
330  static const char* Gavel;
331  static const char* Gbp;
332  static const char* Ge;
333  static const char* Gear;
334  static const char* Gears;
335  static const char* Genderless;
336  static const char* Gift;
337  static const char* Git;
338  static const char* GitSquare;
339  static const char* Github;
340  static const char* GithubAlt;
341  static const char* GithubSquare;
342  static const char* Gittip;
343  static const char* Glass;
344  static const char* Globe;
345  static const char* Google;
346  static const char* GooglePlus;
347  static const char* GooglePlusSquare;
348  static const char* GoogleWallet;
349  static const char* GraduationCap;
350  static const char* Gratipay;
351  static const char* Group;
352  static const char* HSquare;
353  static const char* HackerNews;
354  static const char* HandODown;
355  static const char* HandOLeft;
356  static const char* HandORight;
357  static const char* HandOUp;
358  static const char* HddO;
359  static const char* Header;
360  static const char* Headphones;
361  static const char* Heart;
362  static const char* HeartO;
363  static const char* Heartbeat;
364  static const char* History;
365  static const char* Home;
366  static const char* HospitalO;
367  static const char* Hotel;
368  static const char* Html5;
369  static const char* Ils;
370  static const char* Image;
371  static const char* Inbox;
372  static const char* Indent;
373  static const char* Info;
374  static const char* InfoCircle;
375  static const char* Inr;
376  static const char* Instagram;
377  static const char* Institution;
378  static const char* Ioxhost;
379  static const char* Italic;
380  static const char* Joomla;
381  static const char* Jpy;
382  static const char* Jsfiddle;
383  static const char* Key;
384  static const char* KeyboardO;
385  static const char* Krw;
386  static const char* Language;
387  static const char* Laptop;
388  static const char* Lastfm;
389  static const char* LastfmSquare;
390  static const char* Leaf;
391  static const char* Leanpub;
392  static const char* Legal;
393  static const char* LemonO;
394  static const char* LevelDown;
395  static const char* LevelUp;
396  static const char* LifeBouy;
397  static const char* LifeBuoy;
398  static const char* LifeRing;
399  static const char* LifeSaver;
400  static const char* LightbulbO;
401  static const char* LineChart;
402  static const char* Link;
403  static const char* Linkedin;
404  static const char* LinkedinSquare;
405  static const char* Linux;
406  static const char* List;
407  static const char* ListAlt;
408  static const char* ListOl;
409  static const char* ListUl;
410  static const char* LocationArrow;
411  static const char* Lock;
412  static const char* LongArrowDown;
413  static const char* LongArrowLeft;
414  static const char* LongArrowRight;
415  static const char* LongArrowUp;
416  static const char* Magic;
417  static const char* Magnet;
418  static const char* MailForward;
419  static const char* MailReply;
420  static const char* MailReplyAll;
421  static const char* Male;
422  static const char* MapMarker;
423  static const char* Mars;
424  static const char* MarsDouble;
425  static const char* MarsStroke;
426  static const char* MarsStrokeH;
427  static const char* MarsStrokeV;
428  static const char* Maxcdn;
429  static const char* Meanpath;
430  static const char* Medium;
431  static const char* Medkit;
432  static const char* MehO;
433  static const char* Mercury;
434  static const char* Microphone;
435  static const char* MicrophoneSlash;
436  static const char* Minus;
437  static const char* MinusCircle;
438  static const char* MinusSquare;
439  static const char* MinusSquareO;
440  static const char* Mobile;
441  static const char* MobilePhone;
442  static const char* Money;
443  static const char* MoonO;
444  static const char* MortarBoard;
445  static const char* Motorcycle;
446  static const char* Music;
447  static const char* Navicon;
448  static const char* Neuter;
449  static const char* NewspaperO;
450  static const char* Openid;
451  static const char* Outdent;
452  static const char* Pagelines;
453  static const char* PaintBrush;
454  static const char* PaperPlane;
455  static const char* PaperPlaneO;
456  static const char* Paperclip;
457  static const char* Paragraph;
458  static const char* Paste;
459  static const char* Pause;
460  static const char* Paw;
461  static const char* Paypal;
462  static const char* Pencil;
463  static const char* PencilSquare;
464  static const char* PencilSquareO;
465  static const char* Phone;
466  static const char* PhoneSquare;
467  static const char* Photo;
468  static const char* PictureO;
469  static const char* PieChart;
470  static const char* PiedPiper;
471  static const char* PiedPiperAlt;
472  static const char* Pinterest;
473  static const char* PinterestP;
474  static const char* PinterestSquare;
475  static const char* Plane;
476  static const char* Play;
477  static const char* PlayCircle;
478  static const char* PlayCircleO;
479  static const char* Plug;
480  static const char* Plus;
481  static const char* PlusCircle;
482  static const char* PlusSquare;
483  static const char* PlusSquareO;
484  static const char* PowerOff;
485  static const char* Print;
486  static const char* PuzzlePiece;
487  static const char* Qq;
488  static const char* Qrcode;
489  static const char* Question;
490  static const char* QuestionCircle;
491  static const char* QuoteLeft;
492  static const char* QuoteRight;
493  static const char* Ra;
494  static const char* Random;
495  static const char* Rebel;
496  static const char* Recycle;
497  static const char* Reddit;
498  static const char* RedditSquare;
499  static const char* Refresh;
500  static const char* Remove;
501  static const char* Renren;
502  static const char* Reorder;
503  static const char* Repeat;
504  static const char* Reply;
505  static const char* ReplyAll;
506  static const char* Retweet;
507  static const char* Rmb;
508  static const char* Road;
509  static const char* Rocket;
510  static const char* RotateLeft;
511  static const char* RotateRight;
512  static const char* Rouble;
513  static const char* Rss;
514  static const char* RssSquare;
515  static const char* Rub;
516  static const char* Ruble;
517  static const char* Rupee;
518  static const char* Save;
519  static const char* Scissors;
520  static const char* Search;
521  static const char* SearchMinus;
522  static const char* SearchPlus;
523  static const char* Sellsy;
524  static const char* Send;
525  static const char* SendO;
526  static const char* Server;
527  static const char* Share;
528  static const char* ShareAlt;
529  static const char* ShareAltSquare;
530  static const char* ShareSquare;
531  static const char* ShareSquareO;
532  static const char* Shekel;
533  static const char* Sheqel;
534  static const char* Shield;
535  static const char* Ship;
536  static const char* Shirtsinbulk;
537  static const char* ShoppingCart;
538  static const char* SignIn;
539  static const char* SignOut;
540  static const char* Signal;
541  static const char* Simplybuilt;
542  static const char* Sitemap;
543  static const char* Skyatlas;
544  static const char* Skype;
545  static const char* Slack;
546  static const char* Sliders;
547  static const char* Slideshare;
548  static const char* SmileO;
549  static const char* SoccerBallO;
550  static const char* Sort;
551  static const char* SortAlphaAsc;
552  static const char* SortAlphaDesc;
553  static const char* SortAmountAsc;
554  static const char* SortAmountDesc;
555  static const char* SortAsc;
556  static const char* SortDesc;
557  static const char* SortDown;
558  static const char* SortNumericAsc;
559  static const char* SortNumericDesc;
560  static const char* SortUp;
561  static const char* Soundcloud;
562  static const char* SpaceShuttle;
563  static const char* Spinner;
564  static const char* Spoon;
565  static const char* Spotify;
566  static const char* Square;
567  static const char* SquareO;
568  static const char* StackExchange;
569  static const char* StackOverflow;
570  static const char* Star;
571  static const char* StarHalf;
572  static const char* StarHalfEmpty;
573  static const char* StarHalfFull;
574  static const char* StarHalfO;
575  static const char* StarO;
576  static const char* Steam;
577  static const char* SteamSquare;
578  static const char* StepBackward;
579  static const char* StepForward;
580  static const char* Stethoscope;
581  static const char* Stop;
582  static const char* StreetView;
583  static const char* Strikethrough;
584  static const char* Stumbleupon;
585  static const char* StumbleuponCircle;
586  static const char* Subscript;
587  static const char* Subway;
588  static const char* Suitcase;
589  static const char* SunO;
590  static const char* Superscript;
591  static const char* Support;
592  static const char* Table;
593  static const char* Tablet;
594  static const char* Tachometer;
595  static const char* Tag;
596  static const char* Tags;
597  static const char* Tasks;
598  static const char* Taxi;
599  static const char* TencentWeibo;
600  static const char* Terminal;
601  static const char* TextHeight;
602  static const char* TextWidth;
603  static const char* Th;
604  static const char* ThLarge;
605  static const char* ThList;
606  static const char* ThumbTack;
607  static const char* ThumbsDown;
608  static const char* ThumbsODown;
609  static const char* ThumbsOUp;
610  static const char* ThumbsUp;
611  static const char* Ticket;
612  static const char* Times;
613  static const char* TimesCircle;
614  static const char* TimesCircleO;
615  static const char* Tint;
616  static const char* ToggleDown;
617  static const char* ToggleLeft;
618  static const char* ToggleOff;
619  static const char* ToggleOn;
620  static const char* ToggleRight;
621  static const char* ToggleUp;
622  static const char* Train;
623  static const char* Transgender;
624  static const char* TransgenderAlt;
625  static const char* Trash;
626  static const char* TrashO;
627  static const char* Tree;
628  static const char* Trello;
629  static const char* Trophy;
630  static const char* Truck;
631  static const char* Try;
632  static const char* Tty;
633  static const char* Tumblr;
634  static const char* TumblrSquare;
635  static const char* TurkishLira;
636  static const char* Twitch;
637  static const char* Twitter;
638  static const char* TwitterSquare;
639  static const char* Umbrella;
640  static const char* Underline;
641  static const char* Undo;
642  static const char* University;
643  static const char* Unlink;
644  static const char* Unlock;
645  static const char* UnlockAlt;
646  static const char* Unsorted;
647  static const char* Upload;
648  static const char* Usd;
649  static const char* User;
650  static const char* UserMd;
651  static const char* UserPlus;
652  static const char* UserSecret;
653  static const char* UserTimes;
654  static const char* Users;
655  static const char* Venus;
656  static const char* VenusDouble;
657  static const char* VenusMars;
658  static const char* Viacoin;
659  static const char* VideoCamera;
660  static const char* VimeoSquare;
661  static const char* Vine;
662  static const char* Vk;
663  static const char* VolumeDown;
664  static const char* VolumeOff;
665  static const char* VolumeUp;
666  static const char* Warning;
667  static const char* Wechat;
668  static const char* Weibo;
669  static const char* Weixin;
670  static const char* Whatsapp;
671  static const char* Wheelchair;
672  static const char* Wifi;
673  static const char* Windows;
674  static const char* Won;
675  static const char* Wordpress;
676  static const char* Wrench;
677  static const char* Xing;
678  static const char* XingSquare;
679  static const char* Yahoo;
680  static const char* Yelp;
681  static const char* Yen;
682  static const char* Youtube;
683  static const char* YoutubePlay;
684  static const char* YoutubeSquare;
685 
686 };
687 
688 }
689 
690 #endif // TULIPFONTAWESOME_H
691 
Tulip OpenGL camera object.
Definition: Camera.h:45
Helper class for the configuration of a Font Awesome glyph.