git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13803 a95241bf-73f2-0310-859d-f6bbb57e9c96
151 lines
4.2 KiB
C++
151 lines
4.2 KiB
C++
/*
|
|
Open Tracker License
|
|
|
|
Terms and Conditions
|
|
|
|
Copyright (c) 1991-2001, Be Incorporated. All rights reserved.
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
this software and associated documentation files (the "Software"), to deal in
|
|
the Software without restriction, including without limitation the rights to
|
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
of the Software, and to permit persons to whom the Software is furnished to do
|
|
so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice applies to all licensees
|
|
and shall be included in all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
|
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
Except as contained in this notice, the name of Be Incorporated shall not be
|
|
used in advertising or otherwise to promote the sale, use or other dealings in
|
|
this Software without prior written authorization from Be Incorporated.
|
|
|
|
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
|
of Be Incorporated in the United States and other countries. Other brand product
|
|
names are registered trademarks or trademarks of their respective holders.
|
|
All rights reserved.
|
|
*/
|
|
|
|
//--------------------------------------------------------------------
|
|
//
|
|
// Header.h
|
|
//
|
|
//--------------------------------------------------------------------
|
|
|
|
#ifndef _HEADER_H
|
|
#define _HEADER_H
|
|
|
|
#include <fs_attr.h>
|
|
#include <NodeInfo.h>
|
|
#include <Point.h>
|
|
#include <Rect.h>
|
|
#include <TextControl.h>
|
|
#include <View.h>
|
|
#include <Window.h>
|
|
|
|
#include "ComboBox.h"
|
|
|
|
#define TO_TEXT "To:"
|
|
#define FROM_TEXT "From:"
|
|
#define ENCODING_TEXT "Encoding:"
|
|
#define DECODING_TEXT "Decoding:"
|
|
#define TO_FIELD_H 39
|
|
#define FROM_FIELD_H 31
|
|
#define TO_FIELD_V 7
|
|
#define TO_FIELD_WIDTH 270
|
|
#define FROM_FIELD_WIDTH 280
|
|
#define TO_FIELD_HEIGHT 16
|
|
#define FIELD_HEIGHT 24
|
|
|
|
#define ACCOUNT_TEXT "Account:"
|
|
#define ACCOUNT_FIELD_WIDTH 165
|
|
|
|
#define SUBJECT_TEXT "Subject:"
|
|
#define SUBJECT_FIELD_H 18
|
|
#define SUBJECT_FIELD_V 33
|
|
#define SUBJECT_FIELD_WIDTH 270
|
|
#define SUBJECT_FIELD_HEIGHT 16
|
|
|
|
#define CC_TEXT "CC:"
|
|
#define CC_FIELD_H 40
|
|
#define CC_FIELD_V 58
|
|
#define CC_FIELD_WIDTH 192
|
|
#define CC_FIELD_HEIGHT 16
|
|
|
|
#define BCC_TEXT "BCC:"
|
|
#define BCC_FIELD_H 268
|
|
#define BCC_FIELD_V 58
|
|
#define BCC_FIELD_WIDTH 197
|
|
#define BCC_FIELD_HEIGHT 16
|
|
|
|
class TTextControl;
|
|
class BFile;
|
|
class BMenuField;
|
|
class BMenuItem;
|
|
class BPopupMenu;
|
|
class QPopupMenu;
|
|
|
|
//====================================================================
|
|
|
|
class THeaderView : public BBox
|
|
{
|
|
public:
|
|
THeaderView(BRect, BRect, bool incoming, BEmailMessage *mail, bool resending, uint32 defaultCharacterSet);
|
|
|
|
virtual void MessageReceived(BMessage *);
|
|
virtual void AttachedToWindow(void);
|
|
status_t LoadMessage(BEmailMessage *);
|
|
|
|
BPopUpMenu *fAccountMenu;
|
|
BPopUpMenu *fEncodingMenu;
|
|
int32 fChain;
|
|
TTextControl *fAccountTo;
|
|
TTextControl *fAccount;
|
|
TTextControl *fBcc;
|
|
TTextControl *fCc;
|
|
TTextControl *fSubject;
|
|
TTextControl *fTo;
|
|
BStringView *fDate;
|
|
bool fIncoming;
|
|
uint32 fCharacterSetUserSees;
|
|
|
|
private:
|
|
void InitEmailCompletion();
|
|
void InitGroupCompletion();
|
|
|
|
bool fResending;
|
|
QPopupMenu *fBccMenu;
|
|
QPopupMenu *fCcMenu;
|
|
QPopupMenu *fToMenu;
|
|
BDefaultChoiceList fEmailList;
|
|
};
|
|
|
|
//====================================================================
|
|
|
|
class TTextControl : public BComboBox
|
|
{
|
|
public:
|
|
TTextControl(BRect, char*, BMessage*, bool, bool, int32 resizingMode = B_FOLLOW_NONE);
|
|
|
|
virtual void AttachedToWindow();
|
|
virtual void MessageReceived(BMessage*);
|
|
|
|
// returns focus for the text view
|
|
bool HasFocus();
|
|
|
|
private:
|
|
bool fIncoming;
|
|
bool fResending;
|
|
char fLabel[100];
|
|
BPopUpMenu *fRefDropMenu;
|
|
int32 fCommand;
|
|
};
|
|
|
|
#endif /* _HEADER_H */
|