swad-core/swad_HTML.h

133 lines
5.0 KiB
C

// swad_HTML.h: tables, divs
#ifndef _SWAD_HTM
#define _SWAD_HTM
/*
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.
Copyright (C) 1999-2019 Antonio Cañas Vargas
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 ******************************/
/*****************************************************************************/
typedef enum
{
HTM_Type_UNSIGNED,
HTM_Type_LONG,
HTM_Type_STRING,
} HTM_Type_t;
/*****************************************************************************/
/****************************** Public prototypes ****************************/
/*****************************************************************************/
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);
void HTM_TR_Begin (const char *fmt,...);
void HTM_TR_End (void);
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);
void HTM_TD_Begin (const char *fmt,...);
void HTM_TD_End (void);
void HTM_TD_Empty (unsigned NumColumns);
void HTM_TD_ColouredEmpty (unsigned NumColumns);
void HTM_DIV_Begin (const char *fmt,...);
void HTM_DIV_End (void);
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);
void HTM_UL_Begin (const char *fmt,...);
void HTM_UL_End (void);
void HTM_LI_Begin (const char *fmt,...);
void HTM_LI_End (void);
void HTM_A_Begin (const char *fmt,...);
void HTM_A_End (void);
void HTM_SCRIPT_Begin (const char *URL,const char *CharSet);
void HTM_SCRIPT_End (void);
void HTM_LABEL_Begin (const char *fmt,...);
void HTM_LABEL_End (void);
void HTM_INPUT_TEXT (const char *Name,unsigned MaxLength,const char *Value,bool SubmitOnChange,
const char *fmt,...);
void HTM_INPUT_SEARCH (const char *Name,unsigned MaxLength,const char *Value,
const char *fmt,...);
void HTM_INPUT_TEL (const char *Name,const char *Value,bool SubmitOnChange,
const char *fmt,...);
void HTM_INPUT_EMAIL (const char *Name,unsigned MaxLength,const char *Value,
const char *fmt,...);
void HTM_INPUT_URL (const char *Name,const char *Value,bool SubmitOnChange,
const char *fmt,...);
void HTM_INPUT_FILE (const char *Accept,bool SubmitOnChange);
void HTM_INPUT_BUTTON (const char *Name,const char *Value,const char *Attr);
void HTM_INPUT_IMAGE (const char *ImgFile,const char *Title,const char *Class);
void HTM_INPUT_PASSWORD (const char *Name,const char *PlaceHolder,
const char *AutoComplete,bool Required);
void HTM_INPUT_NUMBER (const char *Name,long Min,long Max,long Value,bool Disabled);
void HTM_INPUT_RADIO (const char *Name,bool SubmitOnClick,
const char *fmt,...);
void HTM_INPUT_CHECKBOX (const char *Name,bool SubmitOnChange,
const char *fmt,...);
void HTM_TEXTAREA_Begin (const char *fmt,...);
void HTM_TEXTAREA_End (void);
void HTM_SELECT_Begin (bool SubmitOnChange,
const char *fmt,...);
void HTM_SELECT_End (void);
void HTM_OPTION (HTM_Type_t Type,const void *ValuePtr,bool Selected,bool Disabled,
const char *fmt,...);
void HTM_IMG (const char *URL,const char *Icon,const char *Title,
const char *fmt,...);
#endif