-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPLabel.h
41 lines (32 loc) · 1.05 KB
/
PLabel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//==============================================================================
// File: PLabel.h
//
// Description: A wrapper to avoid unnecessary screen updates if the label doesn't change
//
// Created: PH 10/15/99
//
// Copyright (c) 2017, Phil Harvey, Queen's University
//==============================================================================
#ifndef __PLABEL_H__
#define __PLABEL_H__
#include <Xm/Xm.h>
class PLabel {
public:
PLabel(Widget aLabel=NULL);
virtual ~PLabel();
void CreateLabel(char *name, Widget parent, ArgList args, Cardinal num_args, int managed=1);
void DestroyLabel();
void SetString(char *str);
void SetStringNow(char *str);
char * GetString() { return mString; }
Widget GetWidget() { return mLabel; }
protected:
void CreateString(int len);
void FreeString();
int SaveString(char *str);
private:
Widget mLabel;
char * mString;
int mStringLen;
};
#endif // __PLABEL_H__