misc_gui.c
changeset 4958 aaa8a92059bf
parent 4955 e3496ee0e37d
child 4994 ec6d8b5551f4
equal deleted inserted replaced
4957:8588d2e7f409 4958:aaa8a92059bf
   884  * and the maximum length of this buffer
   884  * and the maximum length of this buffer
   885  * @param tb @Textbuf type which is getting initialized
   885  * @param tb @Textbuf type which is getting initialized
   886  * @param buf the buffer that will be holding the data for input
   886  * @param buf the buffer that will be holding the data for input
   887  * @param maxlength maximum length in characters of this buffer
   887  * @param maxlength maximum length in characters of this buffer
   888  * @param maxwidth maximum length in pixels of this buffer. If reached, buffer
   888  * @param maxwidth maximum length in pixels of this buffer. If reached, buffer
   889  * cannot grow, even if maxlength would allow because there is space */
   889  * cannot grow, even if maxlength would allow because there is space. A length
       
   890  * of zero '0' means the buffer is only restricted by maxlength */
   890 void InitializeTextBuffer(Textbuf *tb, const char *buf, uint16 maxlength, uint16 maxwidth)
   891 void InitializeTextBuffer(Textbuf *tb, const char *buf, uint16 maxlength, uint16 maxwidth)
   891 {
   892 {
   892 	tb->buf = (char*)buf;
   893 	tb->buf = (char*)buf;
   893 	tb->maxlength = maxlength;
   894 	tb->maxlength = maxlength;
   894 	tb->maxwidth  = maxwidth;
   895 	tb->maxwidth  = maxwidth;