[DEV] add basic doc element unavaillabe

This commit is contained in:
Edouard DUPIN 2013-12-27 21:55:28 +01:00
parent 9cc41e0dad
commit f7f0c7e636
5 changed files with 93 additions and 58 deletions

View File

@ -31,7 +31,7 @@ This exclude the classical extern library with licence:
:** GPL :** GPL
[/note] [/note]
==== License (DSB) ==== ==== License (BSD) ====
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions modification, are permitted provided that the following conditions
are met: are met:

2
monk

@ -1 +1 @@
Subproject commit 1a112e40005744781cb711f4c795ef9cdab96b08 Subproject commit 7d217467dc265495236c087b11e369e3f4a8952c

View File

@ -115,6 +115,9 @@ namespace ewol {
* @brief draw All the refistered text in the current element on openGL * @brief draw All the refistered text in the current element on openGL
*/ */
void draw(bool _disableDepthTest=true); void draw(bool _disableDepthTest=true);
/**
* @previous
*/
void draw(const mat4& _transformationMatrix, bool _enableDepthTest=false); void draw(const mat4& _transformationMatrix, bool _enableDepthTest=false);
/** /**
* @brief clear all the registered element in the current element * @brief clear all the registered element in the current element
@ -136,6 +139,9 @@ namespace ewol {
* @param[in] _pos Position of the text (in 3D) * @param[in] _pos Position of the text (in 3D)
*/ */
void setPos(const vec3& _pos); void setPos(const vec3& _pos);
/**
* @previous
*/
inline void setPos(const vec2& _pos) { inline void setPos(const vec2& _pos) {
setPos(vec3(_pos.x(),_pos.y(),0)); setPos(vec3(_pos.x(),_pos.y(),0));
}; };
@ -144,6 +150,9 @@ namespace ewol {
* @param[in] _pos ofset apply of the text (in 3D) * @param[in] _pos ofset apply of the text (in 3D)
*/ */
void setRelPos(const vec3& _pos); void setRelPos(const vec3& _pos);
/**
* @previous
*/
inline void setRelPos(const vec2& _pos) { inline void setRelPos(const vec2& _pos) {
setRelPos(vec3(_pos.x(),_pos.y(),0)); setRelPos(vec3(_pos.x(),_pos.y(),0));
}; };
@ -165,6 +174,9 @@ namespace ewol {
void setClippingWidth(const vec3& _pos, const vec3& _width) { void setClippingWidth(const vec3& _pos, const vec3& _width) {
setClipping(_pos, _pos+_width); setClipping(_pos, _pos+_width);
} }
/**
* @previous
*/
void setClippingWidth(const vec2& _pos, const vec2& _width) { void setClippingWidth(const vec2& _pos, const vec2& _width) {
setClipping(_pos, _pos+_width); setClipping(_pos, _pos+_width);
}; };
@ -174,6 +186,9 @@ namespace ewol {
* @param[in] _posEnd End position of the clipping * @param[in] _posEnd End position of the clipping
*/ */
void setClipping(const vec3& _pos, const vec3& _posEnd); void setClipping(const vec3& _pos, const vec3& _posEnd);
/**
* @previous
*/
void setClipping(const vec2& _pos, const vec2& _posEnd) { void setClipping(const vec2& _pos, const vec2& _posEnd) {
setClipping(vec3(_pos.x(),_pos.y(),-1), vec3(_posEnd.x(),_posEnd.y(),1) ); setClipping(vec3(_pos.x(),_pos.y(),-1), vec3(_posEnd.x(),_posEnd.y(),1) );
}; };
@ -235,30 +250,35 @@ namespace ewol {
* @param[in] _text The string to display. * @param[in] _text The string to display.
*/ */
void print(const std::string& _text); void print(const std::string& _text);
/**
* @previous
*/
void print(const std::u32string& _text); void print(const std::u32string& _text);
/** /**
* @brief display a compleat string in the current element with the generic decoration specification. (basic html data) * @brief display a compleat string in the current element with the generic decoration specification. (basic html data)
* <pre> *
* <br/> * [code style=xml]
* <br/><br/><br/> * <br/>
* <center> * <br/><br/><br/>
* text exemple <b>in bold</b> other text <b>bold part <i>boldItalic part</i></b> an other thext * <center>
* <font color=\"#FF0000\">colored text <b>bold color text</b> <i>bold italic text</i> normal color text</font> the end of the string<br/> * text exemple <b>in bold</b> other text <b>bold part <i>boldItalic part</i></b> an other thext
* an an other thext * <font color="#FF0000">colored text <b>bold color text</b> <i>bold italic text</i> normal color text</font> the end of the string<br/>
* </center> * an an other thext
* <br/><br/><br/> * </center>
* <left> * <br/><br/><br/>
* plop 1 * <left>
* </left> * plop 1
* <br/><br/><br/> * </left>
* <right> * <br/><br/><br/>
* plop 2 * <right>
* </right> * plop 2
* <br/><br/><br/> * </right>
* <justify> * <br/><br/><br/>
* Un exemple de text * <justify>
* </justify> * Un exemple de text
* </pre> * </justify>
* [/code]
*
* @note This is parsed with tiny xml, then be carfull that the XML is correct, and all balises are closed ... otherwite the display can not be done * @note This is parsed with tiny xml, then be carfull that the XML is correct, and all balises are closed ... otherwite the display can not be done
* @param[in] _text The string to display. * @param[in] _text The string to display.
* @TODO : implementation not done .... * @TODO : implementation not done ....
@ -266,31 +286,33 @@ namespace ewol {
void printDecorated(const std::string& _text); void printDecorated(const std::string& _text);
/** /**
* @brief display a compleat string in the current element with the generic decoration specification. (basic html data) * @brief display a compleat string in the current element with the generic decoration specification. (basic html data)
* <pre> *
* <html> * [code style=xml]
* <body> * <html>
* <br/> * <body>
* <br/><br/><br/> * <br/>
* <center> * <br/><br/><br/>
* text exemple <b>in bold</b> other text <b>bold part <i>boldItalic part</i></b> an other thext * <center>
* <font color=\"#FF0000\">colored text <b>bold color text</b> <i>bold italic text</i> normal color text</font> the end of the string<br/> * text exemple <b>in bold</b> other text <b>bold part <i>boldItalic part</i></b> an other thext
* an an other thext * <font color="#FF0000">colored text <b>bold color text</b> <i>bold italic text</i> normal color text</font> the end of the string<br/>
* </center> * an an other thext
* <br/><br/><br/> * </center>
* <left> * <br/><br/><br/>
* plop 1 * <left>
* </left> * plop 1
* <br/><br/><br/> * </left>
* <right> * <br/><br/><br/>
* plop 2 * <right>
* </right> * plop 2
* <br/><br/><br/> * </right>
* <justify> * <br/><br/><br/>
* Un exemple de text * <justify>
* </justify> * Un exemple de text
* </body> * </justify>
* </html> * </body>
* </pre> * </html>
* [/code]
*
* @note This is parsed with tiny xml, then be carfull that the XML is correct, and all balises are closed ... otherwite the display can not be done * @note This is parsed with tiny xml, then be carfull that the XML is correct, and all balises are closed ... otherwite the display can not be done
* @param[in] _text The string to display. * @param[in] _text The string to display.
* @TODO : implementation not done .... * @TODO : implementation not done ....
@ -302,6 +324,9 @@ namespace ewol {
* @param[in] _decoration The text decoration for the text that might be display (if the vector is smaller, the last parameter is get) * @param[in] _decoration The text decoration for the text that might be display (if the vector is smaller, the last parameter is get)
*/ */
void print(const std::string& _text, const std::vector<TextDecoration>& _decoration); void print(const std::string& _text, const std::vector<TextDecoration>& _decoration);
/**
* @previous
*/
void print(const std::u32string& _text, const std::vector<TextDecoration>& _decoration); void print(const std::u32string& _text, const std::vector<TextDecoration>& _decoration);
/** /**
* @brief display the current char in the current element (note that the kerning is availlable if the position is not changed) * @brief display the current char in the current element (note that the kerning is availlable if the position is not changed)
@ -374,10 +399,14 @@ namespace ewol {
* @param[in] _start The first elemnt that might be used to calculate. * @param[in] _start The first elemnt that might be used to calculate.
* @param[out] _stop The last Id availlable in the current string. * @param[out] _stop The last Id availlable in the current string.
* @param[out] _space Number of space in the string. * @param[out] _space Number of space in the string.
* @parma[out] _freespace This represent the number of pixel present in the right white space. * @param[out] _freespace This represent the number of pixel present in the right white space.
* @return true if the rifht has free space that can be use for jystify (return false if we find \n * @return true if the rifht has free space that can be use for jystify.
* @return false if we find '\n'
*/ */
bool extrapolateLastId(const std::string& _text, const int32_t _start, int32_t& _stop, int32_t& _space, int32_t& _freeSpace); bool extrapolateLastId(const std::string& _text, const int32_t _start, int32_t& _stop, int32_t& _space, int32_t& _freeSpace);
/**
* @previous
*/
bool extrapolateLastId(const std::u32string& _text, const int32_t _start, int32_t& _stop, int32_t& _space, int32_t& _freeSpace); bool extrapolateLastId(const std::u32string& _text, const int32_t _start, int32_t& _stop, int32_t& _space, int32_t& _freeSpace);
private: private:
// this section is reserved for HTML parsing and display: // this section is reserved for HTML parsing and display:

View File

@ -13,10 +13,9 @@ namespace ewol {
/** /**
* @not-in-doc * @not-in-doc
* @brief Kerning properties of one specific Glyph with an other * @brief Kerning properties of one specific Glyph with an other
* @note The "Kerning" is the methode to provide a better display for some string like
* the "VA" has 2 letter that overlap themself. This name Kerning
* *
* Without Kerning : * Without Kerning :
* [pre]
* *
* \ / /\ * \ / /\
* \ / / \ * \ / / \
@ -25,8 +24,10 @@ namespace ewol {
* \ / / \ * \ / / \
* \/ / \ * \/ / \
* v v a a * v v a a
* * [/pre]
*
* With Kerning : * With Kerning :
* [pre]
* *
* \ / /\ * \ / /\
* \ / / \ * \ / / \
@ -35,7 +36,10 @@ namespace ewol {
* \ / / \ * \ / / \
* \/ / \ * \/ / \
* v a v a * v a v a
* [/pre]
* *
* @note The "Kerning" is the methode to provide a better display for some string like
* the "VA" has 2 letter that overlap themself. This name Kerning
*/ */
class Kerning { class Kerning {
public: public:

View File

@ -738,26 +738,26 @@ namespace ewol {
* @param[in] _mode Configuring mode. * @param[in] _mode Configuring mode.
* @param[in] _type Type of the annimation. * @param[in] _type Type of the annimation.
*/ */
void addAnnimationType(enum annimationMode _mode, const char* _type); void addAnnimationType(enum ewol::Widget::annimationMode _mode, const char* _type);
public: public:
/** /**
* @brief set a annimation type. * @brief set a annimation type.
* @param[in] _mode Configuring mode. * @param[in] _mode Configuring mode.
* @param[in] _type type of the annimation * @param[in] _type type of the annimation
*/ */
void setAnnimationType(enum annimationMode _mode, const std::string& _type); void setAnnimationType(enum ewol::Widget::annimationMode _mode, const std::string& _type);
/** /**
* @brief set a annimation time to produce. * @brief set a annimation time to produce.
* @param[in] _mode Configuring mode. * @param[in] _mode Configuring mode.
* @param[in] _time Time in second of the annimation display * @param[in] _time Time in second of the annimation display
*/ */
void setAnnimationTime(enum annimationMode _mode, float _time); void setAnnimationTime(enum ewol::Widget::annimationMode _mode, float _time);
/** /**
* @brief Start the annimation. * @brief Start the annimation.
* @param[in] _mode Configuring mode. * @param[in] _mode Configuring mode.
* @return true if an annimation will be started, false ==> no annimation and no event * @return true if an annimation will be started, false ==> no annimation and no event
*/ */
bool startAnnimation(enum annimationMode _mode); bool startAnnimation(enum ewol::Widget::annimationMode _mode);
/** /**
* @brief Stop/Break the annimation. * @brief Stop/Break the annimation.
* @return true if an annimation will be stoped, false ==> no curent annimation and no event wil be generated * @return true if an annimation will be stoped, false ==> no curent annimation and no event wil be generated
@ -769,7 +769,9 @@ namespace ewol {
* @param[in] _mode Configuring mode. * @param[in] _mode Configuring mode.
* @return true need to add periodic call. * @return true need to add periodic call.
*/ */
virtual bool onStartAnnimation(enum annimationMode _mode) { return false; }; virtual bool onStartAnnimation(enum ewol::Widget::annimationMode _mode) {
return false;
};
/** /**
* @brief Event when Stop the annimation. * @brief Event when Stop the annimation.
*/ */