swad-core/swad_HTML.h

183 lines
6.4 KiB
C
Raw Normal View History

2019-10-23 19:05:05 +02:00
// swad_HTML.h: tables, divs
2017-06-11 20:09:59 +02:00
2019-10-23 19:05:05 +02:00
#ifndef _SWAD_HTM
#define _SWAD_HTM
2017-06-11 20:09:59 +02:00
/*
SWAD (Shared Workspace At a Distance in Spanish),
is a web platform developed at the University of Granada (Spain),
and used to support university teaching.
This file is part of SWAD core.
2019-01-07 21:52:19 +01:00
Copyright (C) 1999-2019 Antonio Ca<EFBFBD>as Vargas
2017-06-11 20:09:59 +02:00
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*****************************************************************************/
/********************************* Headers ***********************************/
/*****************************************************************************/
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
/*****************************************************************************/
/********************************* Public types ******************************/
/*****************************************************************************/
2019-11-05 23:11:31 +01:00
typedef enum
{
HTM_Type_UNSIGNED,
HTM_Type_LONG,
HTM_Type_STRING,
} HTM_Type_t;
2017-06-11 20:09:59 +02:00
/*****************************************************************************/
/****************************** Public prototypes ****************************/
/*****************************************************************************/
2019-10-23 19:05:05 +02:00
void HTM_TABLE_Begin (const char *fmt,...);
void HTM_TABLE_BeginPadding (unsigned CellPadding);
void HTM_TABLE_BeginCenterPadding (unsigned CellPadding);
void HTM_TABLE_BeginCenter (void);
void HTM_TABLE_BeginWidePadding (unsigned CellPadding);
void HTM_TABLE_BeginWide (void);
void HTM_TABLE_BeginWideMarginPadding (unsigned CellPadding);
void HTM_TABLE_BeginWideMargin (void);
void HTM_TABLE_End (void);
2019-10-10 23:14:13 +02:00
2019-10-23 19:05:05 +02:00
void HTM_TR_Begin (const char *fmt,...);
void HTM_TR_End (void);
2019-10-10 23:14:13 +02:00
2019-10-23 19:05:05 +02:00
void HTM_TH (unsigned RowSpan,unsigned ColSpan,const char *Class,const char *Txt);
void HTM_TH_Begin (unsigned RowSpan,unsigned ColSpan,const char *Class);
void HTM_TH_End (void);
void HTM_TH_Empty (unsigned NumColumns);
2019-10-11 01:02:51 +02:00
2019-10-23 19:05:05 +02:00
void HTM_TD_Begin (const char *fmt,...);
void HTM_TD_End (void);
void HTM_TD_Empty (unsigned NumColumns);
void HTM_TD_ColouredEmpty (unsigned NumColumns);
2019-09-23 09:44:10 +02:00
2019-10-23 21:37:01 +02:00
void HTM_DIV_Begin (const char *fmt,...);
2019-10-23 20:07:56 +02:00
void HTM_DIV_End (void);
2019-10-26 01:56:36 +02:00
void HTM_MAIN_Begin (const char *Class);
void HTM_MAIN_End (void);
void HTM_ARTICLE_Begin (const char *ArticleId);
void HTM_ARTICLE_End (void);
void HTM_SECTION_Begin (const char *SectionId);
void HTM_SECTION_End (void);
2019-11-07 10:24:00 +01:00
void HTM_SPAN_Begin (const char *fmt,...);
void HTM_SPAN_End (void);
2019-11-11 00:15:44 +01:00
void HTM_OL_Begin (void);
void HTM_OL_End (void);
2019-10-26 12:25:27 +02:00
void HTM_UL_Begin (const char *fmt,...);
2019-10-26 02:19:42 +02:00
void HTM_UL_End (void);
2019-10-26 22:49:13 +02:00
void HTM_LI_Begin (const char *fmt,...);
void HTM_LI_End (void);
2019-11-09 20:04:35 +01:00
void HTM_DL_Begin (void);
void HTM_DL_End (void);
void HTM_DT_Begin (void);
void HTM_DT_End (void);
void HTM_DD_Begin (void);
void HTM_DD_End (void);
2019-10-28 13:56:04 +01:00
void HTM_A_Begin (const char *fmt,...);
void HTM_A_End (void);
2019-11-01 17:35:26 +01:00
void HTM_SCRIPT_Begin (const char *URL,const char *CharSet);
void HTM_SCRIPT_End (void);
2019-11-09 20:26:13 +01:00
void HTM_PARAM (const char *Name,
const char *fmt,...);
2019-11-02 12:59:31 +01:00
void HTM_LABEL_Begin (const char *fmt,...);
void HTM_LABEL_End (void);
2019-11-04 12:25:48 +01:00
void HTM_INPUT_TEXT (const char *Name,unsigned MaxLength,const char *Value,bool SubmitOnChange,
2019-11-03 18:22:11 +01:00
const char *fmt,...);
2019-11-04 21:00:57 +01:00
void HTM_INPUT_SEARCH (const char *Name,unsigned MaxLength,const char *Value,
2019-11-04 20:41:35 +01:00
const char *fmt,...);
2019-11-04 13:58:12 +01:00
void HTM_INPUT_TEL (const char *Name,const char *Value,bool SubmitOnChange,
const char *fmt,...);
2019-11-04 09:45:57 +01:00
void HTM_INPUT_EMAIL (const char *Name,unsigned MaxLength,const char *Value,
const char *fmt,...);
2019-11-04 12:25:48 +01:00
void HTM_INPUT_URL (const char *Name,const char *Value,bool SubmitOnChange,
2019-11-04 09:45:57 +01:00
const char *fmt,...);
2019-11-11 00:15:44 +01:00
void HTM_INPUT_FILE (const char *Name,const char *Accept,bool SubmitOnChange,
const char *fmt,...);
2019-11-04 13:01:32 +01:00
void HTM_INPUT_BUTTON (const char *Name,const char *Value,const char *Attr);
2019-11-11 15:46:54 +01:00
void HTM_INPUT_IMAGE (const char *URL,const char *Icon,const char *Title,const char *Class);
2019-11-04 13:40:33 +01:00
void HTM_INPUT_PASSWORD (const char *Name,const char *PlaceHolder,
2019-11-12 15:41:58 +01:00
const char *AutoComplete,bool Required,
const char *fmt,...);
void HTM_INPUT_NUMBER (const char *Name,long Min,long Max,long Value,bool Disabled,
const char *fmt,...);
2019-11-04 18:17:39 +01:00
void HTM_INPUT_RADIO (const char *Name,bool SubmitOnClick,
const char *fmt,...);
2019-11-04 20:41:35 +01:00
void HTM_INPUT_CHECKBOX (const char *Name,bool SubmitOnChange,
const char *fmt,...);
2019-11-03 18:22:11 +01:00
2019-11-18 09:20:44 +01:00
void HTM_BUTTON_OnMouseDown_Begin (const char *Class);
2019-11-20 10:17:42 +01:00
void HTM_BUTTON_SUBMIT_Begin (const char *Title,const char *Class,const char *OnSubmit);
void HTM_BUTTON_BUTTON_Begin (const char *Title,const char *Class,const char *OnClick);
2019-11-19 00:17:23 +01:00
void HTM_BUTTON_Animated_Begin (const char *Title,const char *Class,const char *OnClick);
2019-11-09 20:15:38 +01:00
void HTM_BUTTON_End (void);
2019-10-31 17:42:05 +01:00
void HTM_TEXTAREA_Begin (const char *fmt,...);
void HTM_TEXTAREA_End (void);
2019-11-05 09:04:47 +01:00
void HTM_SELECT_Begin (bool SubmitOnChange,
const char *fmt,...);
2019-11-05 08:46:38 +01:00
void HTM_SELECT_End (void);
2019-11-09 20:31:17 +01:00
void HTM_OPTGROUP_Begin (const char *Label);
void HTM_OPTGROUP_End (void);
2019-11-06 19:45:20 +01:00
void HTM_OPTION (HTM_Type_t Type,const void *ValuePtr,bool Selected,bool Disabled,
2019-11-05 23:11:31 +01:00
const char *fmt,...);
2019-11-05 08:46:38 +01:00
2019-10-30 09:12:12 +01:00
void HTM_IMG (const char *URL,const char *Icon,const char *Title,
2019-10-30 22:31:03 +01:00
const char *fmt,...);
2019-10-30 00:42:01 +01:00
2019-11-11 00:15:44 +01:00
void HTM_STRONG_Begin (void);
void HTM_STRONG_End (void);
void HTM_EM_Begin (void);
void HTM_EM_End (void);
2019-11-10 16:41:47 +01:00
void HTM_U_Begin (void);
void HTM_U_End (void);
2019-11-09 21:08:20 +01:00
void HTM_BR (void);
2019-11-11 00:15:44 +01:00
void HTM_TxtF (const char *fmt,...);
2019-11-10 12:36:37 +01:00
void HTM_Txt (const char *Txt);
2019-11-14 08:59:11 +01:00
void HTM_NBSP (void);
2019-11-11 10:59:24 +01:00
void HTM_Colon (void);
2019-11-11 00:15:44 +01:00
void HTM_Comma (void);
2019-11-11 10:59:24 +01:00
void HTM_Hyphen (void);
void HTM_Asterisk (void);
2019-11-10 13:31:47 +01:00
void HTM_Unsigned (unsigned Num);
2019-11-11 10:59:24 +01:00
void HTM_Int (int Num);
2019-11-10 16:47:05 +01:00
void HTM_UnsignedLong (unsigned long Num);
2019-11-10 13:38:17 +01:00
void HTM_Long (long Num);
2019-11-11 00:15:44 +01:00
void HTM_Double (double Num);
void HTM_Percentage (double Percentage);
2019-11-10 12:36:37 +01:00
2017-06-11 20:09:59 +02:00
#endif