* Set up the framework for different "views" of a room
[citadel.git] / citadel / techdoc / views.txt
1 How "views" work in Citadel
2 ---------------------------
3  
4  (Note: this stuff isn't finished yet; we're still building the framework.)
5  
6  
7  There's no need to be rigid and stupid about how different rooms are presented
8 in a Citadel client.  And we don't enforce things either.  But there's a need
9 to make things look the way the user wants to see them.  For example, we might
10 always choose to see a room full of private mail as a summary (one line per
11 message) rather than always dumping out the entire contents like we do on a
12 typical BBS room.  An address book room might look better as a tabbed view
13 or something, rather than as a bunch of messages with vCards attached to them.
14
15  This is why we define "views" for a room.  It gives the client software a
16 hint as to how to display the contents of a room.  This is kept on a per-user
17 basis by storing it in the 'visit' record for a particular room/user
18 combination.  It is visit.v_view and is an integer.  Naturally, there also
19 needs to be a default, for users who have never visited the room before.  This
20 is in the room record as quickroom.QRdefaultview (and is also an integer).
21  
22  The values currently defined are:
23
24 #define VIEW_BBS                0       /* Traditional Citadel BBS view */
25 #define VIEW_MAILBOX            1       /* Mailbox summary */
26 #define VIEW_ADDRESSBOOK        2       /* Address book view */
27