Reconstruct readable C++ and organize cohesive source subsystems
Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.
Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
This commit is contained in:
parent
35d2a8cb36
commit
a47d20f8be
890 changed files with 11796 additions and 16664 deletions
|
|
@ -1,76 +0,0 @@
|
|||
#include "Client/BrowserWindowSizing.h"
|
||||
|
||||
// OFFSET: 0x00AB3060
|
||||
// FUNCTION: fn_17421
|
||||
void BrowserWindowSizing::Resize(int requestedWidth, int requestedHeight) {
|
||||
if (!this->browser) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->width = requestedWidth == this->screenWidth ? requestedWidth - 1 : requestedWidth;
|
||||
int height = requestedHeight == this->screenHeight ? requestedHeight - 1 : requestedHeight;
|
||||
|
||||
if (this->auxiliary && this->auxiliaryVisible != 0) {
|
||||
RECT rectangle;
|
||||
GetClientRect(this->auxiliary, &rectangle);
|
||||
height -= (rectangle.bottom - rectangle.top + 4);
|
||||
}
|
||||
|
||||
this->height = height;
|
||||
this->browser->put_Width(this->width);
|
||||
this->browser->put_Height(this->height);
|
||||
|
||||
if (this->auxiliary) {
|
||||
SetWindowPos(this->auxiliary, nullptr, 0, 0, requestedWidth, requestedHeight, SWP_NOMOVE);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AB2260
|
||||
// FUNCTION: fn_45430
|
||||
void BrowserWindowSizing::Refresh() {
|
||||
long width = 0;
|
||||
long height = 0;
|
||||
this->browser->get_Width(&width);
|
||||
this->browser->get_Height(&height);
|
||||
|
||||
if (width != this->width || height != this->height) {
|
||||
this->Resize(this->width, this->height);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AB3120
|
||||
// FUNCTION: fn_17422
|
||||
void BrowserAuxiliaryVisibility::Show(unsigned char value) {
|
||||
if (!this->sizing.browser) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->visible = value;
|
||||
if (!this->sizing.auxiliary) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->sizing.browser->put_Visible(VARIANT_FALSE);
|
||||
ShowWindow(this->sizing.auxiliary, this->visible != 0 ? SW_SHOW : SW_HIDE);
|
||||
|
||||
if (this->hasSite) {
|
||||
RECT rectangle;
|
||||
GetWindowRect(this->host, &rectangle);
|
||||
POINT origin{};
|
||||
ClientToScreen(this->host, &origin);
|
||||
this->sizing.browser->put_Left(-origin.x);
|
||||
}
|
||||
|
||||
long top = 0;
|
||||
if (this->sizing.auxiliary && this->visible != 0) {
|
||||
RECT rectangle;
|
||||
GetClientRect(this->sizing.auxiliary, &rectangle);
|
||||
top = rectangle.bottom - rectangle.top + 4;
|
||||
}
|
||||
this->sizing.browser->put_Top(top);
|
||||
|
||||
RECT rectangle;
|
||||
GetClientRect(this->host, &rectangle);
|
||||
this->sizing.Resize(rectangle.right - rectangle.left, rectangle.bottom - rectangle.top);
|
||||
this->sizing.browser->put_Visible(VARIANT_TRUE);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue