swad-core/swad_layout.h

137 lines
6.0 KiB
C
Raw Normal View History

2014-12-01 23:55:08 +01:00
// swad_layout.h: page layout
#ifndef _SWAD_LAY
#define _SWAD_LAY
/*
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.
2017-01-13 01:51:23 +01:00
Copyright (C) 1999-2017 Antonio Ca<EFBFBD>as Vargas
2014-12-01 23:55:08 +01: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 ***********************************/
/*****************************************************************************/
#include "swad_action.h"
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
2017-03-11 00:47:23 +01:00
#define Lay_MAX_BYTES_TITLE (4096 - 1)
2014-12-01 23:55:08 +01:00
2014-12-27 13:09:29 +01:00
#define Lay_HIDE_BOTH_COLUMNS 0 // 00
#define Lay_SHOW_RIGHT_COLUMN 1 // 01
#define Lay_SHOW_LEFT_COLUMN 2 // 10
#define Lay_SHOW_BOTH_COLUMNS (Lay_SHOW_LEFT_COLUMN | Lay_SHOW_RIGHT_COLUMN) // 11
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
/********************************* Public types ******************************/
/*****************************************************************************/
2015-04-11 23:46:21 +02:00
typedef enum
{
Lay_NO_BUTTON,
Lay_CREATE_BUTTON,
Lay_CONFIRM_BUTTON,
Lay_REMOVE_BUTTON,
} Lay_Button_t;
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
/****************************** Public prototypes ****************************/
/*****************************************************************************/
void Lay_WriteStartOfPage (void);
2017-04-30 23:48:48 +02:00
void Lay_PutContextualIconToRemove (Act_Action_t NextAction,void (*FuncParams) ());
void Lay_PutContextualIconToEdit (Act_Action_t NextAction,void (*FuncParams) ());
void Lay_PutContextualIconToView (Act_Action_t NextAction,void (*FuncParams) ());
void Lay_PutContextualIconToUnhide (Act_Action_t NextAction,void (*FuncParams) ());
void Lay_PutContextualIconToHide (Act_Action_t NextAction,void (*FuncParams) ());
void Lay_PutContextualIconToPrint (Act_Action_t NextAction,void (*FuncParams) ());
2017-04-17 19:03:21 +02:00
void Lay_PutContextualLink (Act_Action_t NextAction,const char *Anchor,
2016-01-02 02:33:23 +01:00
void (*FuncParams) (),
2015-12-13 19:02:06 +01:00
const char *Icon,
2016-07-01 16:32:42 +02:00
const char *Title,const char *Text,
2016-07-04 14:33:31 +02:00
const char *OnSubmit);
2016-11-22 10:44:58 +01:00
void Lay_PutContextualCheckbox (Act_Action_t NextAction,
2016-11-22 12:07:29 +01:00
void (*FuncParams) (),
2016-11-22 10:44:58 +01:00
const char *CheckboxName,bool Checked,
const char *Title,const char *Text);
2015-12-13 19:02:06 +01:00
void Lay_PutIconLink (const char *Icon,const char *Title,const char *Text,
2016-07-04 14:33:31 +02:00
const char *LinkStyle,const char *OnSubmit);
2015-04-12 18:01:06 +02:00
void Lay_PutIconWithText (const char *Icon,const char *Alt,const char *Text);
2016-03-24 13:40:05 +01:00
void Lay_PutCalculateIcon (const char *Alt);
2015-04-12 18:01:06 +02:00
void Lay_PutCalculateIconWithText (const char *Alt,const char *Text);
2015-03-24 17:47:26 +01:00
2015-07-22 19:20:30 +02:00
void Lay_PutIconRemovalNotAllowed (void);
2015-07-22 19:59:28 +02:00
void Lay_PutIconBRemovalNotAllowed (void);
void Lay_PutIconRemove (void);
2015-07-22 19:20:30 +02:00
2017-05-11 23:45:46 +02:00
void Lay_PutButton (Lay_Button_t Button,const char *TxtButton);
2017-04-27 15:02:00 +02:00
void Lay_PutCreateButton (const char *TxtButton);
void Lay_PutCreateButtonInline (const char *TxtButton);
void Lay_PutConfirmButton (const char *TxtButton);
void Lay_PutConfirmButtonInline (const char *TxtButton);
void Lay_PutRemoveButton (const char *TxtButton);
void Lay_PutRemoveButtonInline (const char *TxtButton);
2015-03-24 17:47:26 +01:00
2016-11-13 23:52:51 +01:00
void Lay_StartRoundFrameTable (const char *Width,const char *Title,
void (*FunctionToDrawContextualIcons) (void),
const char *HelpLink,
unsigned CellPadding);
2016-11-12 21:39:29 +01:00
void Lay_StartRoundFrame (const char *Width,const char *Title,
2016-11-12 22:00:50 +01:00
void (*FunctionToDrawContextualIcons) (void),
const char *HelpLink);
2016-12-06 18:04:12 +01:00
void Lay_StartRoundFrameShadow (const char *Width,const char *Title,
void (*FunctionToDrawContextualIcons) (void),
const char *HelpLink);
void Lay_StartRoundFrameTableShadow (const char *Width,const char *Title,
void (*FunctionToDrawContextualIcons) (void),
const char *HelpLink,
unsigned CellPadding);
2015-04-12 18:01:06 +02:00
void Lay_EndRoundFrameTable (void);
void Lay_EndRoundFrameTableWithButton (Lay_Button_t Button,const char *TxtButton);
void Lay_EndRoundFrameWithButton (Lay_Button_t Button,const char *TxtButton);
2016-11-24 20:19:54 +01:00
void Lay_EndRoundFrame (void);
2017-05-01 12:36:24 +02:00
2017-05-01 21:17:38 +02:00
void Lay_StartTable (unsigned CellPadding);
2017-05-01 12:36:24 +02:00
void Lay_StartTableCenter (unsigned CellPadding);
2017-05-01 10:22:16 +02:00
void Lay_StartTableWide (unsigned CellPadding);
2017-05-01 12:36:24 +02:00
void Lay_StartTableWideMargin (unsigned CellPadding);
2017-05-01 10:22:16 +02:00
void Lay_EndTable (void);
2015-04-03 14:04:26 +02:00
2017-05-10 10:25:01 +02:00
void Lay_ShowErrorAndExit (const char *Txt);
2016-01-09 15:00:14 +01:00
2014-12-01 23:55:08 +01:00
void Lay_RefreshNotifsAndConnected (void);
void Lay_RefreshLastClicks (void);
2016-03-18 22:17:35 +01:00
void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
2014-12-01 23:55:08 +01:00
long InsCod,long DegCod,long CrsCod);
void Lay_AdvertisementMobile (void);
2014-12-29 13:26:39 +01:00
void Lay_IndentDependingOnLevel (unsigned Level,bool IsLastItemInLevel[]);
2015-04-11 02:04:23 +02:00
void Lay_HelpPlainEditor (void);
void Lay_HelpRichEditor (void);
2016-10-03 22:41:45 +02:00
void Lay_StartHTMLFile (FILE *File,const char *Title);
2014-12-01 23:55:08 +01:00
#endif