~ubuntu-branches/ubuntu/wily/aegisub/wily-proposed

« back to all changes in this revision

Viewing changes to libaegisub/include/libaegisub/calltip_provider.h

  • Committer: Package Import Robot
  • Author(s): Sebastian Reichel, Pascal De Vuyst, Juan Picca, Sebastian Reichel
  • Date: 2015-08-04 21:40:50 UTC
  • mfrom: (5.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20150804214050-y2aghm9vdksoc8t7
Tags: 3.2.2+dfsg-1
[ Pascal De Vuyst ]
* Fix Typo in package description (Closes: #739219)

[ Juan Picca ]
* Add patch to fix reproducible build (Closes: #789728)

[ Sebastian Reichel ]
* New upstream release
 - remove vendor directory from orig tarball
* Update Debian Standards Version to 3.9.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
//
15
15
// Aegisub Project http://www.aegisub.org/
16
16
 
17
 
#include <map>
18
17
#include <string>
19
18
#include <vector>
20
19
 
21
20
namespace agi {
22
 
        namespace ass { struct DialogueToken; }
23
 
 
24
 
        struct Calltip {
25
 
                std::string text;       ///< Text of the calltip
26
 
                size_t highlight_start; ///< Start index of the current parameter in text
27
 
                size_t highlight_end;   ///< End index of the current parameter in text
28
 
                size_t tag_position;    ///< Start index of the tag in the input line
29
 
        };
30
 
 
31
 
        class CalltipProvider {
32
 
                struct CalltipProto {
33
 
                        std::string text;
34
 
                        std::vector<std::pair<size_t, size_t>> args;
35
 
                };
36
 
                std::multimap<std::string, CalltipProto> protos;
37
 
 
38
 
        public:
39
 
                CalltipProvider();
40
 
 
41
 
                /// Get the calltip to show for the given cursor position in the text
42
 
                Calltip GetCalltip(std::vector<ass::DialogueToken> const& tokens, std::string const& text, size_t pos);
43
 
        };
 
21
namespace ass { struct DialogueToken; }
 
22
 
 
23
struct Calltip {
 
24
        const char *text;       ///< Text of the calltip
 
25
        size_t highlight_start; ///< Start index of the current parameter in text
 
26
        size_t highlight_end;   ///< End index of the current parameter in text
 
27
        size_t tag_position;    ///< Start index of the tag in the input line
 
28
};
 
29
 
 
30
/// Get the calltip to show for the given cursor position in the text
 
31
Calltip GetCalltip(std::vector<ass::DialogueToken> const& tokens, std::string const& text, size_t pos);
44
32
}