Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/Wasabi/api/skin/nakedobject.cpp
2024-09-24 14:54:57 +02:00

35 lines
682 B
C++

#include <precomp.h>
#include "nakedobject.h"
NakedObject::NakedObject() {
reentry_onresize = 0;
reentry_onsetvisible = 0;
}
int NakedObject::getPreferences(int what) {
return 0;
}
int NakedObject::onResize() {
int rt = NAKEDOBJECT_PARENT::onResize();
RECT r;
getClientRect(&r);
if (!reentry_onresize && r.left != r.right || r.top != r.bottom) {
reentry_onresize = 1;
resize(r.left, r.top, 0, 0);
reentry_onresize = 0;
}
return rt;
}
void NakedObject::onSetVisible(int i) {
NAKEDOBJECT_PARENT::onSetVisible(i);
if (!i) return;
if (!reentry_onsetvisible) {
reentry_onsetvisible = 1;
setVisible(0);
reentry_onsetvisible = 0;
}
}